Hello Dtrace Experts, I would like to print all the file names individually which uses the below syscalls , Can anyone explain me the simple way of coding a dtrace script to do the same. syscall::read:return, syscall::write:return, syscall::open:return, syscall::close:return syscall::rename:return syscall::mkdir:return, syscall::rmdir:return syscall::creat:return, syscall::link:return, syscall::unlink:return, syscall::symlink:return Thanks in Advance, Partha This message posted from opensolaris.org
On 8/28/06, Parthasarathy J <sarathy_groups at yahoo.com> wrote:> Hello Dtrace Experts, > > I would like to print all the file names individually which uses the below syscalls , Can anyone explain me the simple way of coding a dtrace script to do the same. >Check out Brendan G''s dtrace toolkit, rwsnoop does read and write, you can use most of the same principals to do the rest with not much trouble. for more information on his tool kit and rwsnoop http://users.tpg.com.au/bdgcvb/dtrace.html James Dickens uadmin.blogspot.com> syscall::read:return, > syscall::write:return, > syscall::open:return, > syscall::close:return > syscall::rename:return > syscall::mkdir:return, > syscall::rmdir:return > syscall::creat:return, > syscall::link:return, > syscall::unlink:return, > syscall::symlink:return > > Thanks in Advance, > Partha > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >
LGreenwood at exceededucation.com
2006-Aug-29 12:09 UTC
[dtrace-discuss] Identifying Java classes running in a JVM
Hi Is there any way that dtrace can be used to identify particular classes in a JVM? I have a student who primarily looks after websphere and would be interested in being able to trace apps deployed in the web container. Thank you Cheers, Liam
On Tue, 29 Aug 2006, LGreenwood at exceededucation.com wrote:> Hi > > Is there any way that dtrace can be used to identify particular classes in > a JVM? I have a student who primarily looks after websphere and would be > interested in being able to trace apps deployed in the web container.Hi Liam, Depending on the class information you are looking for, the jmap, jps, jstack, jinfo, jconsole and jstat utilities may be able to help. If you can provide a bit more information on what your looking for, I am sure the folks on the list can help you find the right tool (or DVM probe). Thanks, - Ryan -- UNIX Administrator http://prefetch.net
Hi Partha, There''s a variable called fds which is an array indexed by the file descriptor number. Most of those functions below take or return a file descriptor which you can use to index into that array (the others take the file name itself -- easy). For example, to see what files you''re opening: syscall::open:return { trace(fds[arg1].fi_pathname); } For others, you''ll need to use the entry probe rather than the return probe. Remember that there are 64-bit versions of some of those system calls (e.g. open64(2)) that you may also want to instrument. Adam On Mon, Aug 28, 2006 at 03:13:10AM -0700, Parthasarathy J wrote:> Hello Dtrace Experts, > > I would like to print all the file names individually which uses the below syscalls , Can anyone explain me the simple way of coding a dtrace script to do the same. > > syscall::read:return, > syscall::write:return, > syscall::open:return, > syscall::close:return > syscall::rename:return > syscall::mkdir:return, > syscall::rmdir:return > syscall::creat:return, > syscall::link:return, > syscall::unlink:return, > syscall::symlink:return > > Thanks in Advance, > Partha > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Ekaterina Pavlova
2006-Aug-30 07:37 UTC
[dtrace-discuss] Identifying Java classes running in a JVM
Check out hotspot:::class_load and hotspot:::method-entry probes in JDK6.0. More details are available here: http://blogs.sun.com/kamg/entry/built_in_dtrace_probes_in Also, latest JDK6.0 build (https://jdk6.dev.java.net/) contains some DTrace samples (sample/dtrace/) -katya John Dewey wrote:>Yah, I think you can get some with jinfo, or starting the VM >with -verbose... or there may be better ways... > http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/java.html > >John > >On Tue, Aug 29, 2006 at 03:19:07PM -0400, Matty wrote: > > >>On Tue, 29 Aug 2006, LGreenwood at exceededucation.com wrote: >> >> >> >>>Hi >>> >>>Is there any way that dtrace can be used to identify particular classes in >>>a JVM? I have a student who primarily looks after websphere and would be >>>interested in being able to trace apps deployed in the web container. >>> >>> >>Hi Liam, >> >>Depending on the class information you are looking for, the jmap, jps, >>jstack, jinfo, jconsole and jstat utilities may be able to help. If you >>can provide a bit more information on what your looking for, I am sure >>the folks on the list can help you find the right tool (or DVM probe). >> >>Thanks, >>- Ryan >>-- >>UNIX Administrator >>http://prefetch.net >>_______________________________________________ >>dtrace-discuss mailing list >>dtrace-discuss at opensolaris.org >> >> >> >"Quickly, bring me a beaker of wine. So that I may wet my brain > and say something clever." -- Aristophanes >_______________________________________________ >dtrace-discuss mailing list >dtrace-discuss at opensolaris.org > >-- Ekaterina Pavlova, VMSQE Team, St. Petersburg. http://blogs.sun.com/roller/page/vmrobot http://blogs.sun.com/theaquarium_ru/
LGreenwood at exceededucation.com
2006-Aug-30 14:51 UTC
[dtrace-discuss] Identifying Java classes running in a JVM
Thank you for all the pointers! I''ll pass them on to my student. Cheers, Liam
Hi Adam, Thanks a lot for your mail. When I tried using the variable "fds" using the code snippet u provided, I was getting the below error:- dtrace: failed to compile script ./open.d: line 4: fds has not yet been declared or assigned Please do let me know regarding the same. Thanks, Partha This message posted from opensolaris.org
The fds[] array was introduced in build 17 of ONNV and is also available in Solaris 10 update 1. If you''re running Solaris 10 FCS you can get it by upgrading. Adam On Wed, Aug 30, 2006 at 11:31:27PM -0700, Parthasarathy J wrote:> Hi Adam, > > Thanks a lot for your mail. > > When I tried using the variable "fds" using the code snippet u provided, I was getting the below error:- > > dtrace: failed to compile script ./open.d: line 4: fds has not yet been declared or assigned > > Please do let me know regarding the same. > > > Thanks, > Partha > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Hello Adam, Using fds [ ] array , Is there any way to determine the owner of the files getting opened,closed etc (through syscall) . Please do let me know regarding the same. Thanks, Partha This message posted from opensolaris.org
Hi Partha, Unfortunately, there isn''t a way of getting that information from the fileinfo_t structure that the fds[] array gives you. For what you want, you''d need to do some digging into the kernel''s data structures. Adam On Wed, Oct 11, 2006 at 01:37:15AM -0700, Parthasarathy J wrote:> Hello Adam, > > Using fds [ ] array , Is there any way to determine the owner of the files getting opened,closed etc (through syscall) . > > Please do let me know regarding the same. > > Thanks, > Partha > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl