You can add counters that are based on data that is loaded from files, such as /dev , /sys , and /proc , and record ftrace events using perf.
Create an events-<xxx>.xml file.
Add an event entry for each counter.
Note
The gatord source code comes with an example file that is called events-Filesystem.xml and contains commented-out entries.
Do one of the following:
Rebuild gatord, placing the events-<xxx>.xml file in the same directory as the gatord Makefile before building.
Restart gatord using the -E command-line option to specify the location of your events-<xxx>.xml file.
If you choose to use the separate XML file that is specified on the command line, the file format is slightly different. You must specify the wrapping events tag in addition to the category. For example:
<?xml version="1.0" encoding="UTF-8"?>
<events>
<category name="Filesystem">
<event counter="filesystem_loginuid"
path="/proc/self/loginuid"
title="The loginuid chart"
name="The loginuid series"
description="The description of the loginuid series"/>
</category>
</events>