在云提供商的虚拟机中,我看到一个带有奇怪随机名称的进程。它消耗大量的网络和 CPU 资源。
从视图来看,该过程如下所示pstree
:
systemd(1)───eyshcjdmzg(37775)─┬─{eyshcjdmzg}(37782)
├─{eyshcjdmzg}(37783)
└─{eyshcjdmzg}(37784)
我使用strace -p PID
. 这是我得到的输出:https ://gist.github.com/gmile/eb34d262012afeea82af1c21713b1be9 。
杀死进程不起作用。它以某种方式(通过systemd?)复活了。这是从 systemd 的角度来看它的样子(注意底部奇怪的 IP 地址):
$ systemctl status 37775
● session-60.scope - Session 60 of user root
Loaded: loaded
Transient: yes
Drop-In: /run/systemd/system/session-60.scope.d
└─50-After-systemd-logind\x2eservice.conf, 50-After-systemd-user-sessions\x2eservice.conf, 50-Description.conf, 50-SendSIGHUP.conf, 50-Slice.conf, 50-TasksMax.conf
Active: active (abandoned) since Tue 2018-03-06 10:42:51 EET; 1 day 1h ago
Tasks: 14
Memory: 155.4M
CPU: 18h 56min 4.266s
CGroup: /user.slice/user-0.slice/session-60.scope
├─37775 cat resolv.conf
├─48798 cd /etc
├─48799 sh
├─48804 who
├─48806 ifconfig eth0
├─48807 netstat -an
├─48825 cd /etc
├─48828 id
├─48831 ps -ef
├─48833 grep "A"
└─48834 whoami
Mar 06 10:42:51 k8s-master systemd[1]: Started Session 60 of user root.
Mar 06 10:43:27 k8s-master sshd[37594]: Received disconnect from 23.27.74.92 port 59964:11:
Mar 06 10:43:27 k8s-master sshd[37594]: Disconnected from 23.27.74.92 port 59964
Mar 06 10:43:27 k8s-master sshd[37594]: pam_unix(sshd:session): session closed for user root
到底是怎么回事?!