InfoDoc ID   Synopsis   Date
50061   Sun Enterprise[TM] 10000: Using find command to clean up SSP files   16 Jan 2003

Status Issued

Description

There is no automatic cleanup of diagnostic files on an SSP used for Sun Enterprise 10000 administration, and the accumulation of these files can eventually lead to the exhaustion of disk space, slow datasyncs,and large ssp_backups. These files include the output from POST, Arbstops, and Recordstops.

The lack of cleanup can also take diagnostic scripts, such as Explorer, a long time to complete and cause the output to be much larger than it needs to be.

You can use the find command periodically to clean up these diagnostic files and delete older files.

The syntax of the command is as follows:

# /bin/find /var/opt/SUNWssp/adm \( -type f -a -name Edd-'*'top'*' -o -name post'*'.log -o -name xfstate.'*' \) -mtime +180 -exec rm {} \;      

The explanation of the syntax is as follows:

/bin/find is the full path of the find command.

/var/opt/SUNWssp/adm ($SSPVAR/adm) is the starting location to find these files. This is the common directory for the diagnostic data across all domains. This should not be modified unless you understand what will be deleted.

\( -type f -a -name Edd-'*'top'*' -o -name post'*'.log -o -name xfstate.'*' \) looks for files that match this name specification, which in this case are recordstops, arbstops, post log files, and xfstate files.

-mtime +180 matches the above-named files that have been modified more than 180 days ago.

-exec rm {} \; is the command to actually remove the found files.

NOTE: The value of 180 days was chosen because it is rarely useful to track diagnostic information longer than 180 days. A notable exception would be in cases where intermittent failures over a long period are being tracked. It is also recommended to never set this value to less than 30 days. Please check with your Sun Service Representative if files need to be retained for an active problem.

This find command can be implemented via cron, possibly running once a month. See the man page for cron or Infodoc 3959, "Crontab Administration and Usage" for details.

With a slight modification, this find command can also be used to clean up Sun[TM] Explorer output so that it can be used with recpeek or other diagnostic utilities.

To use this find command with Sun Explorer output, you would change the path and the number of days. Instead of /var/opt/SUNWssp/adm, you would replace it with the path to the Explorer files, such as /net/cores.east/cores/6300000.

The -mtime could be changed to +30 to keep only a month's worth of files.

Remember, this find command DELETES all files that match the defined patterns, so be sure you only delete what you want.

INTERNAL SUMMARY:

By John Goggin - HAS- January 15, 2003

John.Goggin@Sun.Com

SUBMITTER: John P. Goggin APPLIES TO: Hardware/Ultra Enterprise/Servers/Enterprise 10000, AFO Vertical Team Docs/HAS ATTACHMENTS:


Copyright (c) 1997-2003 Sun Microsystems, Inc.