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

Re: [cobalt-users] Have CPU info sent via mail



----- Original Message -----
From: "Gerald Waugh" <gwaugh@xxxxxxxxxxxxxxxxxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Saturday, June 07, 2003 11:33 PM
Subject: Re: [cobalt-users] Have CPU info sent via mail


> On Sun, 8 Jun 2003, Ren[ISO-8859-1] é Mølsted wrote:
>
> > Hi y'all
> > I'm looking for at way of having theese output sent via mail from a
cronjob
> > containing this:
>
>  make a crontab, of course setup the period, for execution
>
>  cat /proc/cpuinfo | grep temperature | mail -s temperature admin
>  cat /proc/meminfo | mail -s meminfo admin
>  cat /proc/loadavg | mail -s loadavg admin
>
> or
>
> cat /proc/cpuinfo | grep temperature > .stats; cat /proc/meminfo >>
> .stats; cat /proc/loadavg >> .stats; cat .stats | mail -s server-stats
> admin
>
> All on one line, will send to admin, or replace admin with another address
>
> Gerald
> --
> http://frontstreetnetworks.com | http://store.raqware.com
>   Front Street Networks LLC, 229 Front Street, Ste.#C
>   New Haven, CT 06513-3203 | phone: +1-203-785-0699
>
> _____________________________________

How about a perl script that runs on a raq4 every 15 mins and outputs this
to a e mail:

RUN TIME:: 11 SECONDS
ON:: Sunday, June 08, 2003 17:02:12 PM
CPU Temp:: 25 C :: 77 F

5:02pm  up 12:02,  1 user,  load average: 0.03, 0.03, 0.00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
admin    pts/0    albqdslgw1poole1  2:53pm  2:08m  2:25   2:25   top

EXIT CODE:: (0)
SWITCH POSITION:: (Data Logging is ON!)
SWITCH POSITION:: (FTP Transfer is ON!)
MIRROR URL:: http://www.users.qwest.net/~dhyo/pagekeeper/

Just a idea I had fumbled around with... does a few other things as well.

  David Hahn

  PageKeeper Service
  1512 Deborah Road #102
  Rio Rancho, New Mexico 87124 US
  505-892-8723

  http://www.pagekeeperservice.com

  "providing reliable hosting and domain name solutions"
  Internet Programming + Unix/Linux/Sun/Cobalt Consulting

  Outgoing mail is certified Virus Free.
  Checked by Symantec anti-virus system (http://www.symantec.com/).
  Version: 9.00.68b / Virus Database Updated Hourly

  This E Mail transmission and any accompanying attachments contain
  confidential information intended only for the use by the individual
  or entity named above. Any dissemination, distribution, copying or
  action taken in reliance on the contents of this E Mail by anyone
  other than the intended recipient, is strictly prohibited. If you
  have received this E Mail in error please immediately delete it and
  notify sender to stop any future mailings.