6-Stable: swapinfo has wrong output?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

6-Stable: swapinfo has wrong output?

Rob-34

Hi,

I have upgraded to 6-Stable.
The swapinfo command gives wrong output:

 Device    1K-blocks     Used    Avail Capacity
 /dev/md0     131072    11848   131072     9%

I guess, the math should be:
"1K-blocks" = "Used" + "Avail"

However, "1K-blocks" = "Avail", irrespective
of what is used.

In case of more than one swap device, then
the Total line shows the right numbers.

Is this a bug?

Rob.



               
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: 6-Stable: swapinfo has wrong output?

Michael Butler
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rob wrote:
| Hi,
|
| I have upgraded to 6-Stable.
| The swapinfo command gives wrong output:
|
|  Device    1K-blocks     Used    Avail Capacity
|  /dev/md0     131072    11848   131072     9%
|
| I guess, the math should be:
| "1K-blocks" = "Used" + "Avail"
|
| However, "1K-blocks" = "Avail", irrespective
| of what is used.
|
| In case of more than one swap device, then
| the Total line shows the right numbers.
|
| Is this a bug?

Yes - I noticed it because the nagios plug-in ceased to give me sensible
numbers - I *always* have 100% swap available ;-)

        Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFDfK55iJykeV6HPMURAouiAJwNHf+11/3f4elXIfxi1+ipza9S/QCg/gK8
zMALDxTY9R9MQBDAqI3n9W8=
=ZFnw
-----END PGP SIGNATURE-----
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: 6-Stable: swapinfo has wrong output?

Robert N. M. Watson-2
In reply to this post by Rob-34

On Thu, 17 Nov 2005, Rob wrote:

> I have upgraded to 6-Stable.
> The swapinfo command gives wrong output:
>
> Device    1K-blocks     Used    Avail Capacity
> /dev/md0     131072    11848   131072     9%
>
> I guess, the math should be:
> "1K-blocks" = "Used" + "Avail"
>
> However, "1K-blocks" = "Avail", irrespective of what is used.
>
> In case of more than one swap device, then the Total line shows the
> right numbers.
>
> Is this a bug?

Very much so.  I've committed a fix to HEAD as pstat.c:1.96, which I'll
MFC to 6-STABLE in a few days.  Thanks!

Robert N M Watson
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"