Re: How to Find sleeping process : (286 Views)
Reply
Frequent Advisor
Posts: 50
Registered: ‎06-25-2012
Message 1 of 4 (312 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
Posts: 25,543
Registered: ‎03-06-2006
Message 2 of 4 (305 Views)

Re: How to find sleeping process

[ Edited ]

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

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

Re: How to find sleeping process

 

Dennis,

Thanks 

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

 

Thanks,

 

 

 

Valued Contributor
Posts: 60
Registered: ‎10-09-2011
Message 4 of 4 (286 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.