/usr/sbin/snap does not function with option -d.

Solution Verified - Updated -

Issue

  • A command /usr/sbin/snap does not function with option -d.

With option -d:
1. When a directory specified with -d exists, it complains 'already exists'.
2. When a directory specified with -d doesn't exist, it ignores -d and create a compressed archive 'snap.tar.gz' in current directory.

Without option -d:
3. When a directory '/tmp/ibmsupt' exists, it complains 'already exists'.
4. When a directory '/tmp/ibmsupt' doesn't exist, it just create a compressed archive 'snap.tar.gz' in current directory.

Looking over the online manual, it looks like the expected behaviors are:
- it should create a directory specified with -d and create snap.tar.gz there.
- it should create snap.tar.gz in /tmp/ibmsupt/ without any directory specified with option -d.

SNAP(8)                               Linux on Power Service Tools                              SNAP(8)

NAME
       snap - generate a configuration snapshot for service

SYNOPSIS
       /usr/sbin/snap [-athv] [-d dir] [-o file]

DESCRIPTION
       The snap script copies several system status and config files and the output of several commands
       from the system into snap.tar.gz in the current directory.  System servicers may ask  that  this
       be run in order collect data to diagnose a problem.

OPTIONS
       -a     All data;  collect detailed information (more files and output).

       -d dir Specify the directory where files and ouput will be collected (default: /tmp/ibmsupt).

       -h     Print a help message.

       -o file
              Specify  the  output  path  and  filename  (.tar  required,  .tar.gz  optional) (default:
              snap.tar.gz).

       -t     Add hostname and timestamp to output filename.

       -v     verbose output

FILES
       These are some of the files that are archived:

       /var/log/messages
       /var/log/scanoutlog.*
       /proc (select files)
       /dev/nvram
       /etc/yaboot.conf

Linux                                         30 May 2012                                       SNAP(8)

Environment

Red Hat Enterprise Linux 6.5 ppc
powerpc-utils-1.2.13-2.el6.ppc64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.