OpenSolaris

You are not signed in. Sign in or register.

Generating Chime Displays on the Command Line

You can generate a display directly from the command line. For example, to run the following one-liner from Brendan Gregg's DTrace Tools:

# Read bytes by process,
dtrace -n 'sysinfo:::readch { @bytes[execname] = sum(arg0); }'

you would simply replace "dtrace" with the Chime executable:

/opt/OSOL0chime/bin/chime -n 'sysinfo:::readch { @bytes[execname] = sum(arg0); }'

Read bytes by process Read bytes by process over time

(right click on the bar graph to plot values over time; click on column headers to sort)

You can use -n to specify a program string and -s to specify a program file, just as you would with dtrace(1M). Similarly, you can specify DTrace options using -xoption=value and -Z. See the following blog entries for discussion of how the bitesize.d and procsystime scripts from the DTraceToolkit were adapted for display using Chime:

Chime and the DTraceToolkit
Chime and the DTraceToolkit Part 2

These demonstrate options such as -t to specify a title for the title bar and -h to specify column headers (as a quoted, comma-separated list). The following blog entries describe -g and -G to specify non-repeating aggregation keys, -T to add column totals, and -k to add sparklines:

Chime Non-Repeating Keys
Chime Sparklines

To save your display so you can easily run it later, use the -w option to generate XML. This automatically adds the generated display to the "New Displays" group selectable from the Trace Group pulldown in the main Chime window. For example:

; /opt/OSOL0chime/bin/chime -n 'sysinfo:::readch { @bytes[execname] = sum(arg0); }' -w
Wrote /opt/OSOL0chime/displays/new/display.xml
To run, enter "/opt/OSOL0chime/bin/chime -C /opt/OSOL0chime/displays/new/display.xml".
;

Once the display is saved using -w, you can modify it using the wizard by simply tacking a -W onto the "To run" message in the command output above.

; /opt/OSOL0chime/bin/chime -C /opt/OSOL0chime/displays/new/display.xml -W