current pids per tty
Polytropon
freebsd at edvax.de
Tue Apr 3 21:13:22 UTC 2012
On Tue, 3 Apr 2012 16:47:57 -0400, Matthew Story wrote:
> Across all TTYs, something like this would probably work:
>
> sudo fstat | awk '$5 ~ /^\/dev/ && $8 ~ /tty/ { printf "%s %s %s\n", $1,
> $8, $3; }' | sort -k1,2
>
> from there, if you think you need to trace the process trees down, you can
> use this list of pids and ps to do the rest ...
Or use "pstree" from ports.
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list