Check Process#

get PIDs and Ports

[root@ip-10-231-1-171 ~]# ss -tnlp
State                        Recv-Q                        Send-Q                                               Local Address:Port                                                Peer Address:Port                       Process
LISTEN                       0                             128                                                        0.0.0.0:22                                                       0.0.0.0:*                           users:(("sshd",pid=1696,fd=3))
LISTEN                       0                             511                                                      127.0.0.1:6767                                                     0.0.0.0:*                           users:(("node",pid=1001394,fd=20))
LISTEN                       0                             4096                                                       0.0.0.0:3000                                                     0.0.0.0:*                           users:(("docker-proxy",pid=403520,fd=4))
LISTEN                       0                             4096                                                     127.0.0.1:34921                                                    0.0.0.0:*                           users:(("containerd",pid=4686,fd=12))
LISTEN                       0                             128                                                           [::]:22                                                          [::]:*                           users:(("sshd",pid=1696,fd=4))
LISTEN                       0                             4096                                                          [::]:3000                                                        [::]:*                           users:(("docker-proxy",pid=403526,fd=4))

get process path

[root@ip-10-231-1-171 ~]# ps -fp 4686
UID          PID    PPID  C STIME TTY          TIME CMD
root        4686       1  0 Apr14 ?        00:25:49 /usr/bin/containerd