FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 12-21-2010, 03:09 PM
Matt
 
Default Graphing System Load MRTG

I check system load like so:

[root@server cron.daily]# w
10:07:33 up 4 days, 15:01, 2 users, load average: 4.22, 3.17, 3.09

I would like to to graph the 3.17 5 minute average with MRTG. Anyone
know of some examples of doing this?
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2010, 03:16 PM
Les Mikesell
 
Default Graphing System Load MRTG

On 12/21/2010 10:09 AM, Matt wrote:
> I check system load like so:
>
> [root@server cron.daily]# w
> 10:07:33 up 4 days, 15:01, 2 users, load average: 4.22, 3.17, 3.09
>
> I would like to to graph the 3.17 5 minute average with MRTG. Anyone
> know of some examples of doing this?

Where you should start depends on how much else you would like to
monitor. Cacti is probably the easiest thing to set up for a small
number of machines and not unreasonable for a single host monitoring
itself. I like OpenNMS but it is overkill for a small setup.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2010, 03:25 PM
Matt
 
Default Graphing System Load MRTG

>> I check system load like so:
>>
>> [root@server cron.daily]# w
>> * 10:07:33 up 4 days, 15:01, *2 users, *load average: 4.22, 3.17, 3.09
>>
>> I would like to to graph the 3.17 5 minute average with MRTG. *Anyone
>> know of some examples of doing this?
>
> Where you should start depends on how much else you would like to
> monitor. *Cacti is probably the easiest thing to set up for a small
> number of machines and not unreasonable for a single host monitoring
> itself. *I like OpenNMS but it is overkill for a small setup.

I already have MRTG installed and am somewhat familiar with it. Graph
interfaces with it. I was thinking an MRTG config and perhaps a shell
script for it to call.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2010, 03:34 PM
Les Mikesell
 
Default Graphing System Load MRTG

On 12/21/2010 10:25 AM, Matt wrote:
>>> I check system load like so:
>>>
>>> [root@server cron.daily]# w
>>> 10:07:33 up 4 days, 15:01, 2 users, load average: 4.22, 3.17, 3.09
>>>
>>> I would like to to graph the 3.17 5 minute average with MRTG. Anyone
>>> know of some examples of doing this?
>>
>> Where you should start depends on how much else you would like to
>> monitor. Cacti is probably the easiest thing to set up for a small
>> number of machines and not unreasonable for a single host monitoring
>> itself. I like OpenNMS but it is overkill for a small setup.
>
> I already have MRTG installed and am somewhat familiar with it. Graph
> interfaces with it. I was thinking an MRTG config and perhaps a shell
> script for it to call.

You can do that - but if you install cacti it is already set up with the
web interface to view it and a framework to add other things. You do
need to set up snmpd if you haven't already - although it has been a
while since I used cacti - it might have something special for localhost
collection.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2010, 03:41 PM
 
Default Graphing System Load MRTG

Matt writes:
> I check system load like so:
>
> [root@server cron.daily]# w
> 10:07:33 up 4 days, 15:01, 2 users, load average: 4.22, 3.17, 3.09
>
> I would like to to graph the 3.17 5 minute average with MRTG. Anyone
> know of some examples of doing this?

$ uptime
16:40:45 up 7 days, 54 min, 20 users, load average: 0.17, 0.17, 0.12
$ snmpget -c community -v2c localhost UCD-SNMP-MIB::laLoadInt.1
UCD-SNMP-MIB::laLoadInt.1 = INTEGER: 14
$ snmpget -c community -v2c localhost UCD-SNMP-MIB::laLoadInt.2
UCD-SNMP-MIB::laLoadInt.2 = INTEGER: 17
$ snmpget -c community -v2c localhost UCD-SNMP-MIB::laLoadInt.3
UCD-SNMP-MIB::laLoadInt.3 = INTEGER: 11
$



---------------------------------------------------------------
This message and any attachments may contain Cypress (or its
subsidiaries) confidential information. If it has been received
in error, please advise the sender and immediately delete this
message.
---------------------------------------------------------------

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2010, 04:05 PM
Matt
 
Default Graphing System Load MRTG

> I check system load like so:
>
> [root@server cron.daily]# w
> *10:07:33 up 4 days, 15:01, *2 users, *load average: 4.22, 3.17, 3.09
>
> I would like to to graph the 3.17 5 minute average with MRTG. *Anyone
> know of some examples of doing this?

Wrote this simple perl script:

