2

I am considering using SystemTap for monitoring FileSystem activities on a production server.

How can I transfer data from the kernel module that SystemTap generates to another application? I only saw printf as a way of outputting data from SystemTap script, Is there some sort of socket interface?

yoni
  • 96
  • 1
  • 6

1 Answers1

0

There is no network IPC support currently in systemtap. However, ways include:

  • probe FOO { system("some_shell_command") } to enqueue execution of arbitrary shell script.
  • probe procfs.{read,write}("PATH") {} to export files in /proc that userspace applications can read/write to talk directly to the stap module.
  • stap --remote HOST ... to execute stap modules remotely, and carry I/O back via ssh.
  • Or use named pipes: mkfifo tun, open tun for read-only in the target app, then run stap -o tun ....
MEE
  • 2,114
  • 17
  • 21
fche
  • 2,641
  • 20
  • 28