Creating filesystem and ftrace counters
gator has support for reading generic files based on entries in events XML files. This feature allows you to add counters to extract data held in files, for example, /dev, /sys or /proc file entries. You can use a similar technique to add counters for
To add filesystem counters, you first need to create an events-
Ensure that for each entry in the file, the
attribute values begin with
filesystem_ and are unique.
path attributes to specify the names and locations
of the files to read. An example file called events-Filesystem.xml containing commented-out entries is provided with
gatord source code.
gator reads the files specified in your events-
xxx.xml ten times per
second. By default, it interprets each file as an integer, but if you provide a regular
expression using the
regex attribute, gator applies it
and converts the matched entry to an integer.
gator also supports reading
using a similar technique. In the events-
xxx.xml file, ensure the
counter attribute values begin with
ftrace_ and are unique. You can specify regular expressions to extract
counter values. For an example, see events-ftrace.xml located in the gator daemon source code.
After creating the events XML file, you can either:
gatord. In this case, your events-
xxx.xml file must be in the same location as the
-Ecommand-line option, specifying the location of your events-
xxx.xml file. This appends your filesystem and
ftracecounters to the existing events that gator supports and avoids the need to rebuild
gatord. If you choose this method, you need to specify the XML header and include an
eventsnode in your events-
ftracecounters are available by default in the Counter Configuration dialog, if the target supports them.