1846591 Members
2080 Online
110256 Solutions
New Discussion

Re: monitor tty

 
Kenan Erdey
Honored Contributor

monitor tty

hi;

is there any way of monitoring what a user is doing ?

thanks.
Computers have lots of memory but no imagination
9 REPLIES 9
Ninad_1
Honored Contributor

Re: monitor tty

You can do a who -uR to understand the tty no of the user login and then do
ps -aft pts/11 [ if say the tty is pty/11 ]

Regards,
Ninad
Oviwan
Honored Contributor

Re: monitor tty

Hi,
in addition you can take a look to the history file ($HOME/.history)

Regards
Kenan Erdey
Honored Contributor

Re: monitor tty

hımm, i want to monitor lively. not something after having been done.
Computers have lots of memory but no imagination
Ninad_1
Honored Contributor

Re: monitor tty

Then you can enable accounting -
man 1M acct
But note that enabling accounting takes up a lot of space which you need to monitor.
Or you can write you scripts as mentioned in the above which will run thru cron every interval and log to a file. Also depends on whatt all you want to monitor/log.

Regards,
Ninad
Peter Nikitka
Honored Contributor

Re: monitor tty

Hi,

the command 'script' may be your friend - it records a tty-session to a file; see 'man script'.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Kenan Erdey
Honored Contributor

Re: monitor tty

imagine,
we logged in with pts/2

if we run script -a /dev/pts/2 from a user's terminal( it must be root to write to pts i think) we can see what the user is doing.

but i must do it from user's shell. and user must be root.

there must be a way of seeing what is sent to another user's tty.

any ideas ?
thanks.

Computers have lots of memory but no imagination
Sivakumar TS
Honored Contributor

Re: monitor tty

Hi,

what about running

#whodo

This will list the users currently loggedin and the processes being run by them,

Regards,

Siva.
Nothing is Impossible !
Patrick Wallek
Honored Contributor

Re: monitor tty

I do not know of a way with native unix to do what you require. There is a product called DoubleVision that allows you to monitor, or even interact with, a logged in terminal session.

Here is the web site:
http://www.tridia.com/products/dv.html

This is a product that you have to buy. It is NOT free. It does work very well though.

A. Clay Stephenson
Acclaimed Contributor

Re: monitor tty

Look into a product called "DoubleVision PRO".

http://www.tridia.com/products/index.html
If it ain't broke, I can fix that.