Re: [osol-discuss] dtrace io on zfs

2010-08-19 Thread Sergio Troiano
Hi,
I'm working in a zfs_log monitor, mi idea is to create a backup fileserver, at 
first place the source server log each zfs syscall and then another server 
takes them and replicate the information copying each diference (via NFS),

My problem is that some transactions don't appear in the log, i've been reading 
a lot about it thinking about drops , then i changed  the swhitchrate and the 
buffersize but they didn't work.
i leave you mi d scritp:
Tanks!

#!/usr/sbin/dtrace -s   
#pragma D option bufsize=10m
#pragma D option switchrate=20hz
# pragma D option quiet

zfs_mkdir:entry
{
self-ts = timestamp;
self-filepath = args[0]-v_path;
self-dirname = args[1];
self-perms = args[2]-va_mode;

}
zfs_mkdir:return
/self-filepath  self-ts  args[1] == 0/

{
 
  printf(%s\t%s\t%d\n, probefunc, stringof(self-filepath), timestamp -  
self-ts);
  
self-filepath = 0;
self-dirname = 0; 
self-ts = 0; 
self-perms = 0; 

}

zfs_write:entry,
zfs_read:entry 
{
self-ts = timestamp;
self-filepath = args[0]-v_path;
}
zfs_write:return,
zfs_read:return
/self-filepath  self-ts  args[1] == 0/
{
printf(%s\t%s\t%d\n, probefunc, stringof(self-filepath),timestamp );
self-filepath = 0;
self-ts = 0;

}

zfs_create:entry

{
self-ts = timestamp;
self-filepath = args[0]-v_path;
self-filename = args[1];
self-perms = args[2]-va_mode;
}
zfs_create:return
/self-ts  self-filepath  self-filename  self-perms  args[1] == 0/
{
printf(%s\t%s/%s\t%o\t%d\n, probefunc, stringof(self-filepath), 
stringof(self-filename), self-perms,timestamp);
self-filepath = 0;
self-filename = 0;
self-ts = 0;
self-perms = 0; 
}   
 
zfs_rmdir:entry
{
self-ts = timestamp;
self-filepath = args[0]-v_path;
self-dirname = args[1];
}
zfs_rmdir:return
/self-filepath  self-dirname  self-ts  args[1] == 0/
{   
printf(%s\t%s/%s\t%d\n, probefunc, stringof(self-filepath), 
stringof(self-dirname), timestamp);
self-filepath = 0;
self-dirname = 0;
self-ts = 0;
  
}

zfs_remove:entry
{
self-ts = timestamp;
self-filepath = args[0]-v_path;
self-filename = args[1];
}
zfs_remove:return
/self-filepath  self-ts  self-filename  args[1] == 0/
{
 printf(%s\t%s/%s\t%d\n, probefunc, stringof(self-filepath), 
stringof(self-filename), timestamp);
self-filepath = 0;
self-filename = 0;
self-ts = 0;
}   
zfs_rename:entry
{   

self-ts = timestamp;
self-filepathsource = args[0]-v_path;
self-filenamesource = args[1];
self-filepathdest = args[2]-v_path;
self-filenamedest = args[3];
}   
zfs_rename:return
/self-ts  self-filepathsource  self-filenamesource  self-filepathdest 
 self-filenamedest  args[1] == 0/
{ 
 printf(%s\t%s/%s\t%s/%s\t%d\n, probefunc, stringof(self-filepathsource),
 stringof(self-filenamesource),stringof(self-filepathdest), 
stringof(self-filenamedest), timestamp );
 self-filepathsource = 0;
 self-filenamesource = 0;
 self-filepathdest = 0;
 self-filenamedest = 0;
 self-ts = 0;
}
 
 
zfs_symlink:entry
{   
self-ts = timestamp;
self-filepathdest = args[0]-v_path;
self-filenamedest = args[1];
self-linkname = args[3];
self-perms = args[2]-va_mode;
}

