https://bugzilla.novell.com/show_bug.cgi?id=302010
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=302010#c67
--- Comment #67 from Dr. Werner Fink 2008-01-31 04:02:58 MST ---
With this /usr/bin/lsof should become /bin/lsof ..
and lsof can be used within other programs with e.g.
lsof -nF cpn -- /dev/tty[0-9]*
which list with identifiers the process command name, the
process ID, and the file name.
An other option would be to use fuser
fuser -n file /dev/tty[0-9] /dev/tty[0-9][0-9] 2>&1
but note that the pids are on stdout whereas the names will
be printed on stderr (therefore I've used the redirect).
And the pid has to be checked with ps or somehow else.
At last but not least the normal ps command could be used:
. /etc/sysconfig/keyboard
ps -o tty=,comm= t ${KBD_TTY// /,}
tty4 mingetty
tty5 mingetty
tty6 mingetty
tty2 mingetty
tty3 mingetty
tty7 X
tty1 mingetty
with tty it looks like
ps -o pid=,comm= t tty1,tty2,tty3,tty4,tty5,tty6,tty6,tty7
tty4 mingetty
tty5 mingetty
tty6 mingetty
tty2 mingetty
tty3 mingetty
tty7 X
tty1 mingetty
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.