Kay Sievers e11fea92e1 kmsg: export printk records to the /dev/kmsg interface
Support for multiple concurrent readers of /dev/kmsg, with read(),
seek(), poll() support. Output of message sequence numbers, to allow
userspace log consumers to reliably reconnect and reconstruct their
state at any given time. After open("/dev/kmsg"), read() always
returns *all* buffered records. If only future messages should be
read, SEEK_END can be used. In case records get overwritten while
/dev/kmsg is held open, or records get faster overwritten than they
are read, the next read() will return -EPIPE and the current reading
position gets updated to the next available record. The passed
sequence numbers allow the log consumer to calculate the amount of
lost messages.

  [root@mop ~]# cat /dev/kmsg
  5,0,0;Linux version 3.4.0-rc1+ (kay@mop) (gcc version 4.7.0 20120315 ...
  6,159,423091;ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
  7,160,424069;pci_root PNP0A03:00: host bridge window [io  0x0000-0x0cf7] (ignored)
   SUBSYSTEM=acpi
   DEVICE=+acpi:PNP0A03:00
  6,339,5140900;NET: Registered protocol family 10
  30,340,5690716;udevd[80]: starting version 181
  6,341,6081421;FDC 0 is a S82078B
  6,345,6154686;microcode: CPU0 sig=0x623, pf=0x0, revision=0x0
  7,346,6156968;sr 1:0:0:0: Attached scsi CD-ROM sr0
   SUBSYSTEM=scsi
   DEVICE=+scsi:1:0:0:0
  6,347,6289375;microcode: CPU1 sig=0x623, pf=0x0, revision=0x0

Cc: Karel Zak <kzak@redhat.com>
Tested-by: William Douglas <william.douglas@intel.com>
Signed-off-by: Kay Sievers <kay@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 17:03:27 -07:00
..
2012-04-23 14:23:32 +03:00
2012-03-30 17:31:56 -07:00
2012-04-04 10:09:30 -07:00
2012-04-27 11:03:38 -06:00
2012-03-20 21:29:46 -04:00
2012-03-21 17:55:01 -07:00
2012-03-16 20:35:02 +00:00
2012-03-16 20:35:02 +00:00
2012-02-28 16:02:54 +01:00
2012-03-29 15:38:31 +10:30
2012-03-23 16:58:38 -07:00
2012-03-20 21:29:37 -04:00
2012-03-20 21:29:53 -04:00
2012-05-04 16:33:16 -07:00
2012-02-20 19:46:36 +11:00
2012-04-10 15:30:16 -07:00
2012-03-28 18:30:03 +01:00
2012-01-12 20:13:04 -08:00
2012-04-05 15:30:34 -07:00
2012-04-12 12:57:08 +02:00
2012-02-28 17:10:21 +00:00
2012-04-27 10:46:45 +08:00
2012-03-28 14:08:46 -07:00
2012-03-26 21:47:19 +02:00
2012-03-26 21:47:19 +02:00
2012-03-26 21:47:19 +02:00
2012-03-26 21:47:19 +02:00
2012-03-26 21:47:19 +02:00
2012-03-26 21:47:19 +02:00
2012-03-28 15:58:21 -07:00
2012-03-27 22:45:26 -04:00
2012-03-08 10:50:35 -08:00
2012-03-21 17:54:57 -07:00
2012-03-23 08:53:47 -07:00
2012-03-08 10:50:35 -08:00
2012-01-17 15:40:51 -08:00
2012-02-29 15:35:41 -06:00
2012-03-15 21:41:34 +01:00
2012-03-03 15:04:45 -05:00
2012-04-21 01:58:20 -04:00
2012-04-03 17:23:23 -04:00
2012-03-05 15:26:47 -05:00
2012-03-21 17:54:58 -07:00
2012-03-21 17:55:01 -07:00
2012-03-16 21:49:24 +01:00
2012-03-20 21:29:38 -04:00
2012-03-28 18:30:03 +01:00
2012-03-28 15:58:21 -07:00
2012-03-08 11:38:50 -08:00
2012-03-12 22:19:13 +01:00
2012-03-06 11:01:33 +02:00
2012-03-19 16:53:08 -04:00
2012-03-22 19:43:43 -07:00
2012-03-28 18:30:03 +01:00
2012-04-10 22:39:17 -06:00
2012-04-11 09:36:00 +01:00
2012-03-27 16:30:09 -07:00
2012-03-31 08:09:50 +05:30
2012-03-08 10:50:35 -08:00
2012-03-28 18:30:03 +01:00