At 16:10 -0600 3/9/08, Mike Gerdts wrote:
> vmstat and iostat are already written and well tested.
> Use them.

I think this is good counsel, as long as the "written
and well tested" tools give you the needed information
in a form that can parsed reliably, etc.


If not, it is quite possible to convince DTrace to do
long-term logging without incurring the overhead of a
new process starting for each set of samples.

Basically, this involves running a process which runs
dtrace(8) and writes the output to a log file.  The
process blocks when no input is available, so no cron
or other explicit scheduling is needed.

Of course, there are some complications.  For example,
DTrace isn't equipped with string-handling facilities,
so it can be hard to generate output that can be parsed
reliably.  Also, if the vendor allows an application to
turn off tracing, any logging attempt will suffer.

If you would like to know more about this approach, see
http://www.cfcl.com/DT_Logger, my configurable logging
suite, based on DTrace and intended for "set and forget"
operation.

-r
-- 
http://www.cfcl.com/rdm            Rich Morin
http://www.cfcl.com/rdm/resume     [EMAIL PROTECTED]
http://www.cfcl.com/rdm/weblog     +1 650-873-7841

Technical editing and writing, programming, and web development
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to