Re: [gentoo-user] Converting time formats

2011-05-30 Thread Florian Philipp
Am 30.05.2011 00:18, schrieb Henry Gebhardt:
 On Sat, May 28, 2011 at 09:28:47PM -0500, Dale wrote:

 I went back to the man page, it sort of left the @ out on mine:

 -d, --date=STRING
display time described by STRING, not `now'

 No mention of the @ sign there.  It does say to read the info file but I 
 very rarely get into those.  I never have had any good luck with them.  
 
 May I suggest sending a patch upstream? That'd be pretty cool. Just fix
 it in the right place where everyone will find it. I bet other people
 would appreciate it, too.
 
 
 Thanks,
 
 H
 

Just adding the @ will not be sufficient. The STRING can be in many
different formats. `date -d 'last tuesday'` also works, for example. You
have to add a whole new section to the man page -- or just refer to the
info page ;-)

Regards,
Florian Philipp



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Converting time formats

2011-05-29 Thread Mick
On Sunday 29 May 2011 01:48:17 William Kenworthy wrote:
 On Sat, 2011-05-28 at 11:37 -0500, Dale wrote:
  I asked this once before but I can't find it.  I have a log file that
  has time stamps that look like this:
  
  lastrun = 1306574899
  
  What do I use to get the human time for that?  I thought it was the date
  command but I couldn't find it in the man page.  I tried google but I
  can't recall what that time stamp is called either so not sure what to
  search for.
  
  Could someone enlighten me a little bit here?
  
  Thanks.
  
  Dale
  
  :-)  :-)
 
 As well as your other replies, check out ccze
 
 rattus ~ # esearch ccze
 [ Results for search key : ccze ]
 [ Applications found : 1 ]
 
 *  app-admin/ccze
   Latest version available: 0.2.1-r2
   Latest version installed: 0.2.1-r2
   Size of downloaded files: 136 kB
   Homepage:http://dev.gentoo.org/~joker/ccze/ccze.txt
   Description: A flexible and fast logfile colorizer
   License: GPL-2
 
 
 Pass your log through it for nicely coloured text (words like alarm
 and error are bright red to stand out) as well as converting date
 epoch on the fly, leaving it in context.
 
 BillK

Hmm  

This project is no longer maintained. There's no valid homepage left.
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Converting time formats

2011-05-29 Thread Neil Bothwick
On Sat, 28 May 2011 21:28:47 -0500, Dale wrote:

 No mention of the @ sign there.  It does say to read the info file but
 I very rarely get into those.  I never have had any good luck with
 them. I felt like I was in Hotel California once before.  O_O  I
 couldn't get out.

I thought you were a KDE user? Press Alt-F2, enter info:/date, enjoy :)


-- 
Neil Bothwick

WinErr 00E: Window open - Do not look inside


signature.asc
Description: PGP signature


Re: [gentoo-user] Converting time formats

2011-05-29 Thread William Kenworthy
...
  
  *  app-admin/ccze
Latest version available: 0.2.1-r2
Latest version installed: 0.2.1-r2
Size of downloaded files: 136 kB
Homepage:http://dev.gentoo.org/~joker/ccze/ccze.txt
Description: A flexible and fast logfile colorizer
License: GPL-2
  
  
  Pass your log through it for nicely coloured text (words like alarm
  and error are bright red to stand out) as well as converting date
  epoch on the fly, leaving it in context.
  
  BillK
 
 Hmm  
 
 This project is no longer maintained. There's no valid homepage left.

Interesting! - it still works though, and for such a simple utility, I
dont really care about its maintenance status as long as it keeps
working :)

BillK


-- 
William Kenworthy bi...@iinet.net.au
Home in Perth!




Re: [gentoo-user] Converting time formats

2011-05-29 Thread Peter Humphrey
On Sunday 29 May 2011 01:48:17 William Kenworthy wrote:

 As well as your other replies, check out ccze

[...]

 Pass your log through it for nicely coloured text (words like alarm
 and error are bright red to stand out) as well as converting date
 epoch on the fly, leaving it in context.

That looked interesting, so I tried it. I got the following from cat 
/var/log/emerge.log | ccze -C | tail (sorry about the line wraps, which for 
some reason I can't switch off at the moment in kmail). Not only did it not 
convert the timestamps; it overwrote my command. I did get colours though.

1306665698:  *** exiting unsuccessfully with status 'None'. g/emerge.log | 
ccze -C | tail
1306665698:  *** terminating. 
1306675942: Started emerge on: May 29, 2011 14:32:22 
1306675942:  *** emerge --jobs --buildpkg --keep-going --verbose --nospinner 
--with-bdeps --ask 
ccze 
1306675947:   emerge (1 of 1) app-admin/ccze-0.2.1-r2 to / 
1306675947:  === (1 of 1) Cleaning (app-admin/ccze-0.2.1-
r2::/usr/portage/app-admin/ccze/ccze-0.
2.1-r2.ebuild) 
1306675952:  === (1 of 1) Compiling/Packaging (app-admin/ccze-0.2.1-
r2::/usr/portage/app-admin/c
cze/ccze-0.2.1-r2.ebuild) 
1306675965:  === (1 of 1) Merging (app-admin/ccze-0.2.1-
r2::/usr/portage/app-admin/ccze/ccze-0.2
.1-r2.ebuild) 
1306675968:   AUTOCLEAN: app-admin/ccze:0 
1306675969:  === (1 of 1) Updating world file (app-admin/ccze-0.2.1-r2) 
1306675969:  === (1 of 1) Post-Build Cleaning (app-admin/ccze-0.2.1-
r2::/usr/portage/app-admin/c
cze/ccze-0.2.1-r2.ebuild) 
1306675969:  ::: completed emerge (1 of 1) app-admin/ccze-0.2.1-r2 to / 
1306675969:  *** Finished. Cleaning up... 
1306675970:  *** exiting successfully. 
1306675970:  *** terminating. 

(Something is weird on this box. I posted recently about lockups in flash, 
but I now get them at random times even when flash is not running.)

-- 
Rgds
Peter



Re: [gentoo-user] Converting time formats

2011-05-29 Thread Dale

Neil Bothwick wrote:

On Sat, 28 May 2011 21:28:47 -0500, Dale wrote:

   

No mention of the @ sign there.  It does say to read the info file but
I very rarely get into those.  I never have had any good luck with
them. I felt like I was in Hotel California once before.  O_O  I
couldn't get out.
 

I thought you were a KDE user? Press Alt-F2, enter info:/date, enjoy :)


   


I am.  I use Konsole.  Very rarely use Alt F2 tho.

Dale

:-)  :-)



Re: [gentoo-user] Converting time formats

2011-05-29 Thread Neil Bothwick
On Sun, 29 May 2011 08:55:24 -0500, Dale wrote:

  I thought you were a KDE user? Press Alt-F2, enter info:/date,
  enjoy :)

 I am.  I use Konsole.  Very rarely use Alt F2 tho.

So you use the horrible text interface for info instead of seeing nice
HTML in Konqueror, never mind :)


-- 
Neil Bothwick

Deja Moo: The feeling that you heard this bull somewhere before.


signature.asc
Description: PGP signature


Re: [gentoo-user] Converting time formats

2011-05-29 Thread Dale

Neil Bothwick wrote:

On Sun, 29 May 2011 08:55:24 -0500, Dale wrote:

   

I thought you were a KDE user? Press Alt-F2, enter info:/date,
enjoy :)
   
   

I am.  I use Konsole.  Very rarely use Alt F2 tho.
 

So you use the horrible text interface for info instead of seeing nice
HTML in Konqueror, never mind :)

   

Well, once in a blue moon I do use Konqueror.  I just use man:command here  
instead of info.  Me and info just don't yee haw to well.  LOL I'm going to give info 
a whirl again just for giggles.  There is the kill command if it gets froggy.  o_O

Dale

:-)  :-)



Re: [gentoo-user] Converting time formats

2011-05-29 Thread Henry Gebhardt
On Sat, May 28, 2011 at 09:28:47PM -0500, Dale wrote:
 
 I went back to the man page, it sort of left the @ out on mine:
 
 -d, --date=STRING
display time described by STRING, not `now'
 
 No mention of the @ sign there.  It does say to read the info file but I 
 very rarely get into those.  I never have had any good luck with them.  

