Terminal I/O Activity Tracer

Operation

This painfully simple script can be used to duplicate the terminal I/O performed by any single process. Simply put, you can display the output produced by any program and, for example, see what some user is doing. It's superior to e.g. ttysnoop in that it doesn't require installation of any kernel modules or such nonsense. It doesn't even need root access, but without it, you can only spy on your own processes.

As for the technical side, all it takes to monitor some processes' activity is to strace it.

Usage

The script takes one argument, which is the PID of the process to trace.

Limitations

There are several limitations that I will *not* address in the publicly-released version of the script.

The program cannot trace mmap'd operations. This one is hard to overcome, but terminal I/O doesn't involve mmap - or, at least, I have never seen it do.

Download

---
*Please don't ask. Either write it yourself or forget about it.