Operating System - HP-UX
1844319 Members
4209 Online
110230 Solutions
New Discussion

Re: question:how to delete err info in dmesg output??

 
小马哥_1
Contributor

question:how to delete err info in dmesg output??

question:how to delete err info in dmesg output??

#dmesg find an error

I solve this error and os is OK

after two days

#dmesg I find this error info is always exit

So how long does this error info exit in dmesg output??

how can I delete this error info in dmesg output immediately?
4 REPLIES 4
mobidyc
Trusted Contributor

Re: question:how to delete err info in dmesg output??

Hello,

if you want to see only the message from the last dmesg launched command add the '-' argument to dmesg as explained in the dmesg(1M) man page:
If the - argument is specified, dmesg computes (incrementally) the new messages since the last time it was run and places these on the standard output.

dmesg have a buffer, so, when sufficiently messages are added to its buffer, old messages are pushed-out.

the dmesg(1M) man page have a better explanation than my poor english:
The system error message buffer is of small, finite size.

If you still have the error (timed 2 days ago!!!), its a good think, don't worry.
if you still have the error message dated of today, the problem is not really solved.

Regards,
Cedrick Gaillard

Best regards, Cedrick Gaillard
Pete Randall
Outstanding Contributor

Re: question:how to delete err info in dmesg output??

The dmesg command reads from a circular buffer that is never cleared. It just continues to fill until it wraps around to the beginning again.

Because of this, the error will not go away until the buffer wraps around. What you could do is run "dmesg -" which will show you only the new messages since the last time dmesg was run.


Pete

Pete
Ludovic Derlyn
Esteemed Contributor

Re: question:how to delete err info in dmesg output??

hi,

dmesg is an buffer, reset when system is rebooted
Modify each time an event occurs
For me i think, but i'm not sure that is not possible to delete this buffer

Regards
L-DERLYN
Steven E. Protter
Exalted Contributor

Re: question:how to delete err info in dmesg output??

Shalom,

dmesg -

Clears the circular buffer.

May not work on all OS' and/or variants.

Until the error recurrs.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com