file open/read/write/close/access by process


 
Thread Tools Search this Thread
Operating Systems Solaris file open/read/write/close/access by process
# 1  
Old 12-08-2009
file open/read/write/close/access by process

Hi

want to know what file (descriptor+filename+socket) is being accessed [open,read,write,seek,lseek,close etc] by particular process on solaris.

Purpose : while running perf. test, needs to find where is the bottleneck.

We are providing concurrnet load for around 1 hr and needs to capture data related to file usage pattern by java(its weblogic on sol 10)

one thing is using truss/strace etc, however any good script/tools already avail ?

Not : lsof is not useful, as lsof will give open file at a time, we needs to capture all file related operation for given time period.


Raxit Sheth

Last edited by vbe; 12-08-2009 at 08:28 AM.. Reason: rm URL
# 2  
Old 12-08-2009
Here is a truss command I often use:
Code:
truss -dDaef -t exec,open,stat,chdir,read,write,accept,creat,link,unlink,mknod,chmod,chown,lseek,mount,umount,fstat,access,dup,pipe,chroot,lstat,symlink,fchmod,fchown,pread,pwrite,llseek,kaio,stat64,lstat64,fstat64,pread64,pwrite64,creat64,open64,so_socket,so_socketpair,bind,listen,connect,shutdown,recv,recvfrom,send,sendto,getpeername,fork -p pid >/tmp/truss.out 2>&1

With dtrace, you might start with iosnoop: http://www.brendangregg.com/DTrace/iosnoop
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

samba read write access to owner and no access to other users

Hi All, I want to configure samba share permission so that only directory creator/owner has a read and write permission and other users should not have any read/write access to that folder.Will that be possible and how can this be achieved within samba configuration. Regards, Sahil (1 Reply)
Discussion started by: sahil_shine
1 Replies

2. UNIX for Advanced & Expert Users

Close file descriptor without terminating process

Can any help me in finding the way to close opened file descriptor in Solaris ,without killing process. As accidently a file was removed which was opened by a process. Much thanks in advance :) (11 Replies)
Discussion started by: nitj
11 Replies

3. Programming

when parent process close, how to close the child?

can someone provide an example, where if the parent process quits for any reason, then the child process will also close? (3 Replies)
Discussion started by: omega666
3 Replies

4. Programming

help with write-read locks inter-process

I need help!Many Thanks! Now,I try to manage the shared memory inter-process . Inevitably,I have to deal with the synchronous. I know the pthread_rwlock in posix,and I compile ,then run successfully in Red Hat Enterprise 4. I have a doubt about whether the Posix supports the system such as... (1 Reply)
Discussion started by: weizh
1 Replies

5. Windows & DOS: Issues & Discussions

Can DOS close an open file?

I'm trying to setup a cron job for my brother that goes out to the web and retrieves an excel file and overwrites the existing copy on his desktop. The problem I'm facing is I have to kill the process (excel.exe) if the file is open while the batch file runs, otherwise, it will create another copy... (2 Replies)
Discussion started by: quattro20v
2 Replies

6. UNIX for Dummies Questions & Answers

user & group read/write access question

folks; I created a new users on my SUSE box and i need to give this user/group a read write access to one specific folder. here's the details: - I created new user "funny" under group "users". - I need to give this user "funny" a read/write access to another directory that is owned by "root".... (3 Replies)
Discussion started by: Katkota
3 Replies

7. UNIX for Dummies Questions & Answers

How do i access (mount, read & write) a floppy disk from the console, not being root?

welll, the title quite explains what i want to do thanks for your time! (4 Replies)
Discussion started by: kfaday
4 Replies

8. UNIX for Dummies Questions & Answers

Should a UNIX daemon process close open fds?

I have a UNIX daemon process that's been started by a parent process, an application server. The behavior of this daemon process is to inherit and use the app server's file descriptors (ports/sockets). When I shutdown the app server, the daemon continues to run, because there may be other... (1 Reply)
Discussion started by: kunalashar
1 Replies

9. Shell Programming and Scripting

Performing an open/read, open/write

I'm trying to do two different things (converting an OpenVms .com to a ksh shell script): 1) open/read/err= 2) open/write/err= Any help? I've found some things, but can't seem to find the correct way. (1 Reply)
Discussion started by: prosserj
1 Replies

10. UNIX for Dummies Questions & Answers

File status - open/close ??

Is there any commands in UNIX, like isopen(),isclose() to know whether a file has been opened for read/write purpose.? Thanks (3 Replies)
Discussion started by: Pal
3 Replies
Login or Register to Ask a Question