question obout "vmstat" and "sar -r" "swap -l"

question obout "vmstat" and "sar -r" "swap -l"

Post by Michae » Sun, 10 Sep 2000 06:54:00



I am using a Solaris 8 in a PC. Now I have a question:

Q: How to calculate how many free swap available?

 I used "sar" and "vmstat:" and "swap" comands, I got different results,
what difference between them.

# sar -r 2
SunOS ccwl 5.8 Generic i86pc    09/06/00

00:54:57 freemem freeswap
00:54:59   14074   376432

# vmstat -S
 procs     memory            page            disk          faults      cpu
 r b w   swap  free  si  so pi po fr de sr cd cd cd f0   in   sy   cs us sy
id
 0 0 0 189596 53260   0   0 51  0  0  0  0  5  0  0  0  121  292   85  1  2
97

# swap -l
swapfile                  dev    swaplo blocks   free
/dev/dsk/c0d0s1     102,1       8  303400 303400

 
 
 

question obout "vmstat" and "sar -r" "swap -l"

Post by Niclas Mor » Sun, 10 Sep 2000 21:37:46


Michael,

sar reports in blocks

vmstat reports in Kb; Without options, vmstat displays a one-line
summary since the system was booted. Therefore: never trust the output
of the first line.

swap -l shows you the swap available in blocks, but does not include
swap space in  the  form of physical memory.

Hope this helps...

 - Niclas


> I am using a Solaris 8 in a PC. Now I have a question:

> Q: How to calculate how many free swap available?

>  I used "sar" and "vmstat:" and "swap" comands, I got different results,
> what difference between them.

> # sar -r 2
> SunOS ccwl 5.8 Generic i86pc    09/06/00

> 00:54:57 freemem freeswap
> 00:54:59   14074   376432

> # vmstat -S
>  procs     memory            page            disk          faults      cpu
>  r b w   swap  free  si  so pi po fr de sr cd cd cd f0   in   sy   cs us sy
> id
>  0 0 0 189596 53260   0   0 51  0  0  0  0  5  0  0  0  121  292   85  1  2
> 97

> # swap -l
> swapfile                  dev    swaplo blocks   free
> /dev/dsk/c0d0s1     102,1       8  303400 303400


 
 
 

question obout "vmstat" and "sar -r" "swap -l"

Post by James A. William » Tue, 12 Sep 2000 19:59:12


swap -s is probably the best tool for determing free swap space (xxxxxk
available).

> I am using a Solaris 8 in a PC. Now I have a question:

> Q: How to calculate how many free swap available?

>  I used "sar" and "vmstat:" and "swap" comands, I got different results,
> what difference between them.

> # sar -r 2
> SunOS ccwl 5.8 Generic i86pc    09/06/00

> 00:54:57 freemem freeswap
> 00:54:59   14074   376432

> # vmstat -S
>  procs     memory            page            disk          faults      cpu
>  r b w   swap  free  si  so pi po fr de sr cd cd cd f0   in   sy   cs us sy
> id
>  0 0 0 189596 53260   0   0 51  0  0  0  0  5  0  0  0  121  292   85  1  2
> 97

> # swap -l
> swapfile                  dev    swaplo blocks   free
> /dev/dsk/c0d0s1     102,1       8  303400 303400