May I suggest sending a patch upstream? That'd be pretty cool. Just fix
it in the right place where everyone will find it. I bet other people
would appreciate it, too.


Thanks,

H



Re: [gentoo-user] Converting time formats

2011-05-28 Thread Alex Schuster
Dale asks:

 I asked this once before but I can't find it.  I have a log file that
 has time stamps that look like this:
 
 lastrun = 1306574899
 
 What do I use to get the human time for that?  I thought it was the date
 command but I couldn't find it in the man page.  I tried google but I
 can't recall what that time stamp is called either so not sure what to
 search for.

It's seconds since 1970. You can convert them like this:
date -d @1306574899

Wonko



Re: [gentoo-user] Converting time formats

2011-05-28 Thread Florian Philipp
Am 28.05.2011 18:37, schrieb Dale:
 I asked this once before but I can't find it.  I have a log file that
 has time stamps that look like this:
 
 lastrun = 1306574899
 
 What do I use to get the human time for that?  I thought it was the date
 command but I couldn't find it in the man page.  I tried google but I
 can't recall what that time stamp is called either so not sure what to
 search for.
 
 Could someone enlighten me a little bit here?
 
 Thanks.
 
 Dale
 
 :-)  :-)
 

date --date=@1306574899
looks sensible. I've found this on the info page:
`info date` - Date input formats - Seconds since the Epoch

