help: cpu graph problem
Moderators: Developers, Moderators
help: cpu graph problem
I have got some problems with the cpu graphs . I would like to have CPU statistics about our Redhat web server(127.0.0.1 or 10.253.133.78) and we get nothing about it. We got just the processes and login number. With the memory, we don't have the right values... What's the problem? I hope someone can help me.
Thank you very much.
seb
Thank you very much.
seb
help: cpu with cacti
Hello! we use SNMP (net-snmp) version 5.1 and CACTI version 0.8.5 . We use the original templates and only the unix templates for the local server work... Can you help me to get the cpu information for my own server? What can I do?
Thank-you very much!
seb
Thank-you very much!
seb
Code: Select all
#!/usr/local/bin/perl
$output = `/usr/local/net-snmp/bin/snmpget -Oav -v2c -c community $ARGV[0] .1.3.6.1.4.1.2021.10.1.3.2`;
$output =~ s/STRING: 0.//;
$output =~ s/STRING: 1.//;
#$output =~ s/\"|\.//g;
print $output;
then just create the necessary data input methings, you can add a variable to replace community with $ARGV[1] but make sure if you do that you create the input for the community in the data input method.
i'm attaching the templates i use, just import it. let me know if this helps.
Morgan
- Attachments
-
- cacti_graph_template_dns_cpu.xml
- (7.69 KiB) Downloaded 236 times
Here's an updated version of that script that'll give you user, sys and idle times.
Code: Select all
#!/usr/bin/perl
%ids = (
user => ".1.3.6.1.4.1.2021.11.9.0",
sys => ".1.3.6.1.4.1.2021.11.10.0",
idle => ".1.3.6.1.4.1.2021.11.11.0"
);
while ( ($key, $value) = each %ids) {
$output = `snmpget -Oav -v2c -c public $ARGV[0] $value`;
chomp($output);
$output =~ s/INTEGER: //;
print "$key:".$output." ";
}
-
- Posts: 5
- Joined: Mon Jul 19, 2004 4:11 am
- Contact:
Take a look at this link http://www.raxnet.net/board/viewtopic.p ... hlight=cpu
-
- Cacti User
- Posts: 311
- Joined: Tue Jun 29, 2004 12:52 pm
- Location: Indiana
I am also running on a RedHat AS 3 box. All of the default unix templates work fine for me. I added the device, and set it's host template to "Local Linux Machine" All of it worked right out of the box. You shouldn't need extra scripts to graph cpu / memory usage. The memory usage by default does not take in to accout buffers that linux puts in memory. See http://www.raxnet.net/board/viewtopic.php?t=4335 for mor information on the memory scripts.
Dave
Who is online
Users browsing this forum: No registered users and 0 guests