Re: [gentoo-user] Time format in log files

2008-01-29 Thread Jan Seeger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 29. Jan, Jan Seeger spammed my inbox with On Tue, 29. Jan, Peter Humphrey spammed my inbox with On Monday 28 January 2008 16:43:29 Jan Seeger wrote: snip Nope. I pasted that into a file called pipe, and it still returns Unix time

Re: [gentoo-user] Time format in log files

2008-01-29 Thread Jan Seeger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 29. Jan, Peter Humphrey spammed my inbox with On Monday 28 January 2008 16:43:29 Jan Seeger wrote: snip Nope. I pasted that into a file called pipe, and it still returns Unix time stamps, thus: $ grep completed /var/log/emerge.log |

Re: [gentoo-user] Time format in log files

2008-01-29 Thread Peter Humphrey
On Monday 28 January 2008 16:43:29 Jan Seeger wrote: perl -npe '/^\[(\d+)\]/; @times = localtime $1; $times[4]++; $times[5]+=1900; s/\[\d+\]/$times[2]:$times[1] $times[3].$times[4].$times[5]/;' Just pipe your log through that and you will get beautiful (european) dates instead of

Re: [gentoo-user] Time format in log files

2008-01-29 Thread Etaoin Shrdlu
On Tuesday 29 January 2008, Peter Humphrey wrote: Yes, it does here too*. I'm still scratching my head over how to pipe it into a command to filter grep output, but without involving much typing; that's why I went looking for someone else's solution. You probably already thought about this,

Re: [gentoo-user] Time format in log files

2008-01-28 Thread Etaoin Shrdlu
On Sunday 27 January 2008, Mick wrote: On Sunday 27 January 2008, Greg Bowser wrote: Hi, Those dates are in a format called unix timestamps, which represent the number of seconds since the unix epoch (Jaunuary 1st, 1970). You can get the current unix timestamp via the date command (date

Re: [gentoo-user] Time format in log files

2008-01-28 Thread Peter Humphrey
On Sunday 27 January 2008 21:54:23 Mick wrote: Hi All, I am sure that someone has asked this before, but a cursory look doesn't bring anything up. I am going through some logs and I cannot understand what the time was when certain events took place: [1200806556] SERVICE ALERT:

Re: [gentoo-user] Time format in log files

2008-01-28 Thread William Kenworthy
What you are looking at is a unix timestamp - seconds since 1/1/70 (from memory) A number of log analysers will convert it for you. I pipe squid logs and the like through cat logfile|ccze -C which will do the conversion on the fly. BillK On Mon, 2008-01-28 at 10:21 +, Peter Humphrey

Re: [gentoo-user] Time format in log files

2008-01-28 Thread Peter Humphrey
On Monday 28 January 2008 12:07:45 William Kenworthy wrote: What you are looking at is a unix timestamp Yes, we've established that. A number of log analysers will convert it for you. I pipe squid logs and the like through cat logfile|ccze -C which will do the conversion on the fly. $

Re: [gentoo-user] Time format in log files

2008-01-28 Thread Etaoin Shrdlu
On Monday 28 January 2008, Peter Humphrey wrote: $ grep completed /var/log/emerge.log | ccze -C gives lines like this: 1197637365: ::: completed emerge (57 of 207) app-doc/xorg-docs-1.4-r1 to / and then the whole lot disappears at the end of the listing. I can't see anything in the manual

Re: [gentoo-user] Time format in log files

2008-01-28 Thread Jan Seeger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 28. Jan, Peter Humphrey spammed my inbox with On Sunday 27 January 2008 21:54:23 Mick wrote: Hi All, I am sure that someone has asked this before, but a cursory look doesn't bring anything up. I am going through some logs and I

[gentoo-user] Time format in log files

2008-01-27 Thread Mick
Hi All, I am sure that someone has asked this before, but a cursory look doesn't bring anything up. I am going through some logs and I cannot understand what the time was when certain events took place: [1200806556] SERVICE ALERT: router.xxx [1200806576] SERVICE ALERT:

Re: [gentoo-user] Time format in log files

2008-01-27 Thread Greg Bowser
Hi, Those dates are in a format called unix timestamps, which represent the number of seconds since the unix epoch (Jaunuary 1st, 1970). You can get the current unix timestamp via the date command (date +%s). As far as any command-line utility to convert them,I leave that to Google. However, most

Re: [gentoo-user] Time format in log files

2008-01-27 Thread Mick
On Sunday 27 January 2008, Greg Bowser wrote: Hi, Those dates are in a format called unix timestamps, which represent the number of seconds since the unix epoch (Jaunuary 1st, 1970). You can get the current unix timestamp via the date command (date +%s). As far as any command-line utility to