Subject: Re: HEADS UP: UBC code integrated
To: Simon Burge <simonb@wasabisystems.com>
From: Jeremy C. Reed <reed@reedmedia.net>
List: current-users
Date: 11/30/2000 08:21:29
On Thu, 30 Nov 2000, Simon Burge wrote:
> alpha:netbsd/projects/free 84> ./free.sh
> total used free buffers
> Mem: 122368 77928 44440 46360
> Swap: 2097640 2091608 6032
This is great!
I think I did notice one problem: the "swap used" and "swap free" are
reversed.
rainier:~/scripts$ ./free.sh ; swapctl -s ; top | grep "Memory"
total used free buffers
Mem: 124020 103544 20476 0
Swap: 197564 192316 5248
total: 197568k bytes allocated = 5248k used, 192320k available
Memory: 65M Act, 17M Inact, 616K Wired, 20M Free, 5248K Swap, 188M Swap free
> printf("Swap: %10d %10d %10d\n", totalswap * bpp / 1024,
> (totalswap - swapused) * bpp / 1024, swapused * bpp / 1024);
printf("Swap: %10d %10d %10d\n", totalswap * bpp / 1024,
swapused * bpp / 1024, (totalswap - swapused) * bpp / 1024);
rainier:~/scripts$ ./free.sh ; swapctl -s ; top | grep "Memory"
total used free buffers
Mem: 124020 103544 20476 0
Swap: 197564 5248 192316
total: 197568k bytes allocated = 5248k used, 192320k available
Memory: 65M Act, 17M Inact, 616K Wired, 20M Free, 5248K Swap, 188M Swap free
Thanks for the useful tool (and thanks for the lesson in vmstat).
Jeremy C. Reed
http://www.reedmedia.net/