Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Syslog files revisited

by johngg (Abbot)
on Aug 02, 2012 at 22:38 UTC ( #985108=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    knoppix@Microknoppix:~$ perl -Mstrict -Mwarnings -E '
    > my $line = q{May  2 04:06:15 lon-pop.mail.mydom.com pop3login: LOGOU
    +T, user=gonenow, ip=[::ffff:127.0.0.1], top=0, retr=0, rcvd=24, sent=
    +5560, time=1};
    ...
    > say $csv;'
    02/05/2012 04:06:15,lon-pop.mail.mydom.com,pop3login,LOGOUT, user=gone
    +now, ip=[::ffff:127.0.0.1], top=0, retr=0, rcvd=24, sent=5560, time=1
    knoppix@Microknoppix:~$ 
    
  2. or download this
    knoppix@Microknoppix:~$ perl -Mstrict -Mwarnings -E '
    > my $line = q{May  2 04:06:15 lon-pop.mail.mydom.com pop3login: LOGOU
    +T,  user=gonenow, ip=[::ffff:127.0.0.1], top=0, retr=0, rcvd=24, sent
    +=5560, time=1};
    ...
    > say $csv;'
    02/05/2012 04:06:15,lon-pop.mail.mydom.com,pop3login,"LOGOUT, user=gon
    +enow, ip=[::ffff:127.0.0.1], top=0, retr=0, rcvd=24, sent=5560, time=
    +1",gonenow,::ffff:127.0.0.1
    knoppix@Microknoppix:~$ 
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985108]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-04-21 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (495 votes), past polls