In Linux, I could discover the number of running and blocked processes running
grep "procs_running" /proc/stat
and
grep "procs_blocked" /proc/stat
Is there a way to do it in Mac OS X? Preferably, a way which I could use in a shell script?
Have you thought about parsing something like:
ps -AO wqb,wqr,flags,state
this via script for your proc info? Between the workqueue threadcount, proc.h flags, and state that should be enough to grep up any snapshot statistics... Or perhaps not. Let me know!
ps aux
output but I was not sure if ps aux
would list all processes. Also, I do not know if it is possible to know whether a processes is blocked or running using ps
...
Dec 13, 2010 at 18:35