System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Find sleeping process :

SOLVED
Go to solution
rveri-admin
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
Dennis Handly
Acclaimed Contributor

Re: How to find sleeping process

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

rveri-admin
Frequent Advisor

Re: How to find sleeping process

 

Dennis,

Thanks 

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

 

Thanks,

 

 

 

Highlighted
RAJD1
Valued Contributor
Solution

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.