LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   monitor the users (https://www.linuxquestions.org/questions/linux-newbie-8/monitor-the-users-770941/)

nagavinodh 11-23-2009 04:46 AM

monitor the users
 
Hi,
I would like to monitor the users activities.how to achieve that.

EricTRA 11-23-2009 04:51 AM

Hello,

It all depends on what you want to monitor. Do you want to monitor terminal access? Or what they are doing? Please provide more detail in regards to what exactly you want to monitor since there are so many things and options to do so.

Kind regards,

Eric

nagavinodh 11-23-2009 05:37 AM

Quote:

Originally Posted by EricTRA (Post 3766536)
Hello,

It all depends on what you want to monitor. Do you want to monitor terminal access? Or what they are doing? Please provide more detail in regards to what exactly you want to monitor since there are so many things and options to do so.

Kind regards,

Eric

Thanks for reply.
yes i want their terminal access.can i find from starting o end session?

EricTRA 11-23-2009 05:53 AM

Have a look at the w command.
Just type in
Code:

w
at the prompt as root and you'll see something like this:
Code:

12:51:24 up 61 days,  2:46,  1 user,  load average: 0.71, 0.45, 0.43
USER    TTY      FROM              LOGIN@  IDLE  JCPU  PCPU WHAT
root    pts/0    por1040.tradisa. 12:51    0.00s  0.00s  0.00s w

It shows you who, on what terminal, from where, when they logged in, what they are doing and some cpu usage.
Run
Code:

man w
to see options.

Kind regards,

Eric

nagavinodh 11-23-2009 06:21 AM

Quote:

Originally Posted by EricTRA (Post 3766586)
Have a look at the w command.
Just type in
Code:

w
at the prompt as root and you'll see something like this:
Code:

12:51:24 up 61 days,  2:46,  1 user,  load average: 0.71, 0.45, 0.43
USER    TTY      FROM              LOGIN@  IDLE  JCPU  PCPU WHAT
root    pts/0    por1040.tradisa. 12:51    0.00s  0.00s  0.00s w

It shows you who, on what terminal, from where, when they logged in, what they are doing and some cpu usage.
Run
Code:

man w
to see options.

Kind regards,

Eric

Thanks for reply.
Is it possible to create the file ie what are the commands they executed.?can i use the history for that.after the user exit from the terminal,the history file automatiaclly send to mail id.

chrism01 11-23-2009 05:31 PM

If you want all their cmds, use rootsh http://sourceforge.net/projects/rootsh/.
A user can wipe their own history, so the std history is unreliable.


All times are GMT -5. The time now is 07:52 AM.