netstat -ta show current intenet services/connections
-a : show (a)ll (include listening port process)
-n : ip (n)umber only (no dns lookup)
-r : (r)outing table (change with route cmd)
-i : show stat for diff nic (i)nterfaces
-k ce0 : lot of interface specific info, ce NIC will have duplex stat.
netstat -p : print ip to mac address table known to host
netstat -k : print lot of kernel stat, among it hme0 is for the sun’s build in
happy meal ethernet nic (see sunsolve infodoc 17416 for explanation of these
undocumented stats, good for trobleshooting network latency, comare agaist cisco stat.
netstat -s : show high level packet send/receive/fragment info
vmstat -a : all
-n :
-p : process owning port
iostat -xn 30
: check for disk activity, anything more than 5% busy and avg resp time > 30 ms is bad.
nfsstat
mpstat 10
: processor stats, repeat every 10 seconds
: In Solaris, it reports context switch, interrupt, mutex spin, xcal, etc
: see http://sunsite.uakom.sk/sunworldonline/swol-08-1998/swol-08-perf.html
cpustat : find out what cpu is doing…
lockstat sleep 5
: gather kernel lock stats during the sleep period (5 sec)
: solaris, run as root
truss -c -p PID : find number of system call and usr time for a process (sol). ??
top
protocol
sysmon
trapstat, thread list, kmastat, kmausers
GUDS
Guds is a script to gather performance stats for Solaris.
Sample usage is
./guds_2.4.5
./guds_2.4.5 -qX -H3 -s65040465
-qX is for quite mode
-H3 is for running it for 3 hours
-sNNNNN is the sun case number (info embeded in dirs created by guds to
store the files).
It collects lots of info in /var/tmp/CASEID/guds-DATE-TIME/…
May need lot of know how to analyze data.
Having a baseline when things is good and when there are
performance problems would help.
date; mkfile 1000m test; date
# create a 1 GB file (filled with 0)
date; dd if=/dev/urandom of=test bs=1024 count=100000
# same, file has random data.


