similar to: getting extra characters with printf(copyin(a, b))

Displaying 20 results from an estimated 500 matches similar to: "getting extra characters with printf(copyin(a, b))"

2005 Aug 12
3
Funny output from write syscall
I have a clause that look like this: syscall::write:entry /execname == "ntpd" && self->recspec/ { speculate(self->recspec); printf(" fd=%d buf=%d\n%s",arg0,arg2, stringof(copyin(arg1,arg2-1))); } The ntpd program always write a \n trminated string in this context, so I used the "arg2-1" to drop the \n. This works
2008 Jul 07
2
copyin having secondary effects.
Dtracing gethostbyname I''m trying to read the h_alias array and all the entries it points to however every time I copyin an entry pointed to by the first entry in teh h_alias array the other entries in the array get corrupted. So I have ended up with this script: #!/usr/bin/dtrace -CZs #include <netdb.h> pid$target::gethostbyname_r:return { self->r = (struct hostent
2007 Jul 13
1
how to get scratch buffer in dtrace.
the Subroutines copyinto copies data at user address to scratch buffer, but how can i get the buffer used by the 3rd argument in copyinto; thanks. -- This message posted from opensolaris.org
2006 Aug 08
9
Handling userland char ** pointers
I''ve been trying to get access to a userland string that''s behind a second level pointer using DTrace, but I can''t seem to get it to work. I started with the example on the Team DTrace Tips and Tricks slides: trace(copyinstr(*(uintptr_t *)copyin(arg0, curpsinfo->pr_dmodel == PR_MODEL_ILP32 ? 4 : 8))); And when I couldn''t get it to work, I started
2005 Jul 28
3
speculative tracing on nevada builds ?
Hi, Has something related to speculative tracing changed between s10 FCS and the more recent nevada builds ? I was trying the specopen.d script from the Dtrace guide on a nevada machine and it failed with : dtrace: failed to enable ''./spec.d'': DIF program content is invalid To try and narrow things down a bit I wrote the following short script. This works fine on s10, but
2006 May 24
2
Reading external files with dtrace
I''d like to be able to dynamically read external configuration files within a dtrace script. I know dtrace allows inclusion of C header files but only at the preprocessing stage. What we need to do is dynamically enable/disable probes based on current application settings. I''d rather not have a bunch of independant scripts running and being started and killed whenever the
2008 Apr 20
1
dtrace script to monitor file access
A user has asked us to find out who is changing one of their files and how it is being changed. I came up with the script below: #!/usr/sbin/dtrace -s #pragma D option quiet BEGIN { printf("\n Timestamp gid uid pid ppid execname function current directory file name\n\n"); } syscall::open:entry,
2007 Jul 30
3
dtrace
hi fnds, i want to print the filenames on which the stat system call is acting when a stat system call is invoked. can anyone can help me this regard. Thanks jeevan
2008 May 20
6
Dtrace queries - predicates & func arg tracing
[1] Predicates in one-liners I would like to list the probe modules in my executable and then dynamically create a dscript to trace execution of those modules alone (by excluding the 3rd party and system libraries). I tried the below script without success. The conditional given in the predicate is not taking effect. Why is this so ? $ dtrace -ln ''pid$target:::
2007 Jul 11
5
Error trying to count return points in functions.
Whilst trying out some D to get an insight into what is the most common reason for a given function to return, I have bumped into an error I don''t understand. The first take on what I was trying to do was: # dtrace -n ''fbt:ip:ip_input:return{@home[arg0] = count();}'' and all was well. The next step was: # dtrace -n
2006 Jul 31
5
use tracemem to dump content in function read/write
Hi Expert I want to use dtrace to monitor the content change of one file. I made following scripts, #!/usr/sbin/dtrace -s inline int MYPID = $1; syscall::write:entry /pid == MYPID/ { tracemem(arg1, arg2); printf("\n"); } It always has an following error bash-3.00$ sudo dumpFIFO.dtrace 3836 dtrace: failed to compile script ./dumpFIFO.dtrace: line 19: tracemem( ) argument #2
2007 Apr 18
3
dtrace-discuss: cannot get a ''string'' to print...
hi, I''m using the PID provider to trace a 32-bit app, prtdiag. I''m trying to print the value of "propname" (arg1) in the following func: int picl_get_propval_by_name(picl_nodehdl_t nodeh, const char *propname, void *valbuf, size_t nbytes) ... i''ve tried many versions, but this is a representative one: 53 this string propname; 54 55
2008 Sep 30
12
dtrace missing ''unlinkat''? showing process stack?
everyone, Just out of curiosity, I did a dtrace -n ''syscall:::entry { @num[execname, probefunc] = count(); }'' and looked at the entries produced by ''rm''. I see everything that rm did, *except* the unlinkat - which is unfortunate because I want to trace which processes have deleted which files. So - does dtrace contain unlinkat as a probe for a system call?
2005 Sep 08
3
DTrace typewriter
G''Day Folks, I''ve found another use of dtrace, this makes your console keyboard sound like a typewriter. http://www.brendangregg.com/DTrace/typewriter-0.70.tar.gz I''ve only tested it on an UltraSPARC 5 and a Pentium laptop so far, more to follow. Ok, sorry, not actually a practical use of DTrace. :) Enjoy! Brendan [Sydney, Australia]
2006 Sep 21
1
Dtrace script compilation error.
Hi All, One of the customer is seeing the following error messages. He is using a S10U1 system with all latest patches. Dtrace script is attached. I am not seeing these error messages on S10U2 system. What could be the problem? Thanks, Gangadhar. ------------------------------------------------------------------------ rroberto at njengsunu60-2:~$ dtrace -AFs /lib/svc/share/kcfd.d dtrace:
2009 Sep 17
5
"this" variables being overridden?
Hi I encountered this problem a few times in the past, but only now it is consistent enough so I can write this email. In short, the problem is that after I copy some structure from the profiled program to the dtrace space, and set a "this-dataP" variable to point to the local copy, after a while some of the fields of the local structure are overridden with junk values. In
2011 Jan 18
2
Surprise Thread Preemptions
Hi, I would like to know about which threads will be preempted by which on my OpenSolaris machine. Therefore, I ran a multithreaded program "myprogram" with 32 threads on my 24-core Solaris machine. I make sure that each thread of my program has same priority (priority zero), so that we can reduce priority inversions (saving preemptions -- system overhead). However, I ran the following
2011 Oct 26
1
Problem running zilstat script on a core install server.
We cannot run the zilstat utility (from http://www.richardelling.com/Home/scripts-and-programs-1/zilstat) on an Solaris 10 u9 / x86 installed according SUNWCreq (which is a core install) while it works fine on a similar config but installed with all packages (SUNWCXall) So we know it works in this environment but it seems we miss an essential package here. That causes the dtrace: failed to
2007 Mar 19
2
cant install or run programs from cd especially Final Fantasy VII (FF7)
ive been using wine for about a month now and ive tried a couple different versions but i cant install or run anything on wine from a CD..i did a work around for it by just copyin the cd to my hard drive and got my game installed, but it comes with 3 play disks and an install disk, and when i try to play it even when the correct play disk is in and copied everywhere on my hard drive the game still
2005 Nov 22
6
DTrace #include problems
Howdy, I am trying to migrate several scripts to use application defined types, and am running into a few issues. When I attempt to run a script with a application defined type, it looks like the DTrace preprocessor is getting angry with me: $ cat view.d #include "httpd.h" :::acceptconnection { this->addr = (conn_rec *)copyin(arg0,sizeof(conn_rec *)); } $ dtrace -C