scc(1)
NAME
scc - collect and send snapshot-files to server
RELEASE
scc 1.9.28
SYNOPSIS
scc [ -a <alt> ] [ -c <remark> ] [ -d <delay> ] [ -e <mod> ]
[ -f ] [ -F <from> ] [ -i <smtp> ] [ -I <ident> ] [ -k <key> ]
[ -m <max> ] [ -n ] [ -p <prog> ] [ -s <dest> ] [ -t ] [ -u <user> ]
[ -v <host> ] [ -V ]
DESCRIPTION
Run the program scc-log and optionally send the resulting files
to the destination. By default the files are sent by email,
other possibilities are ftp, rcp, scp and cp. When scc-log exits
with an error, no files are transferred.
The security setup of the server receiving the files is very
important. Refer to the documentation of scc-srv for the setup
of the server.
The collection of scc-data from the system is done by means of
modules. Two kinds of modules exist, user and system modules.
The system modules are installed and run by scc. To extend the
reach of the snapshots, user modules can be added to collect
additional data. Refer to scc-collect(1) for more details. To
run all user modules, use the following command-line:
scc -e "*"
When a specific user module requires much time, you can run
it less frequent. The data from the last run of the module is
kept in the directory /var/opt/scc/data/plugin_data. Suppose
you have three user modules, named:
scc_0550_u_abc
scc_0650_u_def
scc_0750_u_ghi
Where module scc_0650_u_def should be run only once a week,
while you want scc to run daily. You can use the following
cronjobs to achieve this:
0 6 1-6 * * /opt/scc/bin/scc -e "scc_0[57]50_u_"
0 6 0 * * /opt/scc/bin/scc -e "*"
You have to use the naming convention and shell filename
generation wildcards to specify multiple modules to run.
When stdin is not a terminal, after running scc-log, a random
delay is used to sleep before the files are transferred to the
destination. This avoids flooding the receiving system when all
your systems start scc at the same time.
The transferred files are tarred, compressed and uuencoded when
sent via email. For RedHat, uuencode is part of
Applications/Archiving.
The files to be transferred can be several MB. Check the mail-
connectivity first by using the -t option. This will send empty files.
Use the -p option with "smtp" to use the SMTP-protocol directly and
skip the mail-transport facility of the client.
Refer to the manual page of scc-log(1) for troubleshooting
when scc seems to "hang".
Use the environment variable SCC_PROFILING to add timing data
to the snapshot. This enables you to locate possible performance
bottlenecks. The default value activates profiling and performance
data is added to the snapshot.
scc-collect and its modules use sensible defaults to avoid that
many systems require a configuration file. When the defaults are
insufficient, copy /etc/opt/scc/newconfig/scc-localize to
/etc/opt/scc/conf/scc-localize and uncomment the required variables.
Be sure to preserve the execution permission of the file.
OPTIONS
-a <alt> Use <alt> as directory where snapshots and logbooks
of alternate systems are to be transferred to the
scc-server. The -f options is ignored. The program
that produces the alternate snapshots is responsible
for the correct format and contents of the scc-data.
When the files are symbolic links, they are removed
after transferring their contents. For each
system <s>, this directory should contain the files:
scc.<s>.cur scc.<s>.log scc.<s>.html scc.<s>.log.html
-c <remark> Add a remark to the logbook, indicating a "specific"
reason to run scc. To mark the implementation of
RFC "123" on a system, use:
scc # record changes up to this moment
# perform the tasks required by the RFC
scc -c "RFC 123" # record changes due to RFC
-d <delay> Maximum delay (in seconds) to wait before the files are
transmitted to <dest>. Default delay is 300 seconds.
-e <mod> scc-collect runs user module <mod> when collecting data.
-f Use the full qualified name, not the short hostname,
when sending files to the SCC server. On the SCC client,
all filenames contain the short hostname only.
-F <from> Mail-address used as sender of mailed data. Default value
is <root@host.domain.com>.
-i <smtp> SMTP-server to connect to; implies "-p smtp"
Use the -F option when the SMTP-server does not allow relaying
and the domain of the system differs from the domain of
the SMP-server. Check the logfile in /var/opt/scc/data.
-I <ident> Identity file for scp; implies "-p scp"
-k <key> File containing public key of scc-server; used to
encrypt the data that is sent via mail/smtp.
-m <max> Entries in the log-file, that are older than <max>
months, are deleted
-n Do not collect new SCC-data. Send the files right away.
-p <prog> Use <prog> to send the files, default value is mail,
other values are:
cp copy to local directory <dest>
ftp transfer to <dir> on <host> by using ~/.netrc
pull local transfer to /var/opt/scc/data/transfer;
transfer is done later by scc-srv.
Implies -d 0 and ignores -s options.
rcp remote-copy to scc-server
scp SSH-copy to scc-server
smtp use SMTP to connect directly to port 25 of
host-part of <dest> or to <smtp> of -i option.
Logfile in /var/opt/scc/data/smtp.log
-s <dest> Destination to send the files to:
cp local directory: /var/opt/scc/data
ftp destination: <host>:<dir>
mail|smtp email-address: scc-transfer@myserver.com
With smptp, use the -F option when the
domain of <dest> differs from the domain
of the SMTP-server (-i option).
rcp|scp destination: <user>@myserver.com:<dir>
the <user> and <dir> parts are optional
-t Test connectivity by sending empty files, no delay is
used
-u <user> To be used with -p pull option. The files can be
transferred by <user>.
-v <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 user modules with frequently
changing data using the -e option. This avoids
"changes" in the scc-data of the system itself.
Note that no system modules run when the -v option is
used. Requires the -e option.
-V Print version of program and exit
ARGUMENTS
None.
DIAGNOSTICS
The program issues the following messages to stderr:
Syntax error, use: scc [ -a <alt> ] [ -c <remark> ] [ -d <delay> ]
[ -e <mod> ] [ -f ] [ -F <from> ] [ -i <smtp> ] [ -I <ident> ]
[ -k <key> ] [ -m <max> ] [ -n ] [ -p <prog> ] [ -s <dest> ] [ -t ]
[ -u <user> ] [ -v <host> ] [ -V ]
A syntax error has been detected and reported.
scc: Syntax error, missing argument for option <option>
The indicated option is missing argument(s).
scc: non-numeric interval
A non-numeric value has been specified for <delay>.
scc: wrong format with of mail-address: <address>
The mail-address (supplied with the -F or the -s option) does not
start with "<" or does not end with ">".
scc: non-numeric argument for -m option: <max>
Use only numeric arguments for -m option.
scc: -p option must be used prior to -s option
As the interpretation of the argument of the -s option depends upon the
argument of the -p option, the -p option cannot be used after the -s
option.
scc: unknown transfer-method: <prog>
The argument of the -p option has an unsupported value.
scc: uuencode not found
This program is used to sent the snapshot through email. On RedHat
it is part of: Applications/Archiving.
scc: openssl not found
This program is used when the -k option is used to encrypt the data to
be sent via email. When openssl is not found in PATH, no data is sent.
scc: cannot use -t option combined with -a option
Do not combine the -a and the -t option.
scc: cannot access target directory: <dest>
The target directory for the copy does not exist.
scc: cannot determine domainname
The domainname cannot be determined while using the -f option.
scc: cannot access <alt>
The directory for scc-data of alternate systems cannot be accessed.
scc: cannot access identity_file <ident>
The identity file for scp cannot be accessed.
RETURN VALUE
Upon completion, the program returns one of the following values:
0 successful completion
1 Syntax error
2 Runtime error
EXAMPLES
To take a daily snapshot and transfer the files to myserver, use a
cronjob like:
0 23 * * * /opt/scc/bin/scc -s "<scc-transfer@otherserver.mydom>"
This runs scc-log daily and transfers the files to otherserver.
On otherserver the alias file should contain a line like:
scc-transfer: "|/opt/scc-srv/bin/scc-receive-mail"
Refer to the manual page of scc-srv for the proper setup of the
server part of SCC.
EXTERNAL INFLUENCES
The names of the files that are sent to the scc-server, must be
known in the server-software also: scc-transfer.gz, scc-transfer.Z
or scc-transfer depending on the presence of compression software.
Refer to the manual page of scc-srv for the setup of the scc-server.
This program uses gzip or compress to compress the data.
It uses uuencode to transfer the data through email.
COPYRIGHT
scc 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-2009 QNH.
FILES
- /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>.log - logbook for changes in SCC-snapshots
scc.<hostname>.log.html - logbook in HTML-format
smtp.log - logfile for transport with -p smtp
The filename on the scc-server is: scc.<hostname>.tar.gz When
gzip is not found, compress is used and ".gz" is changed in ".Z".
When compress is also not found, cat is used and ".gz" is removed
from the filename. When the -f option is used, the DNS-domain is
added to the remote filenames.
When rcp/scp are used, the file scc.<hostname>.signal is used to
indicate the completed transfer of the scc-data on the server.
- /var/opt/scc/data/transfer - directory for pull
When the file /etc/opt/scc/conf/scc-split.conf is present, the
data of the snapshot is split according to the specifications in
this file. Refer to the manual page of scc-log for more details.
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: 1.97 $