zfs_symlink:return
/self-filepathdest self-ts  self-filenamedest  self-linkname  
args[1] == 0/
{

 printf(%s\t%s\t%s/%s\t%o\t%d\n, probefunc, stringof(self-linkname), 
stringof(self-filepathdest), stringof(self-filenamedest),
 self-perms,timestamp );
 self-filepathsdest= 0;
 self-filenamesdest= 0;
 self-flinkname= 0;
 self-ts = 0;
 self-perms = 0;
}
zfs_link:entry
{
self-ts = timestamp;
self-filepathdest = args[0]-v_path;
self-filenamedest = args[2];
self-filenamesource = args[1]-v_path;
}
 
zfs_link:return
/self-ts  self-filepathdest  self-filenamedest  self-filenamesource 
 args[1] == 0/
{
 printf(%s\t%s\t%s/%s\t%d\n, probefunc, 
stringof(self-filenamesource),stringof(self-filepathdest),  
stringof(self-filenamedest), timestamp );
 self-filepathdest = 0;
 self-filenamesource = 0;
 self-filenamesource = 0;
 self-ts = 0;
}
zfs_setattr:entry 
{
self-ts = timestamp;
self-fileid = args[0]-v_path;
}
 
zfs_setattr:return
/self-ts  self-fileid   args[1] == 0/
{
 printf(%s\t%s\t%d\n, probefunc, stringof(self-fileid), timestamp );
 self-fileid = 0;
 self-ts = 0;
}
zfs_readdir:entry
{
self-ts = timestamp;
self-fileid = args[0]-v_path;
}
 
zfs_readdir:return
/self-ts  self-fileid   args[1] == 0/
{
printf(%s\t%s\t%d\n, probefunc, stringof(self-fileid), timestamp);
self-fileid = 0;
self-ts = 0;
}
-- 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list

Re: [osol-discuss] [dtrace-discuss] How to dtrace thread_reaper?

2009-10-20 Thread Thomas Blank
Hi Jon, hi Brian,
thank you both very much for your quick and detailed responses.
Jon, the code you sent me is exactly what I was looking for! I added some 
probes to have some more information.

 Thus the entry probe will only ever be fired once during the kernel 
 initialisation, and by the time you run your dtrace script, 
 thread_reaper:entry has long gone.
This was my fault... 

Best regards,
Thomas
-- 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] dtrace

2009-03-09 Thread Tirthankar

Refer to
http://blogs.sun.com/binujp/entry/dtrace_provider_for_python

Thanks,
Tirthankar

http://blogs.sun.com/tirthankar



On 03/09/09 11:22, gautham k wrote:

how to write our own probes for integrating dtrace with other scripting 
langauage. eg:python
  

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


[osol-discuss] dtrace

2009-03-08 Thread gautham k
how to write our own probes for integrating dtrace with other scripting 
langauage. eg:python
-- 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


[osol-discuss] dtrace quantize file desctriptors

2008-08-21 Thread Allan
Hi, 
I am a new to dtrace and have a little question I am hoping you could clear up.
When I run the following I command I get the ouput of the file which is being 
stat by ftsat64, when I quantize this what reference is the Value field using

dtrace -n syscall::fstat64:entry'[EMAIL PROTECTED](arg0)}'

  /opt/VRTSperl/lib/5.8.6/vars.pm
   value  - Distribution - count
   2 | 0
   4 |@@@  4
   8 |@42
  16 | 0
 
  /usr/lib/iconv/alias
   value  - Distribution - count
   4 | 0
   8 |@3
  16 |@@@  21
  32 | 0
 
  /opt/VRTSperl/lib/5.8.6/Carp.pm
   value  - Distribution - count
   2 | 0
   4 |@12
   8 |@@@  42
  16 | 0
 
  unknown
   value  - Distribution - count
  -1 | 0
   0 |@@   16
   1 | 112
   2 |@@   42
   4 | 116
   8 | 0

Just looking for some pointers really on what this would relate to.

