Sponsored Content
Operating Systems Solaris file open/read/write/close/access by process Post 302378590 by jlliagre on Tuesday 8th of December 2009 08:25:42 AM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
SOCKETCALL(2)						     Linux Programmer's Manual						     SOCKETCALL(2)

NAME
socketcall - socket system calls SYNOPSIS
#include <linux/net.h> int socketcall(int call, unsigned long *args); DESCRIPTION
socketcall() is a common kernel entry point for the socket system calls. call determines which socket function to invoke. args points to a block containing the actual arguments, which are passed through to the appropriate call. User programs should call the appropriate functions by their usual names. Only standard library implementors and kernel hackers need to know about socketcall(). call Man page SYS_SOCKET socket(2) SYS_BIND bind(2) SYS_CONNECT connect(2) SYS_LISTEN listen(2) SYS_ACCEPT accept(2) SYS_GETSOCKNAME getsockname(2) SYS_GETPEERNAME getpeername(2) SYS_SOCKETPAIR socketpair(2) SYS_SEND send(2) SYS_RECV recv(2) SYS_SENDTO sendto(2) SYS_RECVFROM recvfrom(2) SYS_SHUTDOWN shutdown(2) SYS_SETSOCKOPT setsockopt(2) SYS_GETSOCKOPT getsockopt(2) SYS_SENDMSG sendmsg(2) SYS_RECVMSG recvmsg(2) SYS_ACCEPT4 accept4(2) SYS_RECVMMSG recvmmsg(2) SYS_SENDMMSG sendmmsg(2) CONFORMING TO
This call is specific to Linux, and should not be used in programs intended to be portable. NOTES
On a some architectures--for example, x86-64 and ARM--there is no socketcall() system call; instead socket(2), accept(2), bind(2), and so on really are implemented as separate system calls. On x86-32, socketcall() was historically the only entry point for the sockets API. However, starting in Linux 4.3, direct system calls are provided on x86-32 for the sockets API. This facilitates the creation of seccomp(2) filters that filter sockets system calls (for new user-space binaries that are compiled to use the new entry points) and also provides a (very) small performance improvement. SEE ALSO
accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), listen(2), recv(2), recvfrom(2), recvmsg(2), send(2), sendmsg(2), sendto(2), setsockopt(2), shutdown(2), socket(2), socketpair(2) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2017-09-15 SOCKETCALL(2)
All times are GMT -4. The time now is 10:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy