<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>I am looking at moving from openindiana to omnios and I have a dtrace script (below) that works on openindiana however I have tried running it on the latest omnios r151010 and it doesn’t run with the error ": No such file or directory"<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I am running it with ./wfileio.d, the other DTT scripts seem to work fine<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>When I run it with dtrace –s wfileio.d I also get an error “dtrace: failed to compile script wfileio.d: line 39: failed to set option ‘quiet’: Invalid option name<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#!/usr/sbin/dtrace -s<o:p></o:p></p><p class=MsoNormal>/*<o:p></o:p></p><p class=MsoNormal>* wfileio.d - write file I/O stats, with cache miss rate.<o:p></o:p></p><p class=MsoNormal>*             Written using DTrace (Solaris 10 3/05)<o:p></o:p></p><p class=MsoNormal>*<o:p></o:p></p><p class=MsoNormal>* This script provides statistics on the number of reads and the bytes<o:p></o:p></p><p class=MsoNormal>* read from filesystems (logical), and the number of bytes read from<o:p></o:p></p><p class=MsoNormal>* disk (physical). A summary is printed every five seconds by file.<o:p></o:p></p><p class=MsoNormal>*<o:p></o:p></p><p class=MsoNormal>* A total miss-rate is also provided for the file system cache.<o:p></o:p></p><p class=MsoNormal>*<o:p></o:p></p><p class=MsoNormal>* $Id: wfileio.d 3 2007-08-01 10:50:08Z brendan $<o:p></o:p></p><p class=MsoNormal>*<o:p></o:p></p><p class=MsoNormal>* USAGE:            wfileio.d<o:p></o:p></p><p class=MsoNormal>*<o:p></o:p></p><p class=MsoNormal>* IDEA: Richard McDougall, Solaris Internals 2nd Ed, FS Chapter.<o:p></o:p></p><p class=MsoNormal>*<o:p></o:p></p><p class=MsoNormal>* COPYRIGHT: Copyright (c) 2006 Brendan Gregg.<o:p></o:p></p><p class=MsoNormal>*<o:p></o:p></p><p class=MsoNormal>* CDDL HEADER START<o:p></o:p></p><p class=MsoNormal>*<o:p></o:p></p><p class=MsoNormal>*  The contents of this file are subject to the terms of the<o:p></o:p></p><p class=MsoNormal>*  Common Development and Distribution License, Version 1.0 only<o:p></o:p></p><p class=MsoNormal>*  (the "License").  You may not use this file except in compliance<o:p></o:p></p><p class=MsoNormal>*  with the License.<o:p></o:p></p><p class=MsoNormal>*<o:p></o:p></p><p class=MsoNormal>*  You can obtain a copy of the license at Docs/cddl1.txt<o:p></o:p></p><p class=MsoNormal>*  or <a href="http://www.opensolaris.org/os/licensing">http://www.opensolaris.org/os/licensing</a>.<o:p></o:p></p><p class=MsoNormal>*  See the License for the specific language governing permissions<o:p></o:p></p><p class=MsoNormal>*  and limitations under the License.<o:p></o:p></p><p class=MsoNormal>*<o:p></o:p></p><p class=MsoNormal>* CDDL HEADER END<o:p></o:p></p><p class=MsoNormal>*<o:p></o:p></p><p class=MsoNormal>* 19-Mar-2006  Brendan Gregg   Created this.<o:p></o:p></p><p class=MsoNormal>* 23-Apr-2006      "      "   Last update.<o:p></o:p></p><p class=MsoNormal>* 20-Mar-2014  Linda Kateley     Modified into writes<o:p></o:p></p><p class=MsoNormal>*/<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#pragma D option quiet<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>self int trace;<o:p></o:p></p><p class=MsoNormal>uint64_t lbytes;<o:p></o:p></p><p class=MsoNormal>uint64_t pbytes;<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>dtrace:::BEGIN<o:p></o:p></p><p class=MsoNormal>{<o:p></o:p></p><p class=MsoNormal>                trace("Tracing...\n");<o:p></o:p></p><p class=MsoNormal>}<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>fbt::fop_write:entry<o:p></o:p></p><p class=MsoNormal>/self->trace == 0 && args[0]->v_path/<o:p></o:p></p><p class=MsoNormal>{<o:p></o:p></p><p class=MsoNormal>                self->pathname = cleanpath(args[0]->v_path);<o:p></o:p></p><p class=MsoNormal>                @wio[self->pathname, "logical"] = count();<o:p></o:p></p><p class=MsoNormal>                lbytes += args[1]->uio_resid;<o:p></o:p></p><p class=MsoNormal>                self->size = args[1]->uio_resid;<o:p></o:p></p><p class=MsoNormal>                self->uiop = args[1];<o:p></o:p></p><p class=MsoNormal>}<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>fbt::fop_write:return<o:p></o:p></p><p class=MsoNormal>/self->size/<o:p></o:p></p><p class=MsoNormal>{<o:p></o:p></p><p class=MsoNormal>                @wbytes[self->pathname, "logical"] =<o:p></o:p></p><p class=MsoNormal>                    sum(self->size - self->uiop->uio_resid);<o:p></o:p></p><p class=MsoNormal>                self->size = 0;<o:p></o:p></p><p class=MsoNormal>                self->uiop = 0;<o:p></o:p></p><p class=MsoNormal>                self->pathname = 0;<o:p></o:p></p><p class=MsoNormal>}<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>io::bdev_strategy:start<o:p></o:p></p><p class=MsoNormal>/self->size && args[0]->b_flags & B_READ/<o:p></o:p></p><p class=MsoNormal>{<o:p></o:p></p><p class=MsoNormal>                @wio[self->pathname, "physical"] = count();<o:p></o:p></p><p class=MsoNormal>                @wbytes[self->pathname, "physical"] = sum(args[0]->b_bcount);<o:p></o:p></p><p class=MsoNormal>                pbytes += args[0]->b_bcount;<o:p></o:p></p><p class=MsoNormal>}<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>profile:::tick-5s<o:p></o:p></p><p class=MsoNormal>{<o:p></o:p></p><p class=MsoNormal>                trunc(@wio, 20);<o:p></o:p></p><p class=MsoNormal>                trunc(@wbytes, 20);<o:p></o:p></p><p class=MsoNormal>                printf("\033[H\033[2J");<o:p></o:p></p><p class=MsoNormal>                printf("\nWrit IOPS, top 20 (count)\n");<o:p></o:p></p><p class=MsoNormal>                printa("%-54s %10s %10@d\n", @wio);<o:p></o:p></p><p class=MsoNormal>                printf("\nWrite Bandwidth, top 20 (bytes)\n");<o:p></o:p></p><p class=MsoNormal>                printa("%-54s %10s %10@d\n", @wbytes);<o:p></o:p></p><p class=MsoNormal>                trunc(@wio);<o:p></o:p></p><p class=MsoNormal>}<o:p></o:p></p></div></body></html>