[mrtg] mrtg-ping-probe is working and another question

Paul C. Williamson pwilliamson at MANDTBANK.COM
Thu Nov 16 15:46:45 MET 2000

I just wanted to give everyone who helped with getting the 
mrtg-ping-probe script working a big thanks!  Works like a charm 
and I am quite happy with how things look.  

Now, for another question.  This is completely perl, but it seems
like there are a lot of people on this list who know perl...

I want to rank my routers in order of 'uptime.'  I have a script
that already ranks branches based on average traffic %
for the day, so that's what I'm basing most of my code on.

The snippet of code I *think* I need to modify is:

 for $line (@html)  {
                if ($line =~ /\(\d*.\d*%\)/) {
                   push(@utilization, $line);
                if ($line =~ /<TITLE>/) {
                   push(@dev_string, $line);

Since I didn't write this program and only know enough about 
perl to be dangerous, how can I change this to look for the 
string 'had been up for'?  

I'm pretty sure the first if statement is what I want to focus on.

I think the second if statement pushes the name of the router 
into the '@dev_string' array.

As always, thanks to anyone who can help out...


Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the mrtg mailing list