Resource usage. Was: Headline - Linux misses Windows of opportunity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



John:

> This is a script I use on all my machines.  Feel free to hack as 
> required.
>
> #!/bin/bash
>
> [snip]
>
> cat /proc/meminfo | grep ^Swap: | awk 'BEGIN {n = 3; d = 4} {total = 
> $2 / 1024 ; used = $3 / 1024; if((total * n) < (used * d
> )) { printf "Swap usage is over %d/%d\n", n, d}}'

Be careful, this will no longer work in CentOS 4 because the format of 
/proc/meminfo has changed.

Alfred


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux