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

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



Alfred von Campe wrote:

> 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.
Don't you hate that.  I'll change it to extract values like the rest of 
the script.

It is not that big a problem though, because I have found that if a 
machine gets to 3/4 swap usage it is going down big time and a warning 
email is not going to save it.  Any email you send about the problem 
won't delivered until after you give the box the big finger... 
especially if the machine is your mail server.

John.

> 
> Alfred
> 
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
> 
> 
> 


-- 
John Newbigin
Computer Systems Officer
Faculty of Information and Communication Technologies
Swinburne University of Technology
Melbourne, Australia
http://www.ict.swin.edu.au/staff/jnewbigin


[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