Linux sshd cpu is too high to solve the problem

View the process through the top command, and I was surprised to find that the sshd process under the eureka user occupies 1569% of the cpu.

Baidu took a look and checked the thread information of the process through top -H -p 8856,

You can see that this process has 22 threads, of which 16 threads have a CPU usage rate of 99%. No wonder the system is so stuck.

But after trying to kill 8856, within a minute, the process started again. Using crontab -l also did not see any timing tasks. no crontab for eureka

Guess whether the sshd command can be executed by any user, so which sshd uses root to recover the execution authority of /sbin/sshd. chmod ox /sbin/sshd, after killing the process, it still doesn't work. So guess that sshd is under the eureka user, not the sshd of the system. Use gdb to debug. gdb -p 8856:

I have seen the problem. Note that this directory contains two spaces. Remember to add double quotes when deleting, rm -rf "/home/eureka/ /", kill the process again, wait a while and find that it does not start again, the problem is solved.

 

 

Guess you like

Origin blog.csdn.net/whatday/article/details/114572250