| Table of Contents | Previous Slide | Next Slide |
Software Development in the UNIX Environment
Measuring Program Performance and System Load
Useful Commands:
time - time a command
azure 64% time monte_pi
Enter the number of iterations used to estimate pi: 10000
# of trials= 10000, estimate of pi is 3.1512
0.012u 0.015s 0:02.06 0.9% 0+0k 0+0io 2pf+0w
ps - print information about active processes
azure 76% psPID TTY TIME CMD1174 ttyq9 0:01 tcsh7325 ttyq9 0:00 more7326 ttyq9 0:00 man7327 ttyq9 0:00 man7346 ttyq9 0:00 ul7352 ttyq9 0:00 ps7360 ttyq9 0:02 monte_piw - who is on and what they are doing delta 3% w 8:59am up 29 days, 23:19, 8 users, load average: 5.06, 5.01, 5.00 User tty from login@ idle JCPU PCPU what operator d1 15Sep99 23days -csh dmitriip q2 exos Fri 5pm 14:34 174:11 1 vi initest.m sas q4 azure 8:50am w jwallace q5 poohsticks Fri 8am 2days tcsh jwallace q7 poohsticks 17Sep99 15:54 11 xterm -fn term14 -bg dmitriip q11 exos Fri 5pm 17:00 3:26 xpsview aaa.ps dmitriip q12 exos Fri 6pm 17:03 7:43 7:43 /afs/northstar.dartmo djewell q13 mingus Thu 2pm 18:23 -tcsh
uptime -show how long the system has been up and the average # of jobs in the queue
azure 79% uptime
8:50am up 29 days, 23:11, 8 users, load average: 5.12, 5.05, 5.00
top - display and update information about the top cpu processes
delta 5% top
IRIX64 delta 6.4 02121744 IP27 Load[4.16,4.07,4.01] 15:08:04 87 procs
user pid pgrp %cpu proc pri size rss time command
zctang 13903 13716 98.76 2 8 7998 6691 233:29 adf
zctang 2069 2365 98.56 0 8 7236 5788 39:05 adf
robertd 13082 13054 98.42 1 8 18537 3452 4046:00 l703.exe
robertd 8716 8737 94.58 * 8 18545 8659 1249:23 l1002.exe
sas 2956 2956 0.49 3 20 112 74 0:01 top
dmitriip 3488 3488 0.09 * 18 2511 1193 6:42 matlab
root 824 824 0.05 * 20 171 82 23:25 mediad
root 936 936 0.03 * 20 1549 1442 80:28 dsmc
jwallace 3919 3919 0.02 * 20 222 126 3:06 xload
root 387 655 0.01 * 20 172 97 0:00 sshd.1.2.20
root 826 303 0.01 * 20 149 60 2:59 fam
eugened 4842 4842 0.00 * 20 122 81 0:32 elmd
root 272 0 0.00 * +67 0 0 0:35 nfsd
root 268 0 0.00 * +67 0 0 0:34 nfsd
root 270 0 0.00 * +67 0 0 0:34 nfsd
root 271 0 0.00 * +67 0 0 0:35 nfsd