# HG changeset patch # User Oleksandr Gavenko # Date 1251967186 -10800 # Node ID 365fbc9d602d27c033cae3849e8447f7509b3dd5 # Parent 380c761db2150b37045490d572ec9dea36c71f31 About OS ststistic diff -r 380c761db215 -r 365fbc9d602d stat.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stat.rst Thu Sep 03 11:39:46 2009 +0300 @@ -0,0 +1,106 @@ +-*- mode: outline; coding: utf-8 -*- + +* Cpu consumption. + +** Linux. + +*** Interactive. + + $ top + +*** Static. + + $ ps -eo %cpu,pid,cmd --sort=%cpu + +** FreeBSD. + +*** Interactive. + + $ top + +** Windows. + + cmd> taskmgr + +** Solaris. + +See + + http://developers.sun.com/solaris/articles/prstat.html + Topping top in Solaris 8 with prstat. + +* Memory consumption. + +** Linux. + +*** Interactive. + + $ top + +*** Static. + +Vitual and resident memory size: + + $ ps -eo vsz,rsz,pid,cmd --sort=vsz + +Swap size and usage: + + $ free + +** FreeBSD. + +*** Interactive. + + $ top + +*** Static. + +Swap size: + + $ swapinfo + $ pstat -s + +Swap usage: + + $ vmstat + +** Windows. + + cmd> taskmgr + +and add colums TODO. + +** Solaris. + + $ prstat -a + +* Opened file by process. + +** Linux. + + $ lsof -p + +** FreeBSD. + + $ fstat -p + +** Windows. + +* Opened file by user. + +** FreeBSD. + + $ fstat -u + +* Opened network connection by process. + +** Linux. + + $ lsof -i[46][protocol][@{hostname|hostaddr}][:{service|port}] + +46 - IPV4 or IPV6 +protocol - tcp, udp + +** FreeBSD. + +** Windows.