Re: How to Find sleeping process : (281 Views)
Reply
Frequent Advisor
rveri-admin
Posts: 50
Registered: ‎06-25-2012
Message 1 of 4 (307 Views)
Accepted Solution

How to Find sleeping process :

Experts, 

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

 

Thanks,

 

Acclaimed Contributor
Dennis Handly
Posts: 25,277
Registered: ‎03-06-2006
Message 2 of 4 (300 Views)

Re: How to find sleeping process

[ Edited ]

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

Frequent Advisor
rveri-admin
Posts: 50
Registered: ‎06-25-2012
Message 3 of 4 (289 Views)

Re: How to find sleeping process

 

Dennis,

Thanks 

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

 

Thanks,

 

 

 

Valued Contributor
RAJD1
Posts: 60
Registered: ‎10-09-2011
Message 4 of 4 (281 Views)

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.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.