I installed 'top' last night, from solarisfreeware.com. Top is great, because it gives you a "screen" of system information that updates in place. You can sort and filter the list of processes it displays, and keep track of free memory, CPU usage, etc. Here's an example screen:
last pid: 626; load averages: 0.36, 0.36, 0.32 10:49:03
51 processes: 50 sleeping, 1 on cpu
CPU states: 97.2% idle, 0.5% user, 1.6% kernel, 0.7% iowait, 0.0% swap
Memory: 128M real, 24M free, 42M swap in use, 133M swap free
PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
411 thomasmi 14 25 0 32M 25M sleep 17:36 16.60% iexplorer
230 root 1 59 0 12M 8544K sleep 4:15 1.69% Xsun
514 thomasmi 1 48 0 2068K 1336K cpu0 5:55 0.27% top
367 thomasmi 1 48 0 3940K 2928K sleep 0:01 0.13% cmdtool
333 thomasmi 1 59 0 2924K 2136K sleep 0:03 0.04% olwm
165 root 8 53 0 2188K 1540K sleep 0:02 0.01% nscd
194 root 1 58 0 936K 496K sleep 0:02 0.01% utmpd
192 root 5 30 0 2300K 1688K sleep 0:01 0.00% vold
372 thomasmi 1 49 0 4036K 3040K sleep 0:01 0.00% perfmeter
217 root 5 22 0 2656K 1592K sleep 0:00 0.00% dmispd
128 daemon 3 23 0 2204K 1452K sleep 0:00 0.00% statd
315 root 1 32 0 3152K 2260K sleep 0:00 0.00% rpc.ttdbserverd
335 thomasmi 1 33 0 3816K 2148K sleep 0:00 0.00% olwmslave
218 root 4 33 0 3224K 2096K sleep 0:00 0.00% snmpXdmid
183 root 3 33 0 1148K 664K sleep 0:00 0.00% powerd
In a previous entry I referred to an 'awk' script I wrote that processes the output from /usr/ucb/ps to determine used/free memory. It turns out that the calculation isn't that accurate. Note that 'top' reports that I have about 24M free. Here's the output from my 'memfree' script:
679 /export/home/thomasmi>memfree
16.3593 %
However, 24M is really about 18.25% of memory (128M total). Oh well, I guess it's close enough for government work.