Re: [dtrace-discuss] stack tracing and uregs[]

2008-03-24 Thread bryan
Here is the latest script that I used just so i could see the values at both entry and return for both handle_reply and strcpy: - #!/usr/sbin/dtrace -s pid$1::handle_reply:entry { printf("\nEBP=%x EIP=%x\n", uregs[R_EBP], uregs[R_EIP]); } pid$1::strcpy:entry {

Re: [dtrace-discuss] process snoop (shellsnoop for arbitrary application)

2008-03-24 Thread Alan Coopersmith
Salman Jamali wrote: > Thanks. I read about X11, and i understand that i'll need to observe the > keyPress events, and fetch the keys and associate them with the process that > has the keyboard focus. > > I have two issues. > > 1- I am using the latest Solaris Express Developer Edition 01/08, a

Re: [dtrace-discuss] process snoop (shellsnoop for arbitrary application)

2008-03-24 Thread Salman Jamali
Is there any way to get client pid from a client id? client-auth is the only probe that has client pid as an argument, but this probe is missing from in my OpenSolaris. Also, I need hints about how to get the client id of the process having the keyboard focus. Please help. Thanks! -- This me

Re: [dtrace-discuss] stack tracing and uregs[]

2008-03-24 Thread Adam Leventhal
Can you send the DTrace invocation that you're using, please? Adam On Sun, Mar 23, 2008 at 09:16:25PM -0700, bryan wrote: > I'm doing research into stack monitoring and have made a simple server that > has the following method: > > int handle_reply(char *str){ > char response[256]; > > strcp

Re: [dtrace-discuss] Iterating over all LWPs

2008-03-24 Thread Nicolas Williams
What I meant by the "don't use DTrace if you need to iterate" option is this: try using MDB. Given what you say you might find it a lot easier to sample the items you need via MDB. ___ dtrace-discuss mailing list dtrace-discuss@opensolaris.org

Re: [dtrace-discuss] Iterating over all LWPs

2008-03-24 Thread Roman Shaposhnik
On Mon, 2008-03-24 at 12:37 -0500, Nicolas Williams wrote: > On Mon, Mar 24, 2008 at 10:35:43AM -0700, Roman Shaposhnik wrote: > > Any suggestions? > > Either don't use DTrace if you need to iterate, or start the target via > DTrace so you can keep track of all the LWPs in your D script. And how

Re: [dtrace-discuss] Iterating over all LWPs

2008-03-24 Thread Nicolas Williams
On Mon, Mar 24, 2008 at 10:35:43AM -0700, Roman Shaposhnik wrote: > Any suggestions? Either don't use DTrace if you need to iterate, or start the target via DTrace so you can keep track of all the LWPs in your D script. ___ dtrace-discuss mailing list dt

[dtrace-discuss] Iterating over all LWPs

2008-03-24 Thread Roman Shaposhnik
Hi! Here's the problem I'm facing: I need to sample a particular attribute of all the LWPs in a given process. Now, sampling itself is no problem -- I can use profile/tick provider and all is good. The problem is: I can't seem to think of a DTrace-friendly way to iterate over all the LWPs and rep

Re: [dtrace-discuss] Using DTrace on Kernel Extensions in OS X

2008-03-24 Thread James McIlree
On Mar 22, 2008, at 7:33 AM, Kathleen wrote: > I am currently working with the ZFS port to OS X which is a kext. I > had heard that you cannot use DTrace on kexts in OS X at the > moment. Does anyone know why? The dog ate that code. Kexts are SO nineties, we think they're g

[dtrace-discuss] Auditing file modification

2008-03-24 Thread Geoffrey Wambugu
Hi all.I am new to Dtrace scripting.My problem is that i have a file in my application that i want to monitor.I want to perform a backup of the file every time the file is modified.I want the names of the backup files to have timestamp so that i can track the changes to original file based on time.