Cfengine configuration directory

cfenvgraph

Relevant classes: any

The cfenvgraph command is used to extract data from the database used by the cfenvd environment daemon.
cfenvgraph -f filename.db [-r -T -t -s -e]
The command normally generates two files with format
t, y1, y2, y3, y4...
in a sub-directory of the current directory cfenvgraphs-snapshot (or cfenvgraphs-TIMESTAMP if -T is used), where y1-yN are measured values.

The files are called

cfenv-average
cfenv-stddev
and contain, respectively, the weighted average values of all the recorded data and the square-root of the weighted variances with respect to the averages. Data are weighted in such a way that older values are gradually deprecated, becoming irrelevant after about two months.

If the -s option is given, cfenvgraph generates separate files for each metric, in the format

t,y,dy
where dy is the height of a vertical error-bar. This set of graphs combines the average with the standard-deviation. (Note that the error bars show the standard-deviation, and not the standard error of the mean i.e. stddev/sqrt(N)); the latter has no obvious meaning here. If -e is specified, then error bars are omitted.

Normally the vertical scale of each graph is scaled so that each line has a maximum value of 1 and a minimum value of 0, this allows all the lines to be seen in maximum detail. However, this makes it difficult to see the absolute values of the lines. With the -n option, no scaling is performed and true values are plotted.

If the -r option is given then high resolution data are generated (five minute resolution), otherwise data are averaged over periods of one hour to generate simpler and smoother graphs. The complete data span a one-week period, and the daily rhythm of the system may normally be viewed as a number of peaks, one per day.

Options:

--help                    (-h)
--file                    (-f)
--titles                  (-t)
--timestamps              (-T)
--resolution              (-r)   
--separate                (-s)
--no-error-bars           (-e)
--no-scaling              (-n)

If the -t option is given, comments are generated at the start of the file which describe the columns. These are in a format understood by vvgraph as title/label data. If the -T option is given, the output filenames are time-stamped with the current time, in order to give a unique name.

Note that the values printed for sockets always look higher than they should for highly active services. This is because even those sockets which are in CLOSE_WAIT are counted. This is the correct way to determine a normal state based on the recent past. It is a local averaging performed by the kernel. If one counts only those connections which are currently active, one gets a distorted view of activity with a 5-minute sample rate. To measure more often than this would place unacceptably high load on the system.

Graphs may be viewed in vvgraph, xmgr (used in the pictures above) or gnuplot, or other graphical viewer. These graphs are not meant for continuous viewing. The data are averages, not time-series.

Back to documentation