[NTLUG:Discuss] dmesg

MadHat madhat at unspecific.com
Fri Dec 14 09:51:33 CST 2001


At 09:16 AM 12/14/2001 -0600, you wrote:
>Uhhh, I think you will find the info in the file /var/log/dmesg.  However, 
>it is not time stamped and the info isn't duplicated in 
>/var/log/messages.  Seems to me you ought to be able to look in 
>/var/log/boot.log to get the last time the system was booted and infer the 
>dmesg time from there.

I meant what I said and I said what I meant.  /var/log/dmesg is only 
created on some systems, and usually from a call in an rc script (i.e. 
/etc/rc.sysinit:dmesg -s 131072 > /var/log/dmesg, where -s is the buffer size).

Please tell me which kernel message is not sent to the syslog daemon and 
logged (after the daemon stats of course).

On every system I admin, all messages in dmesg are also logged to the 
syslog via the kernel facility.   They are listed, but usually people don't 
see them because they don't look for them, or a logrotate script moves them 
before you look for them.

for example:
$ dmesg
...
SCSI subsystem driver Revision: 1.00
(scsi0) <Adaptec AIC-7890/1 Ultra2 SCSI host adapter> found at PCI 2/10/0
...

for brevity, I am just showing a few messages.
then, if I grep for these messages from my /var/log/messages* (in case the 
logrotate script was set up, though if you are compressing log files, it 
may be necessary to use zgrep).

$ grep "SCSI subsystem driver Revision: 1.00" /var/log/messages*

/var/log/messages.1:Dec  6 05:08:39 madhat kernel: SCSI subsystem driver 
Revision: 1.00
/var/log/messages.1:Dec  6 07:28:11 madhat kernel: SCSI subsystem driver 
Revision: 1.00

I rebooted twice that day.

>Regards,
>krf
>
>At 06:22 AM 12/14/2001 -0600, you wrote:
>>At 03:13 PM 12/13/2001 -0600, you wrote:
>>>does anyone know if it is possible to determine *when* individual
>>>messages output by the dmesg command were originally generated?
>>
>>Should be in the regular log file as well, with time stamps.
>>Try /var/log/messages
>>
>>>George
>>>
>>>_______________________________________________
>>>http://www.ntlug.org/mailman/listinfo/discuss
>>
>>--
>>MadHat at unspecific.com
>>
>>
>>_______________________________________________
>>http://www.ntlug.org/mailman/listinfo/discuss
>
>--
>MadHat at unspecific.com





More information about the Discuss mailing list