#!/usr/bin/perl -w

my $uptime = `uptime`;
my $load = ( split /load/, $uptime )[1];
$load = ( split /,/, $load )[1];
chomp $load;
print "$load
";

It spits out 5 minute load average. Would like to just have MRTG
graph the result every 5 minutes.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2010, 05:30 PM
"Alexander Dalloz"
 
Default Graphing System Load MRTG

>> I check system load like so:
>>
>> [root@server cron.daily]# w
>> *10:07:33 up 4 days, 15:01, *2 users, *load average: 4.22, 3.17, 3.09
>>
>> I would like to to graph the 3.17 5 minute average with MRTG. *Anyone
>> know of some examples of doing this?
>
> Wrote this simple perl script:
>
> #!/usr/bin/perl -w
>
> my $uptime = `uptime`;
> my $load = ( split /load/, $uptime )[1];
> $load = ( split /,/, $load )[1];
> chomp $load;
> print "$load
";

Isn't that a bit overkill?

cut -d"" -f2 /proc/loadavg

> It spits out 5 minute load average. Would like to just have MRTG
> graph the result every 5 minutes.

Alexander


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2010, 05:41 PM
John Jasen
 
Default Graphing System Load MRTG

On 12/21/2010 11:09 AM, Matt wrote:
> I check system load like so:
>
> [root@server cron.daily]# w
> 10:07:33 up 4 days, 15:01, 2 users, load average: 4.22, 3.17, 3.09
>
> I would like to to graph the 3.17 5 minute average with MRTG. Anyone
> know of some examples of doing this?

The easy way or the hard way?

The easy way:

You take the snmpget command someone else previously provided, convert
it to the oid, add it to the appropriate place in your mrtg.cfg (If I
recall correctly).

The hard way:

use one of the shell scripts provided, cat /proc/loadavg, or your perl
script to grab the values, figure out how to stuff them into rrdtool,
then figure out how to convince mrtg to render the resulting rrd files.

Really, the best way is to install cacti, and be done with it, as others
have suggested.

--
-- John E. Jasen (jjasen@realityfailure.org)
-- "Deserve Victory." -- Terry Goodkind, Naked Empire
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2010, 05:57 PM
Les Mikesell
 
Default Graphing System Load MRTG

On 12/21/2010 12:41 PM, John Jasen wrote:
> On 12/21/2010 11:09 AM, Matt wrote:
>> I check system load like so:
>>
>> [root@server cron.daily]# w
>> 10:07:33 up 4 days, 15:01, 2 users, load average: 4.22, 3.17, 3.09
>>
>> I would like to to graph the 3.17 5 minute average with MRTG. Anyone
>> know of some examples of doing this?
>
> The easy way or the hard way?
>
> The easy way:
>
> You take the snmpget command someone else previously provided, convert
> it to the oid, add it to the appropriate place in your mrtg.cfg (If I
> recall correctly).
>
> The hard way:
>
> use one of the shell scripts provided, cat /proc/loadavg, or your perl
> script to grab the values, figure out how to stuff them into rrdtool,
> then figure out how to convince mrtg to render the resulting rrd files.
>
> Really, the best way is to install cacti, and be done with it, as others
> have suggested.

Cacti is in the epel repository, so if you have that configured it is
just 'yum install cacti' and you are pretty much done.

--
Les Mikesell
lesmikesell@gmail.com

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2010, 09:55 PM
Matt
 
Default Graphing System Load MRTG

> Cacti is in the epel repository, so if you have that configured it is
> just 'yum install cacti' and you are pretty much done.

This box is CentOS 4 and has some web hosting software on it. Due to
exclusions its not that easy. ;-(

I manged to make this work with just plain MRTG which was on it already.

/home/../domains/../public_html/systemload/mrtg.cfg

WorkDir: /home/../domains/../public_html/systemload/
Title[index]: System Load
PageTop[index]: <H1>Load</H1>
Target[index]: `/scripts/sysload.pl`
MaxBytes[index]: 300
Options[index]: growright,unknaszero,nopercent,gauge,noinfo
LegendI[index]: Load:
LegendO[index]:
YLegend[index]: Load
XSize[index]: 600
YSize[index]: 150

/scripts/sysload.pl

#!/usr/bin/perl

my $load = `cut -d" " -f2 /proc/loadavg`;
chomp $load;
print "$load
";
print "$load
";

May not be perfect but it works. May needed to be tweaked a bit yet too.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 07:07 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org