scc - file formats used by SCC
SCC stores configuration data from systems in flat files called snap-
shots. All configuration data is structured by prefixing it with a
fixed-variable indication and with a hierarchical classification. The
indication, all elements of the classification and the configuration
data are separated by colon's.
By comparing two consecutive snapshots and ignoring the variable data,
we are able to maintain a logbook of a system. Lines in the logbook
also consist of colon separated fields.
The contents of the file /var/adm/cron/cron.allow are stored in a snap-
shot in the following way:
After the indicator "fix" for fixed data, there is at least one level
of hierarchical classifications of the remaining data. The classifica-
tion and the data are separated by two consecutive colons.
When this file is altered (uucp should not run cron-jobs), the missing
line is reported in the logbook. The reported data contains the change
itself (uucp) and the classification of the altered data (soft-
ware:cron:configuration::/var/adm/cron/cron.allow:). Without the clas-
sification SCC only could have reported that a user has been removed.
The output of scc-collect is checked by scc-log. Any line that does not
start with "fix:" of "var:" is prefixed with "fix:messages::", indicat-
ing unexpected output from one of the commands used by scc-collect. As
the html-file groups data per classification, the original snapshot has
to be inspected to locate the commands causing this output.
The snapshot is converted to a hierarchical menu. Therefore the follow-
ing combination of classifications cannot be used:
The first classification results in html-code to access "myprogram" as
an option in the sub-menu "software". The second classification should
result in html-code to access a sub-menu "myprogram" containing the
It is the responsibility of the developer to ensure a correct menu-
structure by using the correct classifications in scc-collect and in
the plugins. This kind of errors is detected and reported in the
snapshot by scc-collect.
Two consecutive snapshots are compared using diff. The resulting output
is altered to indicate the old and the new configuration. When the user
uucp is removed from cron.allow, the following data is added to the
For clarity the last line has been folded.
Again we see colon separated fields. The first fields indicate the date
and time of the change. Then there is a classification of the remaining
fields, separated by two, consecutive colons from the differences. The
classification is limited to: result, remark, count, previous date,
previous time and data.
After reporting the result and some administrivia, finally the actual
change is reported. The keyword old indicates that this data was only
present in the old snapshot. So it has been removed from the current
configuration of the system.
The keep-file is used to store data that is obtained from running pro-
cesses, that might not be running during the next run of scc. To avoid
changes in the logbook any time such a process temporarily does not
run, the obtained data is stored in a keep-file. scc-collect uses the
data in this file when the processes are not running. Examples of the
data in the keep-file are apache-configuration data and rpm-data. The
latter data should be recorded in the keep-file as the rpm-database is
locked during installs and rpm does not return any data when it is
queried during an install.
The format of the keep-file looks like the format of the snapshots. It
consists of lines with colon-separated fields. Leading fields are used
to identify the data. The contents of the keep-file are determined by
The keep-file is removed during the installation of SCC to enable
upgrades of the format of this file. This results in the "feature" that
SCC is unable to record it's own upgrade on a RPM-system.
SCC is free software under the terms of the GNU General Public License.
Copyright (C) 2001-2004 Open Challenge B.V., 2004-2005 OpenEyeT Profes-
sional Services, 2005-2011 QNH.
scc(1), scc-cmp(1), scc-collect(1), scc-log(1), scc-log2html(1),
scc-plugin(1), scc-snap2html(1), scc(4), scc(5)
$Revision: 4592 $