I am trying to use the mrtg-archiver that comes in NT distribution of mrtg
(in the contrib directory).
For some reason (my perl is VERY limited) the backup.pl is having a problem
with the $date = (`date +%y%m%d`) line.
Has anybody else got this working? Or does anybody have a better archiver?
What I really want is one that I can pass the .cfg file to, and it archive
the daily graphs (and build an index) for ALL the targets in the .cfg file.
Can anybody help?
Thanks
Richard Palmer
--
* To unsubscribe from the mrtg mailing list, send a message with the
subject: unsubscribe to mrtg-r...@list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
I hacked a very bad version of archiver for NT. I am unhappy with the results
and it does not work the way you would like, however I did get past the date
problem as follows. The problem is that the NT DATE executable does not work
like the Unix one so I used an internal Perl command (localtime). Added a
little Y2K code and some formatting to get it in shape for archiver. There are
lots of other problems to get past, like directory navigation.
# Get date and time of execution
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$cent = 20;
if ( $year >= 98 ) {
$cent = 19;
}
$date = sprintf("%02d%02d%02d%02d",$cent,$year,++$mon,$mday);
$time = sprintf("%02d:%02d:%02d",$hour,$min,$sec);
print "==================================================\n";
print "Starting backup for day $date at $time.\n";
Mike Starkweather