[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ldmstats



Tom,

I looked at the code for mailpqstats, it only checks the last 2 logs
unless the LDM  has been restarted multiple times.  Even though the line

@FILES = split( /[ \t\n]+/, `ls -tx ldmd.log*` ) ;

gets all the ldmd.log files the code only looks at the last two and then
exit the loop


exit condition, i = 0 for ldmd.log and i =1 for ldmd.log.1, etc, theday is
the current day

$lastlog = 1 if( $i && $f[ 1 ] ne $theday ) ;


exit the loop condition, usually after reading ldmd.log.1:

last if( $lastlog ) ;

Of course the code could of been written better, always better at hind
sight.  The problem is that some site don't remove the crontab job 

ldmadmin dostats  after the LDM has been moved to a different machine,
etc.  

I can add a check to not look at logs more that 2 days old to the script
but it's not going to solve the problem. The only way to fix the current
situation is to contact the sites and have them remove the crontab entry.

Actually I was hoping that the whole script would of been able to go away
because it's really inefficient way of finding the LDM topology by
scanning the ldmd.logs

FYI

I'm going to have Jeff contact sites to have more sites install ldmadmin  
dostats and to also to have the old crontabs removed.

Robb....



===============================================================================
Robb Kambic                                Unidata Program Center
Software Engineer III                      Univ. Corp for Atmospheric Research
address@hidden             WWW: http://www.unidata.ucar.edu/
===============================================================================