Premal Gandhi
2007-Apr-19 21:16 UTC
[dtrace-discuss] How to Log the status(dtrace::) messages from a dtrace program?
I executed the following dtrace command> dtrace -w -s defects-CSCsh18087-dscript.d-new `pgrep sip` 0dtrace: script ''defects-CSCsh18087-dscript.d-new'' matched 4 probes dtrace: allowing destructive actions How do I log the "dtrace::" messages to a file ? I cannot pipe or redirect output. Please can you suggest some way to log these messages to a file. Also if I try to do 2 > log.txt, it complains and does not allow me to do so. Thanks and regards Premal This message posted from opensolaris.org
Jon Haslam
2007-Apr-20 17:05 UTC
[dtrace-discuss] How to Log the status(dtrace::) messages from a dtrace program?
Hi Premal,>> dtrace -w -s defects-CSCsh18087-dscript.d-new `pgrep sip` 0 >> > dtrace: script ''defects-CSCsh18087-dscript.d-new'' matched 4 probes > dtrace: allowing destructive actions > > How do I log the "dtrace::" messages to a file ? > > I cannot pipe or redirect output. Please can you suggest some way to log these messages to a file. > Also if I try to do 2 > log.txt, it complains and does not allow me to do so.If you just want to redirect stderr of the dtrace(1M) consumer then just use ''2>log.txt''. Note, there is no whitespace. If I''ve misunderstood your problem, let me know. Jon.
Wee Yeh Tan
2007-Apr-22 10:07 UTC
[dtrace-discuss] How to Log the status(dtrace::) messages from a dtrace program?
On 4/20/07, Premal Gandhi <pgandhi at cisco.com> wrote:> I executed the following dtrace command > > > dtrace -w -s defects-CSCsh18087-dscript.d-new `pgrep sip` 0 > dtrace: script ''defects-CSCsh18087-dscript.d-new'' matched 4 probes > dtrace: allowing destructive actions > > How do I log the "dtrace::" messages to a file ? > > I cannot pipe or redirect output. Please can you suggest some way to log these messages to a file. > Also if I try to do 2 > log.txt, it complains and does not allow me to do so.At the risk of sounding stupid, are you looking for the "-o" flag to dtrace(1M)? -- Just me, Wire ... Blog: <prstat.blogspot.com>