|
From: Alexander K. <Ale...@Kr...> - 2011-12-23 02:03:43
|
Maybe this is unrelated to inotify-tools' purpose, but I hope to find support or a good idea anyway. I work on an embedded platform (mipsel) and have used inotify-tools, especially inotifywait, for a long time to write simple watchdogs based on file access, change, deletion etc. Now there is a tricky case: I need to monitor that fact that and also *what* is written into a UNIX domain socket, i.e. I want to monitor IPC because there is no API to catch certain events and trigger actions. I tried inotify-tools in vain for monitoring UNIX domain sockets, but I am asking anyway: Is there a way to do that? If not with inotify-tools, maybe there is something similar for my purpose. I found out that strace can trace the calls and contents which send and receive messages in UNIX domain sockets, but would be quite slow and expensive to have strace running on a vital process in my firmware all the time. What I learned from this, though, is that there is a programmatic way to gather the information I am looking for and trigger an event (in strace: write a log line). I already explained my problem on stackoverflow.com [1] more than 2 weeks ago, but received no answer. So it seems to be a tricky or at least not everyday thing. Any ideas? [1] http://stackoverflow.com/questions/8394613/watchdog-monitoring-unix-domain-socket-triggering-events-upon-specific-content |