New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
Monit
Edit: Didn't see the 32mb part. Maybe you'ld require just a shell script that runs every minute.
use NodeQuery.
Here you go:
Make sure you have bc in your system and call this, say, once a minute.
One might ask - why am I multiplying the number by 100? Well it is because bash cannot compare floats so that is one dirty way to solve that
EDIT: one thing to note, this way you are not really monitoring "cpu usage". Well, you are, but only "sort of". A bunch of other stuff will matter too, like i/o latency etc.
You may also want a file based log, so you're not bombarded by emails every minute you're over 90%.
You could write the date/time to file, and check if the last alert was sent within X minutes from the last email.
delete
Yeah nodequery is good
Im using nodequery
I doubt it'll be ideal on a system with 32MB RAM.
@Mun has a status script that monitors load. On my NanoVZ it reboots if load reaches 0.95 and that's why ryan loves me :P
You'll want to look into solutions like NodeWatch.
you can get load:
you can get cpu usage:
so all script will look like this:
https://github.com/Munroenet/serverstatus