Changes

From SME Server
Jump to navigationJump to search
26 bytes added ,  00:41, 25 January 2014
m
Line 282: Line 282:     
===Parse all Logs to find errors===
 
===Parse all Logs to find errors===
Parse all logs and write the output to a file text named with the date of day. For example log012214
+
Parse all logs and write (under /root) the output to a text file named with the date of day. For example log012214:
    
  find /var/log/ -mtime -2 -print -exec sh -c 'cat "{}" | tai64nlocal | egrep -i "useless|warn|fail|error|disable|remov|unable|exit"' \; > "log$(date +'%m%d%y')" 2>&1
 
  find /var/log/ -mtime -2 -print -exec sh -c 'cat "{}" | tai64nlocal | egrep -i "useless|warn|fail|error|disable|remov|unable|exit"' \; > "log$(date +'%m%d%y')" 2>&1
then
+
then:
 +
cd /root
 
  less log012214
 
  less log012214
  

Navigation menu