Re: [PATCH] Warn if we run out of swap space

Pavel Machek
2009-06-03T17:21:02Z

On Mon 2009-06-01 22:44:20, Avi Kivity wrote:
> Andrew Morton wrote:
>>> We really should have a machine readable channel for this sort of
>>> information, so it can be plumbed to a userspace notification bubble
>>> the user can ignore.
>>>
>>
>> That could just be printk(). It's a question of a) how to tell
>> userspace which bits to pay attention to and maybe b) adding some
>> more structure to the text.
>>
>> Perhaps careful use of faciliy levels would suffice for a), but I
>> expect that some new tagging scheme would be more practical.
>>
>
> I thought dmesg was an unreliable channel which can overflow. It's also
> prone to attacks by spell checkers.

Well, I believe that any used-enough channecl will eventually
overflow. So dmesg still looks like the best we can do.

> I prefer reliable binary interfaces to shell explorable text interfaces
> as I think any feature worth having is much more useful controlled by an
> application rather than a bored sysadmin.

You are free to parse syslog. In fact, I guess some tags could be
added for messages where userland reaction is expected...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html