A system monitoring daemon

Hi everybody, and thanks for a great library (I use it via the Pygame
Python bindings).

I would like to write a daemon that monitors many different kinds of system
events, and uses those to build a representation of what goes on in the
system. (I’m actually more interested in an audio representation than a
visual one, but that’s beside the point.)

Such a daemon should at the very least receive all user-generated events:
keys, mouse, joystick, touchscreen, audio input. It should also monitor the
main system parameters, like CPU usage, memory, block devices, network
traffic and so on.

SDL would be very handy for receiving the user-generated events: alas, the
daemon would need to always get them, without having a user interface and
being in focus. Is there a way to use SDL in such a fashion?

Also, what are the standard techniques to get the system-generated events?
I suspect that it would be difficult to write a portable daemon: I am
mainly interested in the Linux platform anyway.–
Nicola Larosa - http://www.tekNico.net/

In the '70s I was a huge fan of various bands; now I’m a huge fan
of software. I’ve gone from gazing at record covers to gazing at
online help files, which is a little sick, now that I think about it.
– Wayne Lytle, March 2006

SDL would be very handy for receiving the user-generated events: alas, the
daemon would need to always get them, without having a user interface and
being in focus. Is there a way to use SDL in such a fashion?

Well, I tried using inotify, the Linux kernel filesystem event monitor, on
the /dev/input/event0 and /dev/input/mice devices. I do get access events,
but cannot distinguish between modifier and normal keys, nor between mouse
cursor position events and button ones.

I really pine for the SDL detail and completeness, but in a system-wide
fashion. :-)–
Nicola Larosa - http://www.tekNico.net/

In the '70s I was a huge fan of various bands; now I’m a huge fan
of software. I’ve gone from gazing at record covers to gazing at
online help files, which is a little sick, now that I think about it.
– Wayne Lytle, March 2006