LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-13-2012, 03:35 PM   #1
panos_gr
LQ Newbie
 
Registered: Mar 2011
Distribution: Ubuntu
Posts: 15

Rep: Reputation: 0
Question see kmsg with proper times


Hello,

I am debugging some things and I continuously watch the outcome of cat /proc/kmsg.

However its time output comes in seconds from the time the machine was booted (I guess). e.g.
Code:
<4>[ 2722.451773] do stats in ip6_input_finish
Is there a way to be able to see this 2722.451773 in another time format? e.g. related to the time of the day?

That would make my life a heck of a lot easier!!!

Thanks a lot in advance!
 
Old 03-14-2012, 02:40 AM   #2
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Check the man page of convcal for converting the dates in different formats.
 
Old 03-14-2012, 07:34 AM   #3
panos_gr
LQ Newbie
 
Registered: Mar 2011
Distribution: Ubuntu
Posts: 15

Original Poster
Rep: Reputation: 0
Hi Satyaveer, thanks for your reply.

It seems that convcal prints the time correctly but not the date. Most importantly though, I cannot use it on the fly, i.e. when I am doing cat /proc/kmsg I am continuously seeing messages with the timestamp as above, so I want to use something that can parse this on the fly (or do it somehow with grep?)

any other ideas?
 
Old 03-14-2012, 11:14 PM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
What all switches you used with convcal command?
 
Old 03-15-2012, 07:28 AM   #5
panos_gr
LQ Newbie
 
Registered: Mar 2011
Distribution: Ubuntu
Posts: 15

Original Poster
Rep: Reputation: 0
I used all the -i and -o formats without any luck... and even when the output seems humanly readable is..wrong...

e.g.
Quote:
root@ha1:/home/ha1# convcal -i seconds -o european
40272.846748
01/01/-4713 23:11:12.847
or
Quote:
root@ha1:/home/ha1# convcal -i seconds -o european -r 12/03/15
40272.846748
15/03/2012 11:11:12.847
which is 15 minutes off...any other suggestions?

Last edited by panos_gr; 03-15-2012 at 07:31 AM.
 
Old 03-15-2012, 08:32 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,848

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
Quote:
Originally Posted by panos_gr View Post
However its time output comes in seconds from the time the machine was booted (I guess)
Time the kernel has been running since it started I think you'll find.
More useful for relative time events rather than true ToD. Hibernation messes with it as does being a virtualized guest IIRC.

I saw some python code floating around that used the uptime value to determine a ToD - a search should find it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
debugging the linux kernel - strange output in kmsg panos_gr Linux - General 3 03-15-2012 09:06 AM
Please recommend a proper one frankzyz Linux - Laptop and Netbook 16 12-30-2008 08:07 AM
Can't Read /proc/kmsg Unless I'm root xthx1138@fastmail.fm Linux - General 3 01-07-2008 09:17 PM
Data transfer online is slow "at times" or "stops at times" Balarabay1 SUSE / openSUSE 14 04-30-2006 11:00 AM
System hangs; Atheros Madwifi-ping times out every 15/16 times james 456 Linux - Networking 0 01-12-2006 07:55 PM


All times are GMT -5. The time now is 05:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration