Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Error in loadavg_multi.pl

 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
torstentfk
Cacti User


Joined: 05 Apr 2005
Posts: 181
Location: Munich, Germany

PostPosted: Fri Sep 26, 2008 4:06 am    Post subject: Error in loadavg_multi.pl Reply with quote

in ./scripts/loadavg_multi.pl there is a small type for the output:

orig:
Code:
#!/usr/bin/perl

#get load avg for 1;5;10 min
open(PROCESS, "uptime |");
$avg = <PROCESS>;
close(PROCESS);

#   9:36pm  up 15 days, 11:37,  2 users,  load average: 0.14, 0.13, 0.10

$avg =~ s/^.*:\s(\d+\.\d{2}),?\s(\d+\.\d{2}),?\s(\d+\.\d{2})$//;

print "1min:$1 5min:$2 10min:$3";


the 10min in the last line must be 15min for the output comment.

Torsten
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group