Resource monitor
Hi,
Basically im after a little script or program that will email me if ever the system gets overloaded. Anyone know of any? |
I don't know of one but if you mean like CPU usage then you could just write something to monitor the output from sar.
|
I've tried with sar but still not the best with scripting,
I've tried doin sar 2 5 > tmp0.log chk=`tail -c 6 tmp0.log` but I cant seem to get the if command to work with it. I've also tried awk '/Average/ { t=$6 }' tmp0.log but with no luck :( |
Sorry - I've been away for a few days.
What is it you want to extract from the output? |
In the end I would like it to email me with the box IP if the CPU/'s gets overloaded.
|
Here is a perl script
Code:
#!/usr/bin/perl |
Thx alot!
u've saved me a few more migraines :) I'll give it a go when i get a mo |
All times are GMT -5. The time now is 07:44 PM. |