An implementation of Brendan Gregg's USE method in dtrace & kstat, which allow for historical collection of data on SmartOS. Perfect for analysis of cloud machines running @joyent and @LuceraHQ
C++ D Shell Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

dtrace / kstat statistic services

Copyright (c) 2013 Lucera Financial Infrastructures


The included code source makes up the various components of a monitoring service that can be run on SmartOS machines, such as those running on the Joyent Public Cloud ( or on Lucera (

In general, the service is made of two parts, the generator and the collector.

The generator runs as a background process and queries kernel statistics while running DTrace scripts or Kstats outputs. The gathered information is wrapped into protocol buffers by zone and broadcast using the ZMQ publish method. The collector also runs as a background process and collectors the zone data as published by the generator. It saves the collected information into databases for later access and querying.

alt text

The source for the generator is included in the ./server folder of this directory. Two versions that can be used as collector are included in the ./fastbit and ./redis directories.

A shell script that will automatically install the generator and the FastBit collector is included in this directory. It can be downloaded and run by using

curl >

Alternatively, to install only the generator, run

curl >

Similarly, to install only the listener, run

curl >

Note that the build process for the dependencies (especially FastBit) may take a long time.

Directions for how to run the generator and collector can be found in their respective directories.

Related dependencies and build information for code below can be found in README files in respective directories.

server (generator)

Source code for statistics server. This program collects statistics from both kstat and custom DTrace scripts, encodes them using Google's Protocol Buffers and ZMQ, then broadcasts over a user-specified port.

fastbit (listener)

Source code for FastBit-based collector. Listens to statistics server (see here) and aggregates data by IP-zone.


Repository of DTrace scripts that run in the non-global zone and allow you to trace potential CPU/process performance issues.


Repository of DTrace scripts and kstat shell scripts that can be run in the non-global zone that perform various miscellaneous functions.


Repository of kstat shell scripts that allow for monitoring of network resources for identification of potential problems.