how to fetch the commands at solaris system


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to fetch the commands at solaris system
# 1  
Old 02-03-2012
how to fetch the commands at solaris system

Smiliei'm system administrator. now i have a trouble. i want to fetch the command which the login users performed by shell.but i don't know how to process this problem.if anyone tell me how to do this work I would be very grateful.thank you!
# 2  
Old 02-03-2012
Why not check the .sh_history file in each users home directory?

--ahamed
# 3  
Old 02-03-2012
You may or may not be able to get such information. Depends on whether the user's shell supports history - for example, the Bourne shell does not, the user has history support turned on, and whether the user clears out history before logging off.

Some shells such as Korn Shell 93 have a command logging facility which enables you to log all commands entered by a user to a logging server. Bash/Dash/Ash do not have such a facility.
# 4  
Old 02-05-2012
Couple of ways to do it.

1. Change the user login shell to your own crafted shell that 'script(1)' the user terminal

2. Run dtrace (available in solaris 10). You may want to use Brendan Gregg's execsnoop:
http://www.brendangregg.com/DTrace/execsnoop

Whichever way you use, be ethical
# 5  
Old 02-05-2012
Bug Think you !

Thank you for your reply.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File System & commands

Hello! Is File System stored in unix kernel or in pc memory? Are unix commands stored in kernel? many thanks! (1 Reply)
Discussion started by: pinklemon
1 Replies

2. UNIX for Advanced & Expert Users

Need commands to fetch Guest VM OS version from Xen and KVM

Im looking for the commands that can be executed to fetch the OS Version of the VMs running on the below Hypervisors. Xen (Not the citrix Xen server, but the Xen Sever hosted on a ubuntu Machine) KVM (0 Replies)
Discussion started by: ranvirsingh
0 Replies

3. Programming

Linux/Solaris System Administrator to become a Linux/Solaris System Programmer?

Hi all What is the qualification required by Linux/Solaris System Administrator to become a Linux/Solaris System Programmer as to gain complete knowledge on computers. Thanks (1 Reply)
Discussion started by: Tlogine
1 Replies

4. HP-UX

how to mount a file system from a solaris server into an hp-ux system

Hi all I wonder if its possible to mount on a hp-ux server a file system that was previously mounted on a solaris 10 server. The LUN is on NetApp stoarge. The problem on hp-ux I cannot do pvcreate on the lun (disk) because contains data. Any help will be appreciated FR (2 Replies)
Discussion started by: fretagi
2 Replies

5. Shell Programming and Scripting

How to use functions as a system commands?

I have few functions which do some things which i have programmed to do. I want them to use that functions anytime i want. Right now if i need to use that function i have to copied that to putty and then call that function. Is it possible to do that so that i don't need to call that function. And i... (3 Replies)
Discussion started by: pamu
3 Replies

6. Linux

commands of linux operation system

Am actually am new to the linux operating system and knda wana knw more about it.Please could u help me with some commands so i can start with that first.Really need your help (5 Replies)
Discussion started by: GODBLESSME
5 Replies

7. AIX

Need AIX system commands

Hey Guyz, I am preparing an inventory kindof thing about the aix servers.. I need help to find out the below details for many AIX servers.. Machine model and version Disk Size RAM size no. of CPUs and thier information list of softwares installed I searched in web.. but not much info I... (4 Replies)
Discussion started by: thariqueakbar
4 Replies

8. UNIX for Dummies Questions & Answers

Interpreting java output stream as system commands in Solaris

Hi there again, Running Solaris 10 with built-in Java. Seems to compile and run fine. Problem is: Say I want to see contents of current directory. In a shell, I'd just write "ls" and it outputs the content. When I write a Java file, I have the following line: System.out.println("ls"); ... (1 Reply)
Discussion started by: EugeneG
1 Replies

9. Solaris

rsh commands not getting executed from Solaris 10 System to AIX System

Hi Friends, I am trying to execute rsh commands from Solaris 10 system to AIX system. When I give; Solaris10# rsh <hostname> ls -l , it gives me an error rshd : 0826-826 The host name for your address is not known At the same time, Solaris10# rsh <hostname> ---- gives me remote shell of... (25 Replies)
Discussion started by: jumadhiya
25 Replies

10. AIX

commands to get system specs

Hi, I want to find some information regarding system specs such as CPU speed, total disk space, total RAM, network topology eg. ethernet, patch number, OS patches, database. Thanks (2 Replies)
Discussion started by: DarReNz
2 Replies
Login or Register to Ask a Question