bildiek
home insekten gipfelsturm Riesengebirgit Panoramen Out of Munich sprueche bekannte gaestebuch kontakt


 
 
 
   
 
 
   
 
 
   
 
 
   
 
 
   
 
 
   
 
 
   
 
 
  pano2mpeg (p2m), pano2mpg (p2m), panorama to mpeg converter, panorama to mpg converter, panorama image to mpeg video encoder, suite of tools, suite of shell scripts, generate mpeg movies from panorama images, generate mpg movies from panorama images, p2m_pano, p2m_logo, p2m_zoom, p2m_reverse, p2m_credits, p2m_flip, p2m_transition, panorama to mpeg, panorama to mpg, panorama 2 mpeg, panorama 2 mpg, panoramatompeg, panoramatompg, panorama2mpeg, panorama2mpg, pano to mpeg, panompg, pano 2 mpeg, pano 2 mpg, panotompeg, panotompg, pano2mpeg, pano2mpg,  
 
 
   
 
 
   
 
 
 
Valid HTML 4.01!
 

cronlog_parserin

a perl script for parsing /var/cron/log for errors
xterm

 Usage: cronlog_parserin [-hvl] [-f ]

   h : print this help message
   v : print version
   l : long output
   f : file

 Description:

   Per default cronlog_parserin reads a solaris cron log file from STDIN and
   parses it for Errors which are identified by the string "rc=" and prints
   them in one line to STDOUT:

    cat /var/cron/log | cronlog_parserin

      tofu001 rc=255 CMD: /opt/SUNWfoo/bin/send_trigger_message.sh > /dev/null 2>&1


   Count error records and print a summary:

    cat /var/cron/log | cronlog_parserin | sort | uniq -c 

      2 root rc=1 CMD: /opt/VRTSvcs/bin/start_resource xgdq90 Marginskript euclqsv1
      1 root rc=1 CMD: [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
      8 tofu001 rc=255 CMD: /opt/SUNWfoo/bin/send_trigger_message.sh > /dev/null 2>&1
   

   Print a long and detailed output:

    cat /var/cron/log | cronlog_parserin -l

      CMD: /opt/SUNWfoo/bin/send_trigger_message.sh > /dev/null 2>&1
      tofu001 25965 c Thu Oct 25 09:40:00 2007
      tofu001 25965 c Thu Oct 25 09:40:00 2007 rc=255


   Read from file:

    cronlog_parserin -l -f /var/cron/log


   Handle very large log files:

   Sometimes the cron log file has not been rotated since installation. Handling very
   huge logfiles will take a lot of time!
   If you want to see the latest error records of your cron log file only, write a small
   shell script around the cronlog_parserin:

      #!/bin/bash

      # search for the first match of "Oct", save line number in $a:
      a=`cat -n /var/cron/log |grep "Oct"|head -1|awk '{print $1}'`

      # count up lines, save into $b:
      b=`wc -l cron.log.2007|awk '{print $1}'`
   
      # because the first CMD line does not include a date string:
      a=$(($a - 1))
     
      # calculate the number of lines
      c=$(($b - $a))
 
      # pipe only wanted lines into cronlog_parserin:
      tail -$c cron.log.2007 | cronlog_parserin

   Rotate your cron log file!

 Hint: 
   If you had a grep -A available under solaris you would not need this script 8-/

 Have Fun!
 sylvia
 echo "die_scripterinAT1ooo1.de"|sed 's/AT/@/' # ;-)

        

       
<º))))>< ·´¯`·¸¸><((((*>¸.·´¯`·.¸¸> www.1ooo1.de ><((((º>
«·ath.cx ·»


bild
BSD Daemon

Virtuelle Wanderung durch die Chiemgauer Alpen
Virtuelle Wanderung durch die Chiemgauer Alpen durch 360 Grad Panoramen