I wd like to check what unix users r doing in their session which command they executed.. I wd like to enable a log for all this based on their input and output..
pls provide me command for the same.
vivek
How to check what unix users r doing?
Best thing would be to install/enable some system wide auditing functionality that often is available in your OS already (eg Solaris Unix). The daemons will create logfiles for you and you can create reports for almost every activity.
Under Linux it's the psacct or acct package you're looking for. Under Solaris something similar, it depends what NIX you are dealing with but you can search for audit in packaging systems.
Commands 'lastcomm' and 'sa' will give you all you need for reporting.
Reply:As the previous answer suggests, you can get a snapshot
of current activity with "ps".
The historical way to see a "log" is via the "lastcomm"
command. This only works, however, if you've turned
on extended accounting, typically with the "acctadm"
command.
There are often also more sophisticated
resource management/accounting packages available,
but this is pretty universally available and may satisfy
your needs.
Reply:You can get information about users logged in currently using the command line utilities 'who and finger'. If you want to know what command is being used by which user, you can use options of the utility ps like 'ps aux'.
Reply:Also use w command, it can show the command too :)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment