Displaying 19 results from an estimated 19 matches for "stringof".
Did you mean:
stringop
2008 Apr 20
1
dtrace script to monitor file access
...Timestamp gid uid pid ppid execname function current directory file name\n\n");
}
syscall::open:entry, syscall::creat:entry,
syscall::open64:entry, syscall::creat64:entry,
syscall::unlink:entry, syscall::rename:entry
/strstr(stringof(copyinstr(arg0)), $1) != NULL/
{
printf("%Y %5d %5d %5d %5d %-12s %-10s %25s %s\n",
walltimestamp, gid, uid, pid, ppid, execname, probefunc, cwd, stringof(copyinstr(arg0)));
}
The script is invoked with:
./lsfacc ''&qu...
2009 Jul 24
9
getting extra characters with printf(copyin(a, b))
...This is on OpenSolaris 2009.06.
This is quite easy to reproduce.
The script is the following, where arg1 is not a string but a pointer to the key from the command and arg2 is the length of that key.
memcached*::command-get
/ (signed int) arg3 != -1 /
{
printf("get %s, FOUND KEY\n", stringof(copyin(arg1, arg2)));
}
memcached*::command-get
/ (signed int) arg3 == -1 /
{
printf("get %s, NOT FOUND\n", stringof(copyin(arg1, arg2)));
}
memcached*::command-add
/ (signed int) arg3 != -1 /
{
printf("add %s, FOUND KEY\n", stringof(copyin(arg1, arg2)));
}
memcached*::c...
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 fine about 90% of the time, but every once in a while,
the printf prints out more data than arg2 specified. It gets the
expected data okay, 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
2007 Jul 11
5
Error trying to count return points in functions.
...ID 1574 (ID 23867:
fbt:ip:ip_loopback_src_or_dst:return): invalid address (0x30) in action
#2 at DIF offset 48
dtrace: error on enabled probe ID 769 (ID 25479:
fbt:ip:ilm_lookup_ill:return): invalid address (0x52) in action #2 at
DIF offset 48
...
and all is not well. I''ve also tried stringof(arg0) but the result is
similar.
By way of testing, @home[probefunc] worked fine.
Is this a bug (fixed in nevada?) or am I just not supposed to do this?
Darren
2005 Jul 28
3
speculative tracing on nevada builds ?
...ve error on
nevada builds 14, 17 and 19 (the only builds I have access to).
I set dtrace_err_verbose=1 but didn''t get any more information.
#!/usr/sbin/dtrace -s
syscall::open:entry
{
self->spec = speculation();
speculate(self->spec);
printf("%s", stringof(copyinstr(arg0)));
}
syscall::open:return
/self->spec && errno != 0/
{
commit(self->spec);
self->spec = 0;
}
syscall::open:return
/self->spec && errno == 0/
{
discard(self->spec);
self->spec = 0;
}
Anyone got any ideas whats goin...
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:
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
2011 Jan 18
2
Surprise Thread Preemptions
...:remain-cpu
/self->preempt/
{
self->preempt = 0;
}
sched:::off-cpu
/self->preempt/
{
/*
* If we were told to preempt ourselves, see who we ended up giving
* the CPU to.
*/
@[stringof(args[1]->pr_fname), args[0]->pr_pri, execname,
curlwpsinfo->pr_pri] = count();
self->preempt = 0;
}
END
{
printf("%30s %3s %30s %3s %5s\n", "PREEMPTOR", "PRI","||&...
2006 May 09
1
Dtrace Script to find instances of a file
hi,
i need to find out no of times a file has been opened,but not yet closed.
i mean if a file has been opened for 2 times ,one for reading and another for writing and the file has not been closed,the script should display the count of total opens and also to check wheather it has been closed r not.
This message posted from opensolaris.org
2011 Oct 26
1
Problem running zilstat script on a core install server.
...uot;string" == "int (*)()"
Which is at:
fbt::zil_lwb_write_start:entry
/OPT_pool == 0 || POOL == args[0]->zl_dmu_pool->dp_spa->spa_name/
{
So it looks like "args[0]->zl_dmu_pool->dp_spa->spa_name" returns a
different type.
We can avoid this by using the stringof function.
But then in the end it fails with
dtrace: error on enabled probe ID 2 (ID 20429:
fbt:zfs:zil_lwb_write_start:entry): invalid address (0x32736d3432636d)
in predicate at DIF offset 44
What are we missing?
Thanks for your help.
Eric
2005 Oct 18
1
Error while using sdt interrupt-complete.
...cause, of course)
Thanks for any pointers,
-ps
intr.d from the SDT provider chapter in the guide.
-------------------------------------------------
interrupt-start
{
self->ts = vtimestamp;
}
interrupt-complete
/self->ts/
{
this->devi = (struct dev_info *)arg0;
@[stringof(`devnamesp[this->devi->devi_major].dn_name),
this->devi->devi_instance] = quantize(vtimestamp - self->ts);
}
output on running:
------------------
bash-3.00# dtrace -s ./intr.d > /tmp/dt.out 2>&1
bash-3.00# more /tmp/dt.out
dtrace: script ''./intr.d&...
2007 Jan 10
2
[DTrace] using C preprocessor in dtrace scripts
...gt;sd_vnode == (struct vnode *)$1
> && args[1]->b_datap->db_type == M_DATA
> /
> {
> printf("strrput mp = %p\n", args[1]);
> printf("mp->b_rptr = %*.*s\n",
> args[1]->b_wptr-args[1]->b_rptr,
> args[1]->b_wptr-args[1]->b_rptr, stringof(args[1]->b_rptr));
> }
>
> -----------------------------------------------------
>
> At any rate, without the -C, I can''t use #include <sys/stream.h>.
> Without the #include <sys/stream.h>, I can''t use the M_DATA.
> As it is, I get the following...
2006 Jul 26
9
zfs questions from Sun customer
Please reply to david.curtis at sun.com
******** Background / configuration **************
zpool will not create a storage pool on fibre channel storage. I''m
attached to an IBM SVC using the IBMsdd driver. I have no problem using
SVM metadevices and UFS on these devices.
List steps to reproduce the problem(if applicable):
Build Solaris 10 Update 2 server
Attach to an external
2007 Nov 20
6
How to dereference a pointer to a pointer
Hi. I would like to print out a field of a vnode, but the argument to
the function is of type vnode_t **.
If I set "this->vpp" to arg2 in an entry function to zfs_lookup(), I''d
like to retrieve the value of one of the fields of *(this->vpp) in the
return function. Something like the below (but the syntax below is not
right):
printf("zfs_lookup:
2007 Aug 14
8
sh DTrace provider available
As noted on my blog and at
http://www.opensolaris.org/os/community/dtrace/shells/ I''ve made
available a DTrace provider for the Bourne shell. Before anyone starts
yelling at me for not starting with another shell, read the blog I made
explaining why we started with shell (link on the community page
referenced above).
For /bin/sh, I''ve put up something akin to a chapter in
2009 Nov 19
11
dtracing a forked process OR dynamic library
Hi,
I am tracking down a problem and would like to know how I can follow a
forked process with my dtrace script, or how I can trace a dynamic library.
Here is the problem. I am tracing dtlogin, and specifically I am trying
to determine what error libpkcs11`<routine> is returning. It turns out
dtlogin forks a lot of processes, and I believe the second forked
process is the one that winds
2008 Feb 05
31
ZFS Performance Issue
This may not be a ZFS issue, so please bear with me!
I have 4 internal drives that I have striped/mirrored with ZFS and have an application server which is reading/writing to hundreds of thousands of files on it, thousands of files @ a time.
If 1 client uses the app server, the transaction (reading/writing to ~80 files) takes about 200 ms. If I have about 80 clients attempting it @ once, it can
2006 Jan 02
16
DTrace provider for NFS
FYI, I posted a blog a few days ago about a DTrace provider for NFS
that is currently in
development:
http://blogs.sun.com/roller/page/samf?entry=a_dtrace_provider_for_nfs
Let''s discuss any questions, comments, etc. here. I also advertised
this on
nfs-discuss at opensolaris.org. Naturally, I would expect the
discussion here to
be more on the specifics of DTrace, and the