Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Linux/Debian server running: postgresql, tomcat. Sometimes, I can't access server by ssh.

When I open ssh connection with my server, I can type in my log-in id(root) and password, but when I type in my password and press enter, there's no any response.

By 'sysinfo' function, I found that when server faces on this situation, there are about 1600 processes(this value is from sysinfo.procs), and load average is almost 300(in usual case, load average is between 0 and 1)

What I'm trying to is, listing TOP 5 process by number of thread it creates. However I cannot find easy method. There are some way I found.

  1. Log NLWP value of ps -efL, so I can know which process creates too many threads abnormally.
  2. When load average gets bigger and bigger, copy all of /procs/*/status file to log directory, and I can know which process have biggest value of 'Threads' later.

If there's any other suggestion, please let me know. It drives me crazy because this Linux server shouldn't fail service

share|improve this question

migrated from stackoverflow.com Jan 9 '13 at 5:52

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer 1

up vote 2 down vote accepted

Try this:

$ ps axo nlwp,pid,cmd | sort -rn | head -10

ps ax  - see every process
    o  - format
         nlwp: number of lightweight processes (threads) in the process
share|improve this answer
    
Thank you for your help! I'll try this command to find out which process makes trouble. –  Wonjae Lee Jan 9 '13 at 8:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.