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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.