Hope this helps,
Florian Philipp



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Converting time formats

2011-05-28 Thread Dale

Alex Schuster wrote:

Dale asks:

   

I asked this once before but I can't find it.  I have a log file that
has time stamps that look like this:

lastrun = 1306574899

What do I use to get the human time for that?  I thought it was the date
command but I couldn't find it in the man page.  I tried google but I
can't recall what that time stamp is called either so not sure what to
search for.
 

It's seconds since 1970. You can convert them like this:
date -d @1306574899

Wonko

   


So it was the -d option.  I thought that was it but I missed the @ 
sign.  I added that to my list of common commands so I won't forget.


Thanks much for both replies.

Dale

:-)  :-)



Re: [gentoo-user] Converting time formats

2011-05-28 Thread William Kenworthy
On Sat, 2011-05-28 at 11:37 -0500, Dale wrote:
 I asked this once before but I can't find it.  I have a log file that 
 has time stamps that look like this:
 
 lastrun = 1306574899
 
 What do I use to get the human time for that?  I thought it was the date 
 command but I couldn't find it in the man page.  I tried google but I 
 can't recall what that time stamp is called either so not sure what to 
 search for.
 
 Could someone enlighten me a little bit here?
 
 Thanks.
 
 Dale
 
 :-)  :-)
 

As well as your other replies, check out ccze

rattus ~ # esearch ccze
[ Results for search key : ccze ]
[ Applications found : 1 ]

*  app-admin/ccze
  Latest version available: 0.2.1-r2
  Latest version installed: 0.2.1-r2
  Size of downloaded files: 136 kB
  Homepage:http://dev.gentoo.org/~joker/ccze/ccze.txt
  Description: A flexible and fast logfile colorizer
  License: GPL-2


Pass your log through it for nicely coloured text (words like alarm
and error are bright red to stand out) as well as converting date
epoch on the fly, leaving it in context.

BillK



-- 
William Kenworthy bi...@iinet.net.au
Home in Perth!




Re: [gentoo-user] Converting time formats

2011-05-28 Thread Dale

William Kenworthy wrote:

As well as your other replies, check out ccze

rattus ~ # esearch ccze
[ Results for search key : ccze ]
[ Applications found : 1 ]

*  app-admin/ccze
   Latest version available: 0.2.1-r2
   Latest version installed: 0.2.1-r2
   Size of downloaded files: 136 kB
   Homepage:http://dev.gentoo.org/~joker/ccze/ccze.txt
   Description: A flexible and fast logfile colorizer
   License: GPL-2


Pass your log through it for nicely coloured text (words like alarm
and error are bright red to stand out) as well as converting date
epoch on the fly, leaving it in context.

BillK


   


This was a pfl log.  It doesn't contain all that.  I used to run it 
manually but found that cron was set up to run it automajically.  Thing 
is, I wasn't sure how to tell if it was working so I checked the log 
file.  Well, the time stamp was not for human consumption, sort of like 
those little silicone bags in electronic stuff.  That lead me to reading 
the date man page which I was pretty sure was the key but just missed 
one important detail, the little @ sign.


Funny the things we run into sometimes.  I did add the command to my 
freq-commands file tho.


This is how you convert time from the log files to human time.  Don't 
forget the @ sign.

date -d @insert time stamp here  

I went back to the man page, it sort of left the @ out on mine:

   -d, --date=STRING
  display time described by STRING, not `now'

No mention of the @ sign there.  It does say to read the info file but I 
very rarely get into those.  I never have had any good luck with them.  
I felt like I was in Hotel California once before.  O_O  I couldn't get 
out.  lol


Dale

:-)  :-)