Cisco Headend Digital Broadband Delivery System Guida Utente

Pagina di 152
 
 
Customize the preserveLog Utility 
4020694 Rev B 
117 
 
Customize the preserveLog Utility 
By default, the preserveLog utility keeps two days of preserved files for each process 
before deleting old files. System operators or engineers can change the number of 
days of log files that are preserved by modifying the code for the preserveLog utility. 
For example, video-on-demand (VOD) and xOD activity is usually higher on 
weekends than it is during the week. Before leaving for the weekend, system 
operators might want to ensure that the system preserves all log files associated with 
VOD and xOD. A simple edit to the preserveLog file accomplishes this. 
Important: Before editing the preserveLog file, note these important points: 
 
Do not attempt to edit the preserveLog file unless you are a skilled user of the 
UNIX vi text editing utility. Call Cisco Services for assistance in editing this file if 
you are unsure of your ability to make the edit yourself. 
 
We recommend that you use only the UNIX vi text editor to make the edits. A 
Windows-based utility may inadvertently introduce Windows control characters 
into the file, often with unpredictable results. 
 
Customizing the preserveLog Utility 
By default, the preserveLog utility saves two days of log files. Follow these 
instructions to change the number of days of log files that are saved by the 
preserveLog utility. 
1  If necessary, open an xterm window on the DNCS. 
2  Type cd  /dvs/dncs/bin and then press Enter
3  Type vi  preserveLog.ksh and then press Enter. The preserveLog file opens for 
editing using the UNIX vi text editor. 
4  Locate the following line:  if [[ $c -gt 2 ]] 
Note:  The 2 in this line represents the number of days of log files that are to be 
preserved. 
5  Replace the 2 with however many days of log files you want to preserve. 
Example:  To save 3 days of data, the line should look like: if [[ $c -gt 3 ]]. For 4 
days, the line should look like: if [[ $c -gt 4 ]]
6  Save the file and close the UNIX vi editor. 
Note:  Remember to change the command back to the default value of 2 days when 
you no longer need the customized entry.