Analysing Process CPU Usage

The netpmon command can be used to find out how much CPU time a process is using and of that, how much time is spent executing network related code. For example:

netpmon -o /tmp/netpmon.out -O cpu -v; sleep 30; trcstop

will write a report to /tmp/netpmon.out and exit after 30 seconds.