[cc lang='bash']
\$ apt-get install sysstat -y
# all cpus
\$ sar -u ALL 1
# per cpu
\$ sar -P ALL 1
# memory
\$ sar -r 1
# swap
\$ sar -S 1
# overall i/o
\$ sar -b -v 1
# individual i/o
\$ sar -d -p 1
# process, context switch
\$ sar -w 1
# run queue, load average
\$ sar -q 1
# network
\$ sar -n DEV 1
# socks
\$ sar -n SOCK 1
\$ cat /proc/net/sockstat
[/cc]