[rrd-users] Re: two sh scripts

Darryl Lewis Lewis.Darryl at abc.net.au
Fri Sep 8 09:11:56 MEST 2006


ok, it all looks fairly good, but just needs a few improvements.

1. first thing is that I'd change your crontab to 

* * * * *   root    /home/ram.sh >/dev/null 2>&1
* * * * *   root    /home/test.sh >/dev/null 2>&1

It still runs every minute, but gets rid of a bit of maths that the cron process has to do.

2. Don't run it as root. That is generally a bad idea, as running as root you can make some big accidents. Create another user and run it as that. (this isn't causing your problem, but is just a good idea when working with unix)

3. The rrd call stuff looks ok at a casual glance (perhaps someone with a more critical eye could take a look to double check) so I'll assume it running fine.

4. That leaves us with the data gathering. Add in some local logging so you can see if what you are getting is really a number

update `cat /proc/meminfo | grep "MemTotal\|MemFree\|SwapTotal\|SwapFree" |awk '{ print $2 }'`
echo $TIMESTAMP `cat /proc/meminfo | grep "MemTotal\|MemFree\|SwapTotal\|SwapFree" |awk '{ print $2 }'` >> ram.txt

I suspect there might be occurances of Nan (not a number) comming from your scripts.

I can't reach the 'test.txt' file, so put some similar logging into that.

kind regards
Darryl



-----Original Message-----
From: rrd-users-bounce at list.ee.ethz.ch
[mailto:rrd-users-bounce at list.ee.ethz.ch]On Behalf Of VladoPortos
Sent: Friday, 8 September 2006 4:47 PM
To: rrd-users at list.ee.ethz.ch
Subject: [rrd-users] Re: two sh scripts


Hmm there is no load on server this two script are basicly only thing 
running there ( its test server soly for thistesting there is nothing 
which use more that 2% of cpu) P4 3Ghz and 1.5GB ram...

Scripts are here
http://vladoportos.bancodata.eu/ram.txt  - show free ram
http://vladoportos.bancodata.eu/test.txt - show temperatures

in cron they are writted as:

0-59/1 * * * *   root    /home/ram.sh >/dev/null 2>&1
0-59/1 * * * *   root    /home/test.sh >/dev/null 2>&1

all scripts, graphs,rrds are located in /home

what it does can be seen here:

http://86.110.225.209/ram.png
http://86.110.225.209/test.png

notice that holes....

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi


==============================================================================
The information contained in this email and any attachment is confidential and
may contain legally privileged or copyright material.   It is intended only for
the use of the addressee(s).  If you are not the intended recipient of this
email, you are not permitted to disseminate, distribute or copy this email or
any attachments.  If you have received this message in error, please notify the
sender immediately and delete this email from your system.  The ABC does not
represent or warrant that this transmission is secure or virus free.   Before
opening any attachment you should check for viruses.  The ABC's liability is
limited to resupplying any email and attachments
==============================================================================

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list