Running the perl logrot.pl -v

Unanswered Question
Jul 24th, 2007

I pretty much understand the concept of running the perl logrot.pl -v and -c to minimize the syslog.log files. It is any way I can get to run in a batch file or script to run on a certain schedule or does this has to be done manually? Just curious I'm still learning the product.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Joe Clarke Tue, 07/24/2007 - 09:39

You can schedule it using cron on UNIX or at on Windows.

Once you've verified things work on-demand, you can setup cron on UNIX:

0 1 * * * /opt/CSCOpx/bin/logrot.pl 2>&1 | /usr/lib/sendmail root

or AT on Windows:

at 01:00 /every:M,T,W,Th,F,S,Su C:\progra~1\CSCOpx\bin\perl.exe C:\progra~1\CSCOpx\bin\logrot.pl

(This assumes CiscoWorks is installed in the default location on Windows.)

Those commands will run logrot every day at 1:00 AM. The UNIX cron line will

also send all output of the command to root via email.

Actions

This Discussion