scc-log(1)
NAME
scc-log - create a SCC-snapshot and compare with previous snapshot
RELEASE
scc 1.26.73
SYNOPSIS
scc-log [ -c|--comment <remark> ]
[ -e|--extra <mod> ]
[ -S|--selection <mod> ]
[ -f|--fqdn ]
[ -h|--help ]
[ -l|--label <label> ]
[ -m|--max_age <max> ]
[ --pretrans ]
[ --preinstall ]
[ --postinstall ]
[ --preremove ]
[ -r|--reset ]
[ -v|--virtual <host> ]
DESCRIPTION
This program calls scc-collect to create a SCC-snapshot and compares
it with a previous snapshot. All differences are added to a logbook.
Finally, both the new snapshot and the logbook are also written in
HTML-format. Refer to scc(4) for a detailed description of the format
of the snapshots and logbooks.
scc-collect runs system and user modules. Each module collects
specific configuration data. You can extend the "reach" of scc by
writing and scheduling your own user modules. Refer to scc-collect(1)
for a detailed description of modules and how to schedule and maintain
them.
The data in the snapshot can be split into several, partial snapshots.
This is done before comparing it with a previous snapshot. The mechanism
can be used to provide Oracle DBA's with a snapshot for each Oracle
instance. It can also be used to separate each package in a ServiceGuard
cluster. The partial snapshots of these packages can be compared on the
scc-srv. This avoids many changes in the logbooks of a cluster, when a
package "switches".
Refer to the file /etc/opt/scc/newconfig/scc-split.conf for more details.
The contents of the data generated by the modules are tested to
check their format. Lines with unknown formats are prefixed with the
classification: "fix:messages::". The philosophy of scc is to collect
data, not to interpret it. scc signals when it is unable to collect
configuration data. Any interpretation of the correctness of the
data can be done by the program scc-rules of scc-srv.
In rare occasions, scc-collect "hangs". Use the following command
to find the child processes of scc:
UNIX95= ps -Hef
This will show you the entire process-tree. On Solaris, you can use
the ptree command from the proctools. Find the "deepest" descendant
from scc-collect and kill this process. Then issue the command again
to monitor the progress of scc-collect.
On abnormal termination of scc-collect, the new snapshot probably is
incomplete. When the cause of the problem is removed, a new run of
scc can be started. This leads to large differences with the new,
complete snapshot. To avoid this, use the -r option of scc-log to
remove the current snapshot before making a new one.
When the abnormal termination of scc-collect was not detected, the
next run of scc will add many differences to the logbook. To reduce
the size of the logbook, the log file can be edited by hand and the
differences can be deleted.
LIMITATIONS
As the rpm-database is locked during the install of scc, the snapshot
made during the install does not contain any rpm-data. To avoid massive
changes in the logbook during the pre-install run and the run after the
install, the rpm data is taken from a "keep" file. Each run of scc that
is not performed during install, records all rpm data not only in the
snapshot, but also in the keep file. This mechanism does not work for
the initial install of scc as the keep file does not yet exist. In that case
all rpm changes are ignored and this is recorded with a specific remark
in the logbook.
This mechanism is also used for packages on BSD systems.
On AIX systems, the installed rpm packages are also listed as AIX
installp packages. To avoid changes in the logbook for each install of
scc, the above mechanism is extended to AIX packages when rpm packages
have been installed.
ARGUMENTS
None.
OPTIONS
Note that the --pretrans, --preinstall, --postinstall and --preremove options
are used by package management scripts. Please use with care!
-c|--comment <remark> Add a remark to the logbook, indicating a "specific"
reason to run scc. For instance to mark the successful
configuration/change of a system. An empty <remark> means
no comment.
-e|--extra <mod> scc-collect runs all system modules and matching <mod> user modules.
Where <mod> can contain shell filename wildcards. When used in
combination with the -v option, make sure that each
invocation activates the same set of user modules.
-S|--selection <mod> Run selected (system or user) module(s) for virtual host (-v).
Where <mod> can contain shell filename wildcards.
To detect and process layout version changes, use the -r option
on the next invocation or include module general in the selection.
-f|--fqdn Use the full qualified name, not the short
hostname, when sending files to the SCC server.
On the SCC client, all filenames contain the
-h|--help Display the syntax and exit.
-l|--label <label> Label to indicate the function of the system. Use <label>
in the webinterface of scc-srv to select/group systems.
An empty string means: no label.
-m|--max_age <max> Entries in the log-file, that are older than <max>
months, are deleted
--pretrans Check whether an already installed instance of scc is active.
--preinstall Run before an install, sets SCC_INSTALL_PHASE.
--postinstall Run new version after install, implies -r option and sets
upgrade comment and SCC_INSTALL_PHASE.
--preremove Remove data directory prior to removal of the software.
-r|--reset Remove the current snapshot to avoid comparing it with
the new (incompatible/incomplete) snapshot.
-v|--virtual <host> Do not use the hostname of the system, as base for all
scc-files, use <host> instead. This option should be
used to run specific modules via -e and/or -S option.
DIAGNOSTICS
This program writes the following messages to stderr:
Syntax error, use: scc-log [ -c|--comment <remark> ]
[ -e|--extra <mod> ] [ -S|--selection <mod> ] [ -f|--fqdn ]
[ -h|--help ] [ -l|--label <label> ] [ -m|--max_age <max> ]
[ --pretrans | --preinstall | --postinstall | --preremove ]
[ -r|--reset ]
[ -v|--virtual <host> ]
A syntax error has been detected and reported.
scc-log: Syntax error, missing argument for option <option>
The indicated option is missing argument(s).
scc-log: another instance is active, check process ID in <lock>
This program compares a new snapshot with a previous one. When more
than one instance of this program is active, they use the same files
to store their new version of the snapshot. Therefore only one
instance of scc-log should be active.
In rare occasions, a system program, called by scc-collect, might hang.
When that is the case, try to kill the child processes of scc-collect.
The lock file contains the PID of scc-log. When the lock-file exists and
the process with the PID does not exist, the lock file is removed and
scc-log continues to run. Remove the lock file only when you are
certain that scc-collect is not running.
scc-log: non-numeric argument for -m option: <max>
Use only numeric arguments for -m option.
scc-log: cannot use -S option without -v option
Limiting system modules only makes sense for a virtual host run.
scc-log: use -e and/or -S option with -v option
The -v option can only be used when the -e and/or -S option is used.
scc-log: insufficient permissions to write in data directory: <data_dir>
To run this program, log in as the owner of the directory.
scc-log: no class actions found for host: <host>
The split file specifies host <host>, but did not find any data for it.
scc-log: scc-collect failed.
Check the temporary files of scc-collect to determine the cause of the failure or
set environment variable SCC_DEBUG and call scc-collect with the -i option.
During the pre-install phase of the source install, the system is checked for a
packaged install of scc. This situation will work at the cost of different output
from the --version option of scc and the output from 'rpm -q' or 'pkginfo -l'.
When an installed package scc is detected, the following warning is shown:
WARNING: mixing source and package installs
Correct this by installing a packaged version of scc.
EXTERNAL INFLUENCES
During the pre- and post-install, the existence of the lock-file
scc.lock is checked to find out whether scc is running.
When diff is absent, the logbook will be left empty and all compares
should be done on the scc-srv.
Use environment variable SCC_DATA to specify an alternative directory
for the SCC data files. Should be an absolute path.
RETURN VALUE
Upon completion, the program returns one of the following values:
0 successful completion
1 Syntax error
2 Runtime error
COPYRIGHT
scc-log is free software under the terms of the GNU General Public
License. Copyright (C) 2001-2004 Open Challenge B.V.,
2004-2005 OpenEyeT Professional Services, 2005-2018 QNH,
2019 Siem Korteweg.
FILES
/tmp - directory for temporary files
scc.lock - lock file to indicate that SCC runs
/var/opt/scc/data - directory for data files
scc.<hostname>.cur - current SCC-snapshot
scc.<hostname>.html - current SCC-snapshot in HTML-format
scc.<hostname>.old - previous SCC-snapshot
scc.<hostname>.new - new (temporary) SCC-snapshot
scc.<hostname>.log - logbook for changes in SCC-snapshots
scc.<hostname>.log.html - logbook in HTML-format
scc.<hostname>.keep - data kept from a previous run
cfg.log - symbolic link to scc.<hostname>.log
This symbolic link is used to detect whether the
name of the system has changed. When this is the
case, all scc.<hostname>.* files are renamed.
index.html - compatibility for snapshot on scc-srv
/etc/opt/scc/conf/scc-split.conf - specification to split the
data of the snapshot into several files of pseudo hosts.
This file can be used to provide each Oracle instance with
its own snapshot. The file is installed in the subdirectory
newconfig to avoid that your changes are erased by an upgrade.
This file is ignored when the -v option is used.
/etc/opt/scc/conf/scc_local_* - specification for module scc_0640_s_local
SEE ALSO
scc(1), scc-cmp(1), scc-collect(1), scc-log(1), scc-log2html(1),
scc-plugin(1), scc-snap2html(1), scc(4), scc(5)
VERSION
$Revision: 6287 $