General discussion

Locked

Swap Mem info for Solaris

By rbhide ·
Hello Folks,
I am new to solaris. I am writing a process monitoring program,
where I need to display the swap memory details.
I am confused with the different figures I am getting for the swap reporting utilities such as:
********************************************************
-> swap
$>swap -s
total: 733544k bytes allocated + 62376k reserved = 795920k used, 489800k available
Also
$>swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0t0d0s1 32,1 16 1050752 264512
/export/home/swap/file1 - 16 409584 290352
/export/home/swap/file2 - 16 409584 314320
----------------------------------------------------------
-> df
$>df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 1600563 1461964 90583 95% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
swap 487896 0 487896 0% /var/run
swap 732224 244328 487896 34% /tmp
/dev/dsk/c0t0d0s7 15269571 13722010 1394866 91% /export/home
-----------------------------------------------------------------------
-> sar
$>sar -r 1

SunOS 5.8 Generic sun4u 07/08/02

15:25:07 freemem freeswap
15:25:08 3184 969141
****************************************************************
Which of the above can be used to compare my codes o/p?
I would appreciate your help in this regrads in form of some C sample code snippet(if possible).
Thanks,
Rajan

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Linux Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums