System Administration
Showing results for 
Search instead for 
Do you mean 

How to Find sleeping process :

SOLVED
Go to Solution
Frequent Advisor

How to Find sleeping process :

Experts, 

How to find Total process , Sleeping Process & Running process from command line , other than using top.

 

Thanks,

 

3 REPLIES
Acclaimed Contributor Acclaimed Contributor

Re: How to find sleeping process

[ Edited ]

You can always parse the output of ps(1) to get process info.

Frequent Advisor

Re: How to find sleeping process

 

Dennis,

Thanks 

How to parse to get the total sleeping process, any hint..

 

Thanks,

 

 

 

Highlighted
Valued Contributor

Re: How to Find sleeping process :

Adding state and parsing it you can get total number of Sleeping process, similar to top output.

$ UNIX95=1 ps -e -o pid,ppid,args,state | awk '{if ($NF~"S") {c=c+1}}END{print "Sleeping Process= " c}'

 

Sleeping Process= 1258

 

HTH,

Raj D.