Al
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] dtrace quantize file desctriptors

2008-08-21 Thread Robert Milkowski
Hello Allan,

Thursday, August 21, 2008, 11:15:02 AM, you wrote:

A Hi, 
A I am a new to dtrace and have a little question I am hoping you could clear 
up.
A When I run the following I command I get the ouput of the file
A which is being stat by ftsat64, when I quantize this what reference is the 
Value field using

A dtrace -n
A syscall::fstat64:entry'[EMAIL PROTECTED](arg0)}'

A   /opt/VRTSperl/lib/5.8.6/vars.pm
Avalue  - Distribution - count
A2 | 0
A4 |@@@  4
A8 |@42
A   16 | 0
A  
A   /usr/lib/iconv/alias
Avalue  - Distribution - count
A4 | 0
A8 |@3
A   16 |@@@  21
A   32 | 0
A  
A   /opt/VRTSperl/lib/5.8.6/Carp.pm
Avalue  - Distribution - count
A2 | 0
A4 |@12
A8 |@@@  42
A   16 | 0
A  
A   unknown
Avalue  - Distribution - count
A   -1 | 0
A0 |@@   16
A1 | 112
A2 |@@   42
A4 | 116
A8 | 0

A Just looking for some pointers really on what this would relate to.


Above example doesn't make much sense - you are getting a quantization
on file descriptor number across all processes in a system - not
really helpful I guess.


What are you trying to achieve?

I also suggest to ask this question at dtrace discussion list.

-- 
Best regards,
 Robert Milkowski   mailto:[EMAIL PROTECTED]
   http://milek.blogspot.com

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] dtrace quantize file desctriptors

2008-08-21 Thread Allan
Folks,

I have the answer of what I was looking for thanks to Clive King, It was a wood 
for the tree's moment so thanks for all the replies.

Allan
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


[osol-discuss] DTrace normalize

2008-01-09 Thread Victor Feng
profile:::tick-1sec
/this-cnt == 10/
{
normalize(@runq, 1);
printa([EMAIL PROTECTED], @runq);
exit(0);
}

The output is an integer, but I want a decimal, e.g. 7.4 instead of 7.  How 
could I do that?

Thanks
Victor
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] DTrace Graphical User Interface (GUI)

2007-10-31 Thread Nasser Nouri
The new version of the NetBeans DTrace GUI plug-in is ready for download.

http://www.netbeans.org/kb/dtracegui_plugin/NetBeans_DTrace_GUI_Plugin.html

The NetBeans DTrace GUI plug-in works with Sun Studio 12 IDE, NetBeans IDE 
5.5.1 and NetBeans 6.0 Beta 2.

Regards,
__Nasser
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] DTrace Graphical User Interface (GUI)

2007-07-30 Thread Nasser Nouri
The DTrace GUI puts more emphasis on ease of use. Users with different levels 
of expertise in DTrace, can use the GUI to debug their systems, processes, and 
applications. 

Basically, it shortens learning curve and enables users to utilize DTrace 
before they become an expert in writing D scripts. For instance, the code 
completion feature helps users with writing D scripts. The code completion 
feature is not included in first release of the DTrace GUI.

On the other hand, Chime is an excellent graphical tool for visualizing DTrace 
aggregations.  We should be able to integrate these tools in near future.

Regards,
__Nasser
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] DTrace Graphical User Interface (GUI)

2007-07-30 Thread David Lloyd

Nasser,

  For instance, the code completion feature helps users with writing D 
scripts.
  The code completion feature is not included in first release of the
  DTrace GUI.

Believe me, such features are very useful for seasoned programmers as 
well. Not that I'm a D scripter by any means, but Java without code 
complete (as in Netbeans or Eclipse) is a PITA.

DSL
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] DTrace Graphical User Interface (GUI)

