In case you have the feeling that your backups are experiencing performance problems and you want to know if this is due to a bottleneck in system memory or CPU.
There is an easy way to show how much cpu percentage or the amount of memory used by every single process using the PS command:
Sorted by CPU percentage used:
[root@test /]# ps --sort -pcpu -eo pid,uname,pcpu,vsz,args
PID USER %CPU VSZ COMMAND
52018 root 37.8 139424 vbda -out /dev/null
52030 root 1.0 139424 vbda -out /dev/null
2155 root 0.1 636100 /opt/omni/lbin/rds -d
2769 hpdp 0.1 811288 nautilus
[...]
Sorted by Memory used: (KBytes)
[root@test /]# ps --sort -vsz -eo pid,ppid,uname,pcpu,vsz,args
PID PPID USER %CPU VSZ COMMAND
25163 25162 root 0.1 3042164 java -Xmx512m -classpath
47514 47513 root 0.1 3042164 java -Xmx512m -classpath
2189 1 root 0.0 702684 /opt/omni/java/server/bin/uiproxyd
2155 1 root 0.2 636100 /opt/omni/lbin/rds -d
[...]
The above syntax is for Linux. There might be slight changes to the format strings (the equivalent for "uname" is "user" in HPUX). But you can find much more details in the PS command man page.
NOTE: The "-o" parameter is not working on HPUX unless you force the XPG4 syntax by setting the UNIX95 environment variable to any value.
# UNIX95=1 ps -eo pid,ppid,user,pcpu,vsz,args
PID PPID USER %CPU VSZ COMMAND
0 0 root 0.02 0 swapper
1 0 root 0.04 1936 init
13 0 root 0.00 0 net_str_cached
12 0 root 0.00 0 usbhubd
11 0 root 0.06 0 escsid
10 0 root 0.02 0 ttisr