I know how to use inotify to monitor filesystem events under linux. I'm wondering if there is any utility that is similar to inotify which can be used to monitor non-filesystem events.
For example, I'd like to register event handlers which can be triggered by things like the startup or shutdown of certain executables, the receipt of connections or disconnections from other hosts, mounts or unmounts of filesystems, the login or logout of certain users, etc.
The syslog facility is not sufficient for this purpose, because (for example) the starting and stopping of arbitrary executables are not logged anywhere. The same is true for arbitrary mounts and unmounts.
I know that I can write programs to read information from the /proc filesystem and execute code based upon conditions that it finds. I also know that I can write programs to monitor wtmp and other such resources and to similarly execute code based upon what is found. However, I'm wondering if there is some sort of facility like inotify which could be used to encapsulate these kinds of non-filesystem monitoring tasks underneath a standard interface.
Thank you for any suggestions.