How to find 3 OS parameters

Dan Barrett nullpointer at pobox.com
Fri Nov 14 13:22:51 EST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 14 November 2003 11:36, Gregory Gimler wrote:
> 1) number of processes

# Check the man page; I think -ef gets _all_ processes
ps -ef | wc -l


> 2) number of threads

No idea, but if you can grok /proc/$PROCESS_NUMBER/stat, then you're in 
business.


> 3) number of simultaneous open files

# You can throw some switches at lsof if you only want, say, data files
# on a userland disk partition
lsof | wc -l
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/tR1+sIjNiQTGkXARAsgWAJ9EBUp4hHpDZxw82fodizIxWJJdOwCgx4Ov
HzuCeJL9V7ohHuTnjwZ7xeI=
=tntP
-----END PGP SIGNATURE-----




More information about the Discuss mailing list