Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 musing on the Monastery: (7)
As of 2015-07-05 10:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls