Operating System - HP-UX
1752569 Members
4866 Online
108788 Solutions
New Discussion юеВ

Re: 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 3
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,

 

 

 

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.