sgmode(8)
NAME
sgmode - SCSI Mode Page utility
SYNOPSIS
sgmode [-aenrx -f modefile -m diskmodel]
DESCRIPTION
Sgmode is a program that uses the SCSI Generic interface
to send specific SCSI commands to read the device mode
page configuration and also write mode pages. The SCSI
Generic interface requires that the kernel .config file
have CONFIG_CHR_DEV_SG set.
A log file, named sgmode.log is created in the /var/log
directory which logs the status of the functions and any
errors.
Below is the sequence of events for this utility:
- * List each device on the system with firmware ver
- sions.
- * User selects a device for mode page (automatic if
- using -m or -a).
- * Attempt to read the mode page file for the selected
- disk (see option -f).
- * Verify that the disk is present and ready.
- * Write the mode pages via mode select (unless read
- only is specified).
- * If the '-m' or '-a' option was used, repeat writing
- the pages for each specified disk.
OPTIONS
Command line options are described below.
- -? This option displays a summary of the commands
- accepted by sgmode
- -a Causes the functions to be performed automatically
- on all connected SCSI devices.
- -e Causes any file writes to be avoided, such as the
- log file. Usually a log file is created and writ
ten to. - -f Specify this filename for the mode pages. Nor
- mally, this option is not used and the filename is
formed using the first 8 characters of the model,
with the ".mdf" extension. For example:
"st39173w.mdf". This utility will look for the mdf
file first in the current directory, then in the
default directory (/usr/share/scsirastools). - -m Automatically download all drives that match this
- model string.
- -n Naming. By default, the device names are displayed
- as numeric sequences (/dev/sg0). This option shows
the device names as alphabetic sequences
(/dev/sga). - -o Allow it to overwrite the disk capacity, if differ
- ent.
- -r Read-only. Do not try to write any mode pages. By
- default, if -a or -m is specified, the utility will
attempt to open an .mdf file for each drive, and
write modepages if a matching file exists. - -x Causes extra debug messages to be displayed.
SEE ALSO
sgdefects(8) sgdiag(8) sgdskfl(8)
WARNINGS
See http://sourceforge.net/projects/scsirastools/ for a
bug list and any later versions of this utility.
COPYRIGHT
Copyright (C) 2001-2002 Intel Corp.
sgmod is open source software. You can redistribute it
and/or modify it under the terms of the BSD License. See
the COPYING file included with this software package for
more details regarding distribution.
sgmode is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY.
AUTHOR
- Andy Cress <andrew.r.cress@intel.com>