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
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
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
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
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
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
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
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
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
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
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
seek(n) Tcl Built-In Commands seek(n)
__________________________________________________________________________________________________________________________________________________
NAME
seek - Change the access position for an open channel
SYNOPSIS
seek channelId offset ?origin?
_________________________________________________________________
DESCRIPTION
Changes the current access position for channelId.
ChannelId must be an identifier for an open channel such as a Tcl standard channel (stdin, stdout, or stderr), the return value from an
invocation of open or socket, or the result of a channel creation command provided by a Tcl extension.
The offset and origin arguments specify the position at which the next read or write will occur for channelId. Offset must be an integer
(which may be negative) and origin must be one of the following:
start The new access position will be offset bytes from the start of the underlying file or device.
current The new access position will be offset bytes from the current access position; a negative offset moves the access position back-
wards in the underlying file or device.
end The new access position will be offset bytes from the end of the file or device. A negative offset places the access position
before the end of file, and a positive offset places the access position after the end of file.
The origin argument defaults to start.
The command flushes all buffered output for the channel before the command returns, even if the channel is in nonblocking mode. It also
discards any buffered and unread input. This command returns an empty string. An error occurs if this command is applied to channels
whose underlying file or device does not support seeking.
Note that offset values are byte offsets, not character offsets. Both seek and tell operate in terms of bytes, not characters, unlike
read.
EXAMPLES
Read a file twice:
set f [open file.txt]
set data1 [read $f]
seek $f 0
set data2 [read $f]
close $f
# $data1 == $data2 if the file wasn't updated
Read the last 10 bytes from a file:
set f [open file.data]
# This is guaranteed to work with binary data but
# may fail with other encodings...
fconfigure $f -translation binary
seek $f -10 end
set data [read $f 10]
close $f
SEE ALSO
file(n), open(n), close(n), gets(n), tell(n), Tcl_StandardChannels(3)
KEYWORDS
access position, file, seek
Tcl 8.1 seek(n)