How to exclude ipc calls
Dmitry V. Levin
ldv at altlinux.org
Fri Nov 25 15:43:11 UTC 2011
On Fri, Nov 25, 2011 at 01:41:54PM +0100, Alexander Kriegisch wrote:
> Well, maybe I have wrong expectations, but as I wrote in my original
> message, I want to exclude "ipc()" calls, not "...ctl()" calls. On the
> former this setting has no effect. How can I filter them?
These "...ctl()" calls used by ipcs are definitely ipc calls, aren't they?
You can use
strace -e trace='!ipc'
to hide all IPC related syscalls (shm*, sem* and msg*).
> It is definitely not a quoting problem, otherwise it would not work with
> other syscall exclusions either, but it does. Using "!ipc" in my case
> seems to have the effect that everything is dumped unfiltered, while
> "ipc" does not dump anything. So the setting has an effect, just not on
> "ipc()" calls.
This is not what I see on x86, x86-64 and arm. What's the strace version
and architecture you are talking about?
> Alexander Kriegisch (kriegaex)
A: Because it messes up the order in which people normally read text.
Q: Why top-posting is considered the most annoying thing in messages?
> Dmitry V. Levin, 25.11.2011 00:16:
> > On Thu, Nov 24, 2011 at 11:51:19PM +0100, Alexander Kriegisch wrote:
> >> I would like to user an exception like "-e trace=!ipc", but that
> >> option does not work. It seems to be a bug, but if it is not,
> >> please tell me what I am doing wrong. Exceptions for other calls
> >> work, but not for ipc - maybe because it is also the name of a
> >> category?
> > $ strace -etrace='ipc' -o '|grep -c ^...ctl >&2' ipcs >/dev/null 6
> > $ strace -etrace='!ipc' -o '|grep -c ^...ctl >&2' ipcs >/dev/null 0
> > I suppose you have a problem with quoting '!' in your shell.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: not available
More information about the Strace-devel