Injecting messages to /dev/kmsg don't get logged to disk on RHEL6 Realtime kernels

Solution Unverified - Updated -

Issue

  • The /dev/kmsg device can be used to write to the kernel buffer

  • On the normal RHEL6 kernels, you can "echo test > /dev/kmsg" and "test" will end up in /var/log/kernel or /var/log/messages (wherever configured).

  • On the Realtime kernels, this doesn't work. The message ends up in the kernel buffer according to "dmesg" but never gets logged to disk.

[root@ibm-x3550m4-7 log]# echo testkmsg > /dev/kmsg
[root@ibm-x3550m4-7 log]# dmesg|tail -1
testkmsg
[root@ibm-x3550m4-7 log]# grep testkmsg /var/log/*

Environment

Red Hat Enterprise Linux 6
Realtime kernels
rsyslog

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content