files opend by processes


 
Thread Tools Search this Thread
Operating Systems Solaris files opend by processes
# 1  
Old 05-17-2011
files opend by processes

how can I determine which processes have open particular file ( for example log file, config ) for writing or reading ?
Is it possible figure out ?
Thanks
# 2  
Old 05-17-2011
look into man fuser or man lsof
# 3  
Old 05-17-2011
in solaris 10 you can also use dtrace...

Code:
dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }'

This User Gave Thanks to DukeNuke2 For This Post:
# 4  
Old 05-17-2011
Speaking about DTrace, DTraceToolkit includes nice script to snoop files being opened in real time: Filename: ../opensnoop. It provides a bit more info than previous one-liner. It also allows to snoop particular file for processes accessing it.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Record top accessed processes/files

Hello, I have about 100 servers that I'm looking to collect information regarding top files and processes accessed within a 168 hr (1 week) period. Each server has a different purpose and so different installed applications. All servers are running either unix or linux. What would be a... (0 Replies)
Discussion started by: umang2382
0 Replies

2. Shell Programming and Scripting

Writing a Perl Script that processes multiple files

I want to write a Perl script that manipulates multiple files. In the directory, I have files 250.*chr$.ped where * is from 1 to 1000 and $ is from 1-22 for a total of 22 x 10,000 = 22,000 files. I want to write a script that only manipulates files 250.1chr*.ped where * is from 1 to 22.... (10 Replies)
Discussion started by: evelibertine
10 Replies

3. UNIX for Dummies Questions & Answers

Writing a for loop that processes multiple input files

I would like to write a for loop that does the following: I have a file called X.txt and other files called 1.txt,2.txt, .....,1000.txt. I want to substitute the 6th column of the file X.txt with 1.txt and store the output as X.1. Then I want to do the same with X.txt and 2.txt and store the... (1 Reply)
Discussion started by: evelibertine
1 Replies

4. Linux

Linux Processes, Threads, scheduling header files

Hello everyone i am new to Linux. could anyone help me with the names of the Linux processes, threads and scheduling header files. I need them to write a documentation on Linux processes and threads. Thanks (5 Replies)
Discussion started by: bee_in_toronto
5 Replies

5. Shell Programming and Scripting

Finding the age of a unix process, killing old processes, killing zombie processes

I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time. Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 Replies

6. UNIX for Dummies Questions & Answers

Processes

Hi all, I needed a little help. It's OS thing. Suppose I have 2 machine connect over a network, I will call my machines as M1and M2. If I copy a files from M1 to M2. What tasks are these two machine performing for copy to work. My assumption is that M1 is performing read action and... (1 Reply)
Discussion started by: vishwesh
1 Replies

7. Solaris

Identifying and grouping OS processes and APP processes

Hi Is there an easy way to identify and group currently running processes into OS processes and APP processes. Not all applications are installed as packages. Any free tools or scripts to do this? Many thanks. (2 Replies)
Discussion started by: wilsonee
2 Replies

8. UNIX for Advanced & Expert Users

Monitoring Processes - Killing hung processes

Is there a way to monitor certain processes and if they hang too long to kill them, but certain scripts which are expected to take a long time to let them go? Thank you Richard (4 Replies)
Discussion started by: ukndoit
4 Replies

9. Programming

spawning multiple processes spread across two files

I want to spawn n child processes but have two different classes..with the foremost one forking/spawning the child process and the latter performing a function w/ the spawned processes. I can do this in one class with an if statement and the simple if((pid=fork())==0) //child process { ... (1 Reply)
Discussion started by: StrengthThaDon
1 Replies

10. BSD

Opend files in samba

Guys im looking for a port for BSD make me able to see who access Samba shares and give me the ability to disconnect anyone of them., i think i saw something like this in SWAT but for now i cant find it, any ideas ? (1 Reply)
Discussion started by: XP_2600
1 Replies
Login or Register to Ask a Question