System Administration Guide: Advanced Administration

How to Change Frequency of Printer Request Log Rotation

Starting with the Solaris 2.6 release, the requests log file on the printer server is rotated weekly rather than daily. You can change the rotation interval back to daily if the printer server is busy.

  1. Become superuser or lp on the printer server.

  2. Set the EDITOR environment variable.


    # EDITOR=vi
    # export EDITOR
    
  3. Edit the lp crontab file.


    # crontab -e lp
    
  4. Change the first line of the file which rotates the requests log files every Sunday (0) to an asterisk (*) for daily rotation:


    13 3 * * * cd /var/lp/logs; if [ -f requests ]; then if
    [ -f requests.1 ]; then /bin/mv requests.1 requests.2; fi; /usr/bin/cp 
    requests requests.1; >requests; fi
  5. Save the file and exit.