2007-07-27 Thread Richard L. Hamilton
 The purpose of this message is to announce the
 availability of the
 NetBeans plug-in module for DTrace.
 
 The NetBeans DTrace plug-in module is a Graphical
 User Interface (GUI)
 for running DTrace scripts.
 
 The DTrace plug-in module works with both Sun Studio
 12 IDE and NetBeans
 IDE 5.5.1.
[...]

Aside from integrating into the Studio 12 IDE (I guess that's quite cool,
for those who like IDEs rather than plain old vi+make) and being usable
with the rest of NetBeans, how does this compare in terms of what one
can do with Chime?  Is there, or could there reasonably eventually be,
some way to do one in terms of the other, so that they shared as much
code as possible?

I guess I'd like to see both a standalone(-seeming) _and a NetBeans component
DTrace GUI, with as much as possible of the functionality either presently
has now, along with the combined effort going into both for future
enhancements.

Hopefully, the functionality of Apple's XRay tool is also being looked at
for ideas...
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] DTrace Graphical User Interface (GUI)

2007-07-27 Thread Calum Benson
On Fri, 2007-07-27 at 03:35 -0700, Richard L. Hamilton wrote:

 Hopefully, the functionality of Apple's XRay tool is also being looked at
 for ideas...

Hopefully the main idea being wtf didn't *we* do this first? :)

Cheeri,
Calum.

-- 
CALUM BENSON, Usability Engineer   Sun Microsystems Ireland
mailto:[EMAIL PROTECTED]GNOME Desktop Group
http://ie.sun.com  +353 1 819 9771

Any opinions are personal and not necessarily those of Sun Microsystems

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


[osol-discuss] DTrace Graphical User Interface (GUI)

2007-07-26 Thread Nasser Nouri
The purpose of this message is to announce the availability of the
NetBeans plug-in module for DTrace.

The NetBeans DTrace plug-in module is a Graphical User Interface (GUI)
for running DTrace scripts.

The DTrace plug-in module works with both Sun Studio 12 IDE and NetBeans
IDE 5.5.1.

Users are allowed to run D scripts from the GUI, even those that are embedded 
in shell scripts. In fact, the DTrace GUI runs the entire D scripts that are 
packaged in DTraceToolkit.  The DTraceToolkit is a collection of useful 
documented scripts developed by the OpenSolaris DTrace community.

You can download the DTrace Graphical User Interface (GUI) plug-in module 
from http://plugins.netbeans.org web site. 

Once the  dtrace-gui.zip file is downloaded, use the the unzip utility to 
unzip the file and follow the instructions in the 
NetBeans_DTrace_plug-in_module.html file to install the DTrace plug-in into the 
Sun Studio 12 IDE or NetBeans IDE 5.5.1.

The NetBeans_DTrace_plug-in_module.html file can be found in dtrace-gui.zip 
package.

Thanks,
__Nasser
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] Dtrace Question

2007-03-12 Thread Mello

On 3/12/07, Ian [EMAIL PROTECTED] wrote:

Hi People - I'm new to the OpenSolaris forum so  be gentle with me ;)

Can someone please help me with this question ?

Are there ay Dtrace scripts available anywhere which would be usful to 
Monitor/Diagnose Sun Webserver ??
I've had a good look and found nothing specific for Sun WS ?

Would iosnoop be useful ?

Any help apreciated

Ian




Hi Ian,
I'm not an expert on Dtrace but I had bookmarked some links on the
topic, they may be useful to you too.

If you don't know them already, here they are:
http://www.sun.com/bigadmin/content/dtrace/ (obviously)
which links to http://www.brendangregg.com/dtrace.html (examples that
use the DTrace language)
http://prefetch.net/

Good luck,
-mw
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


[osol-discuss] DTrace: How to print string in C++

2006-11-28 Thread eric wang
How to print string in C++:
e.g.  string Fun(string a, int b)

Then I'll try to printf the return value of this Fun().

*:return
{
printf(ret = %s, stringof(arg0));
...
}

But DTrace told that this use is uncorrect.

Then how to get the return string value??
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org