Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

Running the perl logrot.pl -v

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.

2 REPLIES
Cisco Employee

Re: Running the perl logrot.pl -v

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.

Community Member

Re: Running the perl logrot.pl -v

Thanks, once again I knew I would find the answer here.

154
Views
0
Helpful
2
Replies
CreatePlease to create content