How to clear dmesg hp-ux 11

 
SOLVED
Go to solution
Raj Patel_1
Occasional Advisor

How to clear dmesg hp-ux 11

Hi, Does anyone know how to clear the dmesg buffer ? I have tried removing all entries in /var/adm/msgbuf but dmesg still retains the errors somewhere.
4 REPLIES 4
Robin Wakefield
Honored Contributor
Solution

Re: How to clear dmesg hp-ux 11

Hi,

I'm not sure if this helps, but if you issue the command "dmesg -", it will subsequently only show NEW messages, if you reissue the same command.

Rgds, Robin.
Wim Rombauts
Honored Contributor

Re: How to clear dmesg hp-ux 11

I don't think you can, but try "dmesg -". This remembers the messages that are printed. When it is executed this way the next time, it will only print new messages.

This is not what you wanted to do, but maybe the effect is the same.
Raj Patel_1
Occasional Advisor

Re: How to clear dmesg hp-ux 11

What we have is a SNMP tracker which monitors logs, including dmesg output. The problem which dmesg reports on is now solved (I hope), but when our tracker run dmesg, it picks up the previous errors, and then sends alerts to us. The only way I can think to stop this is to reboot the server, which is not possible as it is a production server.
Raj Patel_1
Occasional Advisor

Re: How to clear dmesg hp-ux 11

Ok, I see I think we'll have to alter our tracker scripts to use "dmesg -"....Thanks for your help. Raj