errclear命令格式:

 
  
  1. # errclear  
  2. 0315-136 Number of days is required, and must be zero or greater.  
  3. Usage:  
  4. errclear -J err_label_list -K err_label_list -N resource_name_list  
  5.          -R resource_type_list -S resource_class_list -T err_type_list  
  6.          -d err_class_list -i filename -m machine_id -n node_id  
  7.          -j id_list -k id_list -l seq_no_list -y filename number_of_days   
  8.  
  9. Delete error log entries in the specified list that are older than  
  10. number_of_days specified.  Number_of_days refers to the number of twenty  
  11. four hour periods from command invocation time.  
  12. -J list       Select only error_labels     in 'list'.  
  13. -K list       Select only error_labels not in 'list'.  
  14. -N list       Select only resource_names   in 'list'.  
  15. -S list       Select only resource_classes in 'list'.  
  16. -R list       Select only resource_types   in 'list'.  
  17. -T list       Select only error_types      in 'list'.  
  18. -d list       Select only error_classes    in 'list'.  
  19. -i filename   Uses the error log file specified by the filename parameter.  
  20. -j list       Select only error_ids        in 'list'.  
  21. -k list       Select only error_ids  not   in 'list'.  
  22. -l list       Select sequence_numbers in 'list'.  
  23. -m machine_id Delete entries for the machine id as output by uname -m.  
  24. -n node_id    Delete entries for the node id    as output by uname -n.  
  25. -y filename   Uses the error record template file specified by the filename  
  26.               parameter.  
  27.  
  28. 'list' is a list of entries separated by commas.  
  29. error_type  = PERM,TEMP,PERF,PEND,UNKN,INFO  
  30. error_class = H (HARDWARE), S (SOFTWARE), O (errlogger MESSAGES), U (UNDETERMINED)  
  31.  

 

 

示例:


 
  
  1. #errclear n  
  2. n为0时清除所有日志,n>0 时为清除指定天数前的日志  
  3.  
  4. #errclear -d [S,O,H,U] 15  
  5. 删除15天前的SOHU类错误日志  
  6.  
  7. #errclear -j AA8AB241 15  
  8. 删除15天前IDENTIFIER为AA8AB241的错误日志  
  9.  
  10. #errclear -T INFO 0  
  11. 删除所有类型为INFO的日志