Search
Topics
Krishnendu\'s Blog

  Create an account  · 


Navigation
Main
 _HOME
General
 Feedback
 Recommend Us
Community
 Downloads
 Forums
 Members List
Members
 Account
 Private Messages
Information
 Content
 Encyclopedia
 Resources
 Linux Kernel
 GNU
 Linux Security


Sponsors
_BLOCKPROBLEM2

www.GLUG-Howrah.org :: View topic - How to get activity list for all users on all connections..
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to get activity list for all users on all connections..

 
Post new topic   Reply to topic    www.GLUG-Howrah.org Forum Index -> Networking
View previous topic :: View next topic  
Author Message
abhisek_das
Newbie
Newbie


Joined: Jun 20, 2008
Posts: 1
Location: Howrah

PostPosted: Fri Jun 20, 2008 4:07 pm    Post subject: How to get activity list for all users on all connections.. Reply with quote

Dear Friendz..

I m the newest user in this forum,I would like to know ur views in one interesting topic..

suppose i m on a unix/linux box and have administrative rights, how could I be able to monitor all user activities from all remote PCs...

History commands is not sufficient, I wold like to write a script where i can spool all the activity list from all connections....
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
neo
Pingu
Pingu


Joined: Apr 13, 2004
Posts: 75
Location: kolkata/calcutta

PostPosted: Mon Jun 23, 2008 8:37 pm    Post subject: Probably this might work Reply with quote

Hi buddy!
I am not much into sys admin but i thought i could give it a try. So i approached this way. If clients are logged onto your system and they are running programming this machine(host) you can write a script to monitor their activity.

Code:
ps aux|grep <username>
is a simnple solution but i thought as you mentioned to have a script, below is one you can report bug as i could not try on a network system (with many client machines etc.). Let me know if and how it works. Later i'll find improved version of this. The code is not so fine and i think is little sloppy.

Code:

#!/bin/bash
# this script is to check the logged on users and what processes
# they are running. Except Root.


x=$(who|wc -l)
i=1

while [ $i -le $x ]
do

str=$(echo $(who|cut -f1 -d" ")|cut -d" " -f$i)
echo $str
ps ef|grep $str|grep -v grep|grep -v root

i=`expr $i + 1`

done

if [ (who|wc -l) -le $x ]then
   sleep 10
fi


bye for now.
neo.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.GLUG-Howrah.org Forum Index -> Networking All times are GMT + 5.5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group





plastic card printers  
tablet pcs  wall fountain printer ink
Kartendrucker 
Free Trial for Anonymous Surf Software 
Cheap Term Life Insurance
Books

NorthWestPharmacy.com is a premier and licensed supplier of Canada Drugs Online