Reply
Thread Tools
Posts: 393 | Thanked: 67 times | Joined on Feb 2010
#1
Folks,

I'm new to Linux and I can't figure out how to tail the dmesg log. "tail dmesg" does not work. I want to do something like "tail /var/log" but I think there is no log on the N900?

I installed the full GNU utilities but still unsure. Please advise
 
Posts: 134 | Thanked: 91 times | Joined on Nov 2009 @ Imperial College London
#2
Busybox tail comes on the device and works fine for me.

dmesg is a binary, not a text file so you cannot tail it (well you could but you'd have to use the full path to it, and would just get garbage!). If you just want the last few lines of output that you would get from the dmesg command you could use:

dmesg | tail

You may also want to investigate /var/log/syslog , though I'm not sure whether the logging occurs by default or I've enabled it in the past and forgotten. As this is a "normal" file you could use:

tail /var/log/syslog

to see the last few lines of it.

Cheers,
Jan
 
Posts: 2,014 | Thanked: 1,581 times | Joined on Sep 2009
#3
and lets not forget the ever helpful tail -f for streaming a file.
__________________
Class .. : Power Poster, Potential Coder
Humor .. : [*********] Alignment: Chaotic Evil
Patience : [***-------] Weapon(s): +2 Logic Mace
Agro ... : |*****-----] Relic(s) : G1, N900

 
Posts: 134 | Thanked: 91 times | Joined on Nov 2009 @ Imperial College London
#4
Originally Posted by Bratag View Post
and lets not forget the ever helpful tail -f for streaming a file.
And how to stop it (Ctrl c)!
 
Shaichico's Avatar
Posts: 80 | Thanked: 8 times | Joined on Nov 2009 @ Stockholm (formally Amsterdam, London)
#5
Originally Posted by Bratag View Post
and lets not forget the ever helpful tail -f for streaming a file.
Absolutely the best way to tail... not sure if this been tried in maemo but I know it works on most nix with "less" installed and that is shift+F
 
Posts: 303 | Thanked: 175 times | Joined on Oct 2009 @ London UK
#6
you'd have to run as root, but

# cat /proc/kmsg
some old data...
...
<6>[45179.402587] slide (GPIO 71) is now open
<6>[45180.745971] slide (GPIO 71) is now closed

that is the same log source from which dmesg gets its content..
 

The Following User Says Thank You to cpitchford For This Useful Post:
Posts: 393 | Thanked: 67 times | Joined on Feb 2010
#7
Thanks for your response cpitchford, that is what I was looking for!
 
Reply


 
Forum Jump


All times are GMT. The time now is 20:04.