LWN.net Logo

Advertisement

E-Commerce & credit card processing - the Open Source way!

Advertise here

2003 Kernel Summit: Error Logging

This article is part of LWN's 2003 Kernel Developers' Summit coverage.
Suparna Bhattacharya discussed error logging needs with the kernel developers. There are three distinct needs in this area:

  • The kernel should generate event data which is parseable by other programs.

  • It also needs to generate messages which can be parsed by humans.

  • All this should happen without an undue burden on the kernel developers.

Suparna put up a quick description of an error reporting API which makes use of the netlink interface to communicate with user-space. This API (which has been posted to the net before) adds two new functions (evl_write() and evl_printf()) which would be used, in place of printk(), to report events and errors. The evl_ functions include a fair amount of metainformation, including event type and facility codes, in the hope of adding a certain amount of structure to kernel event reporting.

This interface was not particularly well received. Why not, it was asked, just use printk() strings? Adding numeric event type codes was seen as a bit of a mistake; most developers, it would seem, would rather just see the information encoded as strings that humans can read. It was also pointed out that a netlink-based interface requires a user-space daemon to receive and process the messages. But that daemon could well be rendered unavailable by the same problem that the kernel is trying to report.

The discussion headed toward providing enhanced versions of printk() (such as the relatively new dev_printk()) which provide the relevant information in a standard form without requiring much work on the developer's part. Expect to see more printk() variants in the 2.7 development cycle.


(Log in to post comments)

Linux event logging

Posted Jul 31, 2003 16:34 UTC (Thu) by job (guest, #670) [Link]

There's more to event logging as well, for example in clusters. Not that prinks are obsolete but there's more to it. Read the background document for the Linux Event Logging project for some good info. I'm surprised this project wasn't mentioned here?

Copyright © 2003, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds