In Linux, I could discover the number of running and blocked processes running
grep "procs_running" /proc/stat
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:
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!