HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Mrtg setup
Operating System - HP-UX
1835348
Members
2882
Online
110078
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 04:50 AM
06-16-2003 04:50 AM
Mrtg setup
Hi,
I have setup MRTG the way Sridhar Bhaskarla descibed it in thread http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd7a2afe90f1cd71190050090279cd0f9,00.html
And this works terrific, although :)
Why does he add two zeros at the end of the file ? I read quiet some docu, but couldn't find it.
He does a get_sar and uses only number system and user and than add two zeros to the input file. Anyone an explanation. I try to make a graph using four lines; user, system, wio and idle. Does anyone have some good (web) documentation about it ?(the way Sridhar uses it is not described in the main Oetker page, so any other than the main Oetker page is very apreciated)
-------------------------------------------------
My modifications :
# cat get_sar.pl
#!/usr/local/bin/perl
use strict;
our @servers=("nlhpunx1n1", "nlhpunx1n2", "nlhpunx2n1", "nlhpunx2n2", "nlhpunx2n3");
our $mrtg="/usr/local/bin/mrtg";
foreach my $server(@servers) {
my @output;
my $LOG="/home/mrtg/log/cpu_${server}.log";
my $CFG="/home/mrtg/cfg/mrtg_${server}.cfg";
my $input = `ssh $server "sar -u 2 5 | tail -1"`;
my @input = split( /\s+/, $input);
push(@output, $input[1]);
push(@output, $input[2]);
push(@output, 0);
push(@output, 0);
open(FH, "> $LOG");
foreach my $number(@output) {
print FH "$number\n";
}
close(FH);
`$mrtg $CFG`;
}
--------------------------
# cat mrtg_nlhpunx1n1.cfg
WorkDir: /home/mrtg/html
Target[cpu.nlhpunx1n1]:`cat /home/mrtg/log/cpu_nlhpunx1n1.log`
MaxBytes[cpu.nlhpunx1n1]: 150
Options[cpu.nlhpunx1n1]: gauge, nopercent
Title[cpu.nlhpunx1n1]: nlhpunx1n1 CPU Usage
PageTop[cpu.nlhpunx1n1]:
WithPeak[cpu.nlhpunx1n1]: dwm
YLegend[cpu.nlhpunx1n1]: CPU (USR vs SYS)
LegendI[cpu.nlhpunx1n1]: User
LegendO[cpu.nlhpunx1n1]: Sys
I have setup MRTG the way Sridhar Bhaskarla descibed it in thread http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd7a2afe90f1cd71190050090279cd0f9,00.html
And this works terrific, although :)
Why does he add two zeros at the end of the file ? I read quiet some docu, but couldn't find it.
He does a get_sar and uses only number system and user and than add two zeros to the input file. Anyone an explanation. I try to make a graph using four lines; user, system, wio and idle. Does anyone have some good (web) documentation about it ?(the way Sridhar uses it is not described in the main Oetker page, so any other than the main Oetker page is very apreciated)
-------------------------------------------------
My modifications :
# cat get_sar.pl
#!/usr/local/bin/perl
use strict;
our @servers=("nlhpunx1n1", "nlhpunx1n2", "nlhpunx2n1", "nlhpunx2n2", "nlhpunx2n3");
our $mrtg="/usr/local/bin/mrtg";
foreach my $server(@servers) {
my @output;
my $LOG="/home/mrtg/log/cpu_${server}.log";
my $CFG="/home/mrtg/cfg/mrtg_${server}.cfg";
my $input = `ssh $server "sar -u 2 5 | tail -1"`;
my @input = split( /\s+/, $input);
push(@output, $input[1]);
push(@output, $input[2]);
push(@output, 0);
push(@output, 0);
open(FH, "> $LOG");
foreach my $number(@output) {
print FH "$number\n";
}
close(FH);
`$mrtg $CFG`;
}
--------------------------
# cat mrtg_nlhpunx1n1.cfg
WorkDir: /home/mrtg/html
Target[cpu.nlhpunx1n1]:`cat /home/mrtg/log/cpu_nlhpunx1n1.log`
MaxBytes[cpu.nlhpunx1n1]: 150
Options[cpu.nlhpunx1n1]: gauge, nopercent
Title[cpu.nlhpunx1n1]: nlhpunx1n1 CPU Usage
PageTop[cpu.nlhpunx1n1]:
nlhpunx1n1 CPU (SYSTEM Vs USER)
WithPeak[cpu.nlhpunx1n1]: dwm
YLegend[cpu.nlhpunx1n1]: CPU (USR vs SYS)
LegendI[cpu.nlhpunx1n1]: User
LegendO[cpu.nlhpunx1n1]: Sys
@yourservice
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP