Enhanced Support Facility 2.6 User's Guide
Contents Index PreviousNext

Part 3 Maintenance Facility> Chapter 10 System Data Output Tool

10.4 Command Reference

NAME

fjsnap - System data output tool

FORMAT

/opt/FJSVsnap/bin/fjsnap [ -H ] [ -abhlns ] [ -T directory ] output

/opt/FJSVsnap/bin/fjsnap -C [ -H ] [ -abhlns ] [ -T directory ] [ -D directory ] output

DESCRIPTION

fjsnap collects system data required to analyze faults.

OPTIONS

Each option of the lower-case letter specifies a group of data to be collected. If omitted, group information related to the basic systems is collected (same as the -b option).
A group that can be specified is displayed in the Usage message (execute this command by specifying the -H option).

The following options are available:

-H
Displays the following Usage message.
Usage: fjsnap [ -H ] [ -abhlns ] [ -T directory ] output
     : fjsnap -C [ -H ] [ -abhlns ] [ -T directory ] [ -D directory ] output
              -H : Usage
              -a : all
              -b : basic software (default)
              -h : high availability
              -l : lp
              -n : network
              -s : storage array
              -T directory : work directory
              -C : Add crash dump information
              -D directory : Savecore directory
              output : ex. /dev/rmt/0

-a
Collects all defined data.
-b
Collects group information related to the basic system.
-h
Collects group information related to high reliability.
-l
Collects group information related to the printer.
-n
Collects group information related to the network.
-s
Collects group information related to the storage array.
-T
Specifies a work directory (work area) in the parameter "directory." If omitted, a directory defined in environment variable TMPDIR is used as a work area. Moreover, if the environment variable TMPDIR is not defined, /var/tmp directory is used as a work area. If the -T option and the environment variable TMPDIR are both specified, the -T option is used.
output
Specifies an output file name or special file name of the output medium.
-C
Adds an archive of crash dump file on the end of the archive of collected data in the output file.
In this case, specify a special file name of non-rewinding tape device (ex. /dev/rmt/0n) as an output medium in the argument "output." If a special file name of rewinding tape device (ex. /dev/rmt/0) is specified in the argument "output," the archive of collected data gets overwritten by an archive of crash dump file.
-D
Specifies where to arrange crash dump files (savecore directory) in the parameter "directory." This option is valid only when the -C option is specified. If the -T option is not specified, this command collects crash dump files under the Savecore directory that is currently defined on the system. If the Savecore directory does not exist on the system, crash dump files under /var/crash/`uname -n` are collected.
Example:
When the collected data is output to a regular file.
The file name is "all" in this case.
# cd /export/home/fjsnap <RETURN>
# /opt/FJSVsnap/bin/fjsnap -a all <RETURN>
<<< fjsnap * START !! >>>  
<<< Path-name check * START !! >>>
            :
            :
<<< Output *  END  !! >>>
<<< fjsnap *  END  !! >>>
# ls <RETURN>
all

The collected data is output to "/export/home/fjsnap/all" file.

Example:
When -C option is not specified:
/opt/FJSVsnap/bin/fjsnap -a -T /work /dev/rmt/0 <RETURN>
Example:
Add a crash dump file:
/opt/FJSVsnap/bin/fjsnap -C -a -T /work /dev/rmt/0 <RETURN>

Work area size check

Uses a directory specified in the -T option or environment variable TMPDIR as a work directory (work area). If the -T option and the environment variable TMPDIR are not both specified, this command uses /var/tmp directory.

Collect data check

Checks whether the file to be collected exists. The check result is saved in a log file and an existing file is collected.

Collect data size check

Checks the size of an existing file.
If a file/directory whose size is over 128MB is found, this WARNING message is displayed and the file/directory is not collected by this command. Collect it responding to the system trouble individually when the message is displayed. Call the Fujitsu customer engineer when it is uncertain.

fjsnap:WARNING: xxxxx: Information size limit over : XXXXXXXXX

Available free space of the work area and the total size of collected data are displayed.

<<<  needed tmp-space size  >>>

9999 MB is left in xxxxxxxxx

9999 MB is needed

When the total size of collected data is larger than available free space as the work area, the ERROR message is displayed as below.

fjsnap:ERROR: Not enough space in xxxxxxxxxx

Execute this command with specifying a work area has suppicient free space larger than the total size of collected data.

Example:
Specify a work directory (work area) with the -T option:
# /opt/FJSVsnap/bin/fjsnap -b -T /work /dev/rmt/0 <RETURN>
Example:
Define a work directory (work area) in the environment variable TMPDIR:
# TMPDIR=/work; export TMPDIR <RETURN>

Data collection

When collect data is configured as a file, it is copied to a work area.

find file-name -print | cpio -pdmuL work-directory/fjsnap.d <RETURN>

When collect data is configured as a directory, files under the directory are renamed to directory names using tar(1), and they are arranged into a work area.

tar cfh work-directory/fjsnap.d/collect-directory-name.tar collect-directory <RETURN>

This command then creates a list file of collected data, log file at execution, and file attribute information file of collected data.

fjsnap.result : List of collected data
fjsnap.elog : Log at execution of this command (including error information)
fjsnap.lsinf : Attribute information of collect information file (result of ls(1))

fjsnap.result contents


ST PROG FILE PHASE - /etc/system 50 ~ ~ ~ Uarp_a ARP_a 50 ~ ~ ~ #EB - /var/nis 50
ST :Collect result
Space :Collected normally.
#EB :A file to be collected was not found.
#EP :A collect procedure was not found.
#ES :The size of information to be collected was too large. (exceeding 128 Mbytes)
#NG :The collect procedure has terminated abnormally.
PROG :Collect procedure name
(For more information, see "10.6 Collection Procedure List.")
FILE :File and directory to be collected
(For more information, see "10.5 Collected Data List.")
PHASE :Collection order
(Standard :50)

The data collection command arranges data to be collected in a work area, uses compress(1) to compress each file, and use tar(1) to write the compressed data to the output file.

tar cfb output 20 work-directory/fjsnap.d <RETURN>

Forbidden file (exclude)

All system data collected by this tool, such as command execution result and files, are defined in each group's collected data file under /opt/FJSVsnap/etc directory.
If you want to forbid this tool to collect a part of the system data, make a /etc/opt/FJSVsnap/exclude file.
With this method, you can forbid that this tool collects the system data listed in "10.5.2 Printer Related," for example, let us assume that you want to forbid this tool to collect the data related to the printer from the system data. The data related to the printer is generally collected in the directory /var/spool/lp/temp/. In this case, add a field named 'FILE'(separated from the first field by spaces or tabs) to the printer related file named 'lp' under the /opt/FJSVsnap/etc directory. If you don't want to include printer data collected in the files like /var/spool/lp/temp/ or /var/spool/print include these files in the /etc/opt/FJSVsnap/exclude file.

Example:
/opt/FJSVsnap/etc/lp file:
     #     PROG     FILE                   PHASE
           -        /var/spool/lp/temp     60
           -        /var/spool/print       60

When you forbid that this tool collects /var/spool/lp/temp and /var/spool/ print directories, write these data into /etc/opt/FJSVsnap/exclude file as shown below.

     /var/spool/lp/temp
     /var/spool/print

Even if a package is deleted, forbidden file exists.

Collect data reference

The collected data is restored using tar(1). This command creates a fjsnap.d directory in the current directory and arranges the collected data in the directory tree structure defined at collection under the fjsnap.d directory.

tar xf input <RETURN>

For input, specify a general file name or special file name according to a collect medium.

The collect file is compressed. Use uncompress(1) to uncompress the file before reference. If collected data is configured as a directory, it is saved as a archive file using tar(1).
In the case, expand the directory before reference.

When you restore crash dump files, specify a special file name of non-rewinding tape device to read an archive of collected data, and then restore an archive of crash dump files using tar(1). In this case, using tar(1) enables the user to restore an archive of crash dump files after forwarding a tape device using mt(1).

mt -f nrinput fsf 1 <RETURN>
tar xf nrinput <RETURN>

For nrinput, specify a special file name of non-rewinding tape device.

EXIT STATUS

When an error occurred during data collection, a diagnosis message is written to the fjsnap.elog file, the erroneous information is skipped, and the next information processing is continued.

This command returns the following values:

0
Ended normally
1
Ended abnormally
2
Invalid command syntax
3
Re-executed during execution of this command

FILES

work-directory/fjsnap.d/fjsnap.result

work-directory/fjsnap.d/fjsnap.elog

work-directory/fjsnap.d/fjsnap.lsinf

NOTES

Do not re-execute this command during execution of this command.
The load on the disk unit containing the work area temporarily increases to about 80 to 90%. When the /tmp directory is specified as the work area, the load of memory becomes high.

If this disk load causes problems in operation, reserve a work area on a file system on a disk unit not used by applications and systems.
CPU load rises very much, too, when there is no reserve strength in CPU power (For single CPU).

The system information is inaccessible by non-privileged users. It is recommended that you execute this tool as a superuser. For more information, see "10.7 Restricted System Information."
As for the file that the privileged user gathers, important information on the system is included. Please arrange from the general user to an inaccessible place, and do enough management.
When you use zones with Solaris 10 OS, collect information in each zone. If you collect information of a non-global zone, collect information of the global zone at the same time because it can be necessary for the investigation.
Two or more FJSVsnap packages have been installed, delete all FJSVsnap packages according to the following procedures first, and install only the newest package.


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2005