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

Re: [cobalt-users] CPU Usage Logs



Theodore Jones schrieb:
> 
> Hans,
> 
> I was wondering if you could send me that little shell-script for doing this?
> Sounds interesting?   

simple, doesn`t need even to be a script, a one-liner is sufficient
(that`s bash/linux; easy things are easy, difficult things are possible
:-)

cat /proc/cpuinfo | grep temp | mail sys 
                                     ^^^ or another email adress

you can execute this command directly via cron. my script (don`t have it
anymore, as the cpu temp is not soooo useful :-) did nothing else but a
nicer output; added something like "the current cpu temp is ** degrees".

>How would you also recommend doing this same sort of
> automatic-call to a cell phone/pager if my RaQ3i completely crashes?....

that`s not possible with one box (if it crashes, it can`t send mail
anymore).
of course, you can let send it every 15 min. a "hello world, here i am"
mail. if it doesn`t arrive, you can assume that something went wrong.
quite annoying...

if you have another box available, you can ping it regularly (e.g. every
2 minutes), and if it doesn`t respond to 2 or 3 pings (6 minutes),
something bad is happening. (if you didn`t disable ping responses for
security reasons). if you need it for windoze (remember, under linux
it`s a twin-liner...), look for "what`s up" by ipswitch.

if you want to to some more sophisticated checks (services), things are
more difficult, as you have to know the protocols (ftp, http, smtp, pop,
etc.). the cobalt active monitor, however, does that for you and informs
you if a service is not responding. it can`t do that of course if
sendmail is down.

there are certain tools to do this job for single hosts or entire
networks, like netsaint or big brother.

i`m writing a modular perl script that does this checks too (ip based)
and some other (security related) checks, but it is still very very
alpha, and maybe will not be published. if i`ll publish it, i`ll
announce it here.

cell alert : i added an email account to the admin mail adress in the
gui, that notifies my cell phone for incoming mails via sms. this
service is offered by my cell phone provider. similar services should be
available in the US. an own gateway should is overkill for this.

hope it helps. happy hacking.

-- 

H. P.  Stroebel, Germany

CGI-FAQ for Raq-Newbies :
http://users.iol.it/hpstr/

A problem to some is a 'feature' to others.