scc-collect(1)



NAME


	scc-collect - collect system configuration in a SCC-snapshot

RELEASE


	scc	1.9.28

SYNOPSIS


	scc-collect [ -a <arg> ] [ -e <module> ] [ -i ]

DESCRIPTION


	This program collects configuration data from a system and writes
	it to stdout as a SCC-snapshot. A snapshot is a file containing 
	configuration data. Each line of configuration-data is prefixed with
	a classification. Refer to scc(4) for a detailed description of the
	format of the contents of a snapshot.

	Part of the classification is an indicator whether the data is fixed 
	or variable. This makes it possible to compare snapshots and report 
	any difference in the configuration data that was supposed to be fixed.

	The entire process of creating a new snapshot, comparing it with the
	previous one and adding the differences to a logbook is done by 
	scc-log(1).

	The collection of configuration data is performed by means of 
	modules, located in directory /opt/scc/bin/scc_modules. There are two
	kinds of modules: system and user. The distinction is made by means
	of the names: scc_9999_s_<name> and scc_9999_u_<name>. Where 9999
	stands for a four digit number used to determine the order of the
	execution of the modules. The _s_ and _u_ indicate the system and
	user modules. When a system and user module use the same four-digit
	number, the system module is executed first. System modules are 
	distributed by scc. Each site can extend the functionality of SCC
	by adding user modules.

	Modules can be executed separately when the -i option is used. In 
	that case, the resulting data goes to stdout.
	Without the -i option, all system modules and the specified user
	modules are run, leaving their data in the file
	/var/opt/scc/data/plugin_data/<module>. In that case the output
	of scc-collect is the output of all system modules and all 
	plugin-data.

	When a user module requires additional arguments, the -a option
	can be used. Note that each started user module is started with
	these arguments.

	When the code of a user module changes, scc-collect automatically
	ignores any changes in the scc-data of this module on the next run
	of the user-module. To test module scc_1234_u_abc, use the
	following steps:

	   - run all system modules and the user-module to catch changes:
	     scc -e scc_1234_u_abc
	   - change the user-module
	   - test the user-module:
	     scc-collect -i -e scc_1234_u_abc
	   - rerun the system modules and the user-module and store the output:
	     scc -e scc_1234_u_abc

	Note: when you change a user-module without running it, you will
	loose all changes (for the module) that will be made before the 
	next run.

	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.

ARGUMENTS


	None.

OPTIONS


	-a <arg>        Start each user module with argument <arg>.
	-e <module>     Run only module <module>. Refer to the DESCRIPTION
	                section for a detailed description of modules.
	                <module> can contain shell filename wildcards.
	                To find the matching modules, the program searches
	                for *<module>*.
	-i              Run the program interactively. Without this option,
	                the program only runs when stdin is a tty.

EXAMPLES


	To execute all user modules, specify:

		scc-collect -i -e "scc_????_u_".

	To execute only the kernel system module, named scc_0300_s_kernel,
	specify:

		scc-collect -i -e kernel

EXTERNAL INFLUENCES


	The HP Support Tools Manager (stm) is not called when the environment
	variable SCC_IGNORE_STM is set. During install by SD-UX, it is set
	to avoid running stm.

	RPM is locked during installation of SCC, ignore rpm during installs
	of SCC. The install-scripts set the environment variable 
	SCC_INSTALL_PHASE.

	Use the environment variable SCC_PROFILING in scc-localize 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.
	The profile data has classification: "var:profiling::"

DIAGNOSTICS


	This program writes the following messages to stderr:

	Syntax error, use: scc-collect [ -a <arg> ] [ -e <module> ] [ -i ]
	A syntax error has been detected and reported.

	scc-collect: Syntax error, missing argument for option <option>
	The indicated option is missing argument(s).

	scc-collect: use -i option to run interactive
	Avoid immediately running all collection scripts interactively.
	
	scc-collect: only root should run this program
	Log in as root to run this program.

	scc-collect: non-executable module: <module>
	Correct the permissions of the module in the directory
	/opt/scc/bin/scc_modules.

	scc-collect: missing data for module: <module>
	The file /var/opt/scc/data/plugin_data/<module> is missing.
	Run the module with the -m option to generate the datafile.
	

RETURN VALUE


	Upon completion, the program returns one of the following values:

		0 successful completion
		2 runtime error

COPYRIGHT


	scc-collect 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


	/opt/scc/bin/scc_modules - directory with modules
		scc_utils - utilities for modules
		scc_[0-9][0-9][0-9][0-9]_s_*
		modules distributed with scc and always executed
		scc_[0-9][0-9][0-9][0-9]_u_*
		user plugins, only executed with -u option
		they leave their output in the file:
		/var/opt/scc/data/plugin_data/<module>
	/var/opt/scc/tmp - directory for temporary 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>.old - previous SCC-snapshot
		scc.<hostname>.new - new (temporary) SCC-snapshot
		scc.<hostname>.log - logbook for changes in SCC-snapshot
		scc.<hostname>.log.html - logbook in HTML-format
		scc.<hostname>.keep - data kept from a previous run

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.213 $