ftp.nice.ch/pub/next/tools/scsi/SCSI2_ToolBox.941207.NI.bs.gnutar.gz#/SCSI2_ToolBox/SCSI_Inspector/Documentation

CHANGES
 
COPYING
 
README
 
TODO
 

README

SCSI_Inspector.app - A GUI tool for examing and modifying
                     SCSI devices under NeXTSTEP 3.x on both
					 Motorola and Intel hardware.
					 
Software, Documentation and Source Code
Copyright 1994, Christopher A. Wolf


INTRODUCTION
------------
		 
SCSI_Inspector.app is a GUI based NeXTSTEP application which provides a powerful collection of tools for examing and modifying SCSI devices.   The application's Inspector window provides extensive technical and diagnostic information about all types of SCSI peripherals.  The Inspector window can also be used to perform low-level benchmarking on SCSI disks.  The new Format panel can be used to easily low-level format SCSI disks.  The panel provides complete control over device block size, interleave, defect list handling and media certification procedures.  The new Cache Control panel allows the onboard read and write caches of SCSI-2 disk drives to be enabled or disabled.

The current version of SCSI_Inspector is a late-beta version which is still under development and portions of it have not been exhaustively tested on all possible hardware configurations.  Please exercise caution when using this tools and, as always, be sure to keep current back-ups of all your important data.  Complete (but at this time sparsely commented) source code for SCSI_Inspector.app is provided.


LEGAL
-----
	
The software, documentation and source code for SCSI_Inspector.app are provided as a part of SCSI2_ToolBox and are Copyright 1994 by Christopher A. Wolf.  Portions of the source code and documentation of this application are directly derived from source code and documentation included with an earlier work, SCSI_Inquirer.app, Copyright 1990, 1991, 1992 by Jiro Karen Nakamura and Focal Point Computer.  

In personal e-mail dated July 1, 1994, Jiro Karen Nakamura <jn19@cornell.edu> stated that she is no longer actively developing or supporting SCSI_Inquirer and granted me permission to assume responsibility for its continued development and maintenance.  In personal e-mail dated July 2, 1994, Jiro Nakamura provided the following statement releasing previous distribution restrictions on her work:

> Focal Point Computer, Inc. has transferred all rights to SCSI Inquirer 
> to Jiro Nakamura.  Jiro Nakamura allows both the source code and object
> code of SCSI Inquirer to be used as learning tools on the NeXTSTEP 
> computer.  They may be freely distributed and modified so long as no 
> attempt at profit is made.  If you want to go through the minor steps
> to make SCSI Inquirer a Free Software Foundation GNU program, I give 
> you my blessing...

In accordance with these terms SCSI_Inspector.app is distributed under the GNU General Public License, whose complete text can be found in this archive in the file SCSI_Inspector/Documentation/COPYING.  

This software and documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.


INSTALLING SCSI_INSPECTOR
-------------------------

Unpack the SCSI2_ToolBox.tgz archive and use the Workspace Manager to copy SCSI_Inspector.app (in the SCSI_Inspector directory) to its destination directory on your system.  SCSI_Inspector.app must be run as root in order to perform the low level SCSI device driver access which it depends on.  If you try running SCSI_Inspector.app without root privileges it will display a panel informing you that it must be run as root and then exit.  Therefore, the first time you run SCSI_Inspector.app you must either be logged in as root or use "Open Sesame" to launch it.  Once you have SCSI_Inspector.app running you can use the "Install SET-UID root" option of the "Tools" menu to tell it to install itself SUID root.  If the application is already installed SUID root this menu option will be disabled.  If SCSI_Inspector has been installed SUID root and a user other than root runs SCSI inspector a login panel will be displayed asking for the root password to confirm that they have authorization to run SCSI_Inspector.


USING SCSI_INSPECTOR
--------------------

Once SCSI_Inspector.app is started it displays a panel entitled "SCSI Selector" with a scroll view displaying the manufacturer and model number of any peripherals attached to the SCSI bus at IDs (targets) 0 through 7.  "No Device" will be displayed at SCSI IDs which do not have a device attached.  The SCSI host adapter is usually configured as ID 7 but will not be listed in the "SCSI Selector" window since it is not a peripheral device.  Click once with the left mouse button on a device name to bring up the Inspector window for that device.

The Inspector window is divided into three sections.  The uppermost section contains a pop up menu where the mode of the inspector can be selected.  Some or all items in the mode selection pop up menu may be disabled depending on what type of device is selected.   The middle section contains information about the manufacturer, model number and SCSI ID (target number) of the selected device.  The bottom section is a scroll-view displaying Rich Text information.  The mode selection for the inspector controls the type of information that is displayed here.

In "Information" mode the Inspector window uses SCSI Inquire and Mode Sense commands to retrieve technical information about the SCSI device that is attached at this ID.  This is the default mode when the Inspector window is first opened or when a new device is chosen from the Selector window.  The exact information that is displayed varies depending on the type of device that is being queried.  The displayed data usually includes such information as the device type, manufacturer, model, revision number, supported standards and feature sets, and media characteristics such as geometry, capacity and density.  Most data is interpreted from its original form as raw numerical values and is instead displayed in an easy to read textual format.  However some of the information is of a technical nature and explaining the exact meaning of all of the various parameters is beyond the scope of this document.  Please refer to your local SCSI wizard or the SCSI 2 standard, a draft copy of which should have been included in the SCSI2_ToolBox archive, for help interpreting any of the more arcane informational messages.  

In "Diagnostic" mode the Inspector window performs some simple non-destructive diagnostic tests on the selected SCSI device.  A panel will be displayed asking you to confirm that you want to proceed before starting the diagnostics.  Currently the tests only check to see if the unit returns "ready" and ask the unit to go through its self-check procedure.  This does not tell you much beyond the fact that the device is alive and communicating but hopefully this section will be expanded in the future.  

In "Benchmark" mode the Inspector window performs a series of non-destructive benchmark tests.  A panel will be displayed asking you to confirm that you want to proceed before starting the benchmark.  This item is only enabled for direct access devices such as disks and CD-ROMs, no provision is currently made for benchmarking sequential access devices such as tape drives.  

The benchmark is a low-level benchmark which accesses the device driver directly.  This means that the benchmark is limited to testing the speed of read accesses and cannot test write accesses since this would result in file system corruption.  The benchmark tests read speed using a variety of different block sizes and performs 64 iterations at each block size.  The results are reported in a table showing transfer rate in megabytes/second (1 megabyte = 1024*1024 bytes) for each block size.  The larger the block size the higher the reported transfer rate since large continuous reads are faster because there are fewer seeks per megabyte of data transferred.  Unfortunately, most real world applications and file systems use small block sizes.

The complete test is repeated twice.  The first time random starting points scattered across the entire disk are used.  This test is designed to almost entirely negate the effects of cache (whether it be in main RAM, on the host adapter, or on the drive itself) and thus measures the transfer rate that the drive itself is able to achieve when forced to physically read from its media.  The second test repeatedly reads the same set of sectors so that the data is coming almost entirely from cache and thus measures the transfer rate from whatever cache is present.  Results for the second test are usually much higher than the first and are limited mostly by CPU speed and memory bandwidth (if the cache is in system RAM), bus-speed (if the cache is on the drive or host-adapter) and driver overhead.  Note that for large block sizes the amount of data being read might exceed the cache capacity and thus transfer rates may actually be slower for large block sizes.

Since this is a relatively low-level benchmark, file system overhead and other file system artifacts (fragmentation, etc.) do not distort the results.  However please remember that there are still many factors which can influence even a low-level benchmark such as this one.   Processor speed, system memory, bus type, controller, host adapter, system load and drive model are just some of the variables which may influence the result.  To obtain the most repeatable measurements the benchmark should be performed at a time when no other disk-access is occurring, when no other CPU intensive tasks are running, and on a machine with enough RAM that no swapping is required to load and run the benchmark program itself.  Even when these precautions are followed, in order to meaningfully compare any one of the variables mentioned above (such as disk model) every attempt must be made to keep the other variables (processor speed, controller, bus, host adapter) constant.


USING THE FORMAT PANEL
----------------------

Selecting the "Format..." item from the "Tools" menu brings up the Format Panel which allows you to perform a low level format on the currently selected SCSI disk.  The "Format..." item will be disabled if a device other than a hard-disk is selected.  The Format Panel contains gadgets which allow you to select a variety of options which control how the Format procedure will be performed.

If the "Perform Media Certification" option is selected the drive will be requested to perform its internal media certification procedure when it executes the format operation.  On most modern SCSI-2 drives the media certification procedure will find any bad blocks on the drive and remove them from the usable disk area by adding them to the drive's grown defect List.  This option is enabled by default.

If the "Preserve Grown Defect List" option is selected the drive's current list of grown defects will be preserved and any new bad blocks that are detected during media certification will be appended to the end of the current list.  If this option is disabled the drive's current grown defect list will be cleared.  You should never clear the current grown defect list unless you have enabled media certification so that a new replacement defect list will be generated!  The default behavior is to preserve the current grown defect list and I strongly suggest that you do NOT change this option unless you are a SCSI expert who understands EXACTLY what the consequences are.

Note that neither of the above options affect in any way the drive's primary factory defect list which is generated as the result of strict manufacturer's testing which can not be duplicated by the end-user and which should never be modified by the user.  

If the "Return Immediately" option is selected SCSI_Inspector reports the operation as complete as soon as the drive acknowledges the format command and does not to wait for the drive to actually complete the formatting procedure.  In this case it is assumed that the drive will format successfully once it acknowledges the command.  The default behavior is for "Return Immediate" option to be disabled in which case SCSI_Inspector will wait for the drive to completely finish formatting and then report on whether the format was successful or not.

The "Interleave" text field allows the user to specify what interleave setting the drive should use.  An interleave seeting of 0 tells the drive to use its built in default.  Most modern SCSI drives use an interleave setting of 1 which means that sequentially numbered logical sectors are layed sequentially on the physical media as well with no intervening sectors.   This provides optimum performance for most modern drives.  On some ancient drives a higher interleave setting may provide better performance though.

The "Block Size" specifies the size of a sector on the drive.  The default for most drives is 512 bytes.  Specifying a block size of 1024 or 2048 bytes may provide a slight performance improvement on some drives.  Not all drives support sector sizes other than 512 bytes.  NeXTSTEP currently requires that the boot device be formatted with 512 byte sectors!

Clicking the Cancel button will exit the format panel without changing any drive parameters.  Clicking the Format button will bring up a panel summarizing your selections and ask you to confirm the operation.  Please be careful to check that you have correctly selected the drive and parameters.  Once you click OK in the confirmation panel ALL DATA ON THE SELECTED TARGET DEVICE WILL BE IRRETREVIABLY ERASED!!!


USING THE CACHE CONTROL PANEL
-----------------------------

Selecting the "Cache..." item from the "Tools" menu brings up the Cache Panel which allows you to toggle the read and write cache status on the currently selected SCSI disk.  The "Cache..." menu item will be disabled if a device other than a hard-disk is selected.  It is strongly suggested that you only use the Cache Panel on disk drives which are SCSI-2 compliant.  Attempting to use the Cache Panel on SCSI-1 drives may cause unpredictable results!

The Cache Panel contains two gadgets - one for enabling the drive's read cache and one for enabling the drive's write cache.  Most drives ship with their read cache enabled but their write cache disabled.  Enabling the drive's write cache will often significantly increase the performance of the drive.  Enabling the write cache slightly increased the risk of data loss in the case of a power failure or catastrophic system crash.  As long as the system is shut down properly write caching should never be a problem under NeXTSTEP.  Even in the case of a catastrophic system failure NeXTSTEPs file system is robust enough that recovery should not be a problem.  Be aware that some primitive OS's may not properly deal with write caching issues.


BUILDING SCSI_INSPECTOR
-----------------------

Complete sources for SCSI_Inspector are provided in case you want to re-build the application and as an example of how to use the SCSI2_Kit.  The application should build without modification from the PB.project icon in the SCSI_Inspector directory on either Motorola or Intel hardware.  No attempt has been made to build it on HP hardware - if anyone succeeds in getting it to work on HP I would be interested in hearing what you had to do to make it work.  If you are having problems getting it to build on Motorola or Intel hardware there are a couple of things to check.  First, make sure that the link SCSI2_ToolBox/SCSI_Inspector/Source/SCSI2_Kit.subproj exists and points to the SCSI2_ToolBox/SCSI2_Kit/Source directory.  Second, you might want to make sure that all the dependencies are correct... there should be a Makefile.dependencies file in the SCSI_Inspector/Source directory.  If there is not you may have to regenerate it using the "make depend" option of Project Builder.  (In order to get "make depend" to work on my system I have to select either Intel or Motorola binaries... once the dependency file has been generated I can enable multi-archive binary generation and everything works ok.  I don't know if this is a bug in Project Builder or something that I am doing wrong.)  Note that the new .app is generated in the SCSI2_ToolBox/SCSI_Inspector/Source directory... it will not over-write the original .app contained in the SCSI2_ToolBox/SCSI_Inspector directory.  Also, please note that the makefile.postamble has had several additional targets added to it: RCS::, distribution:: and listing:: which will probably not work on any systems except my own.  These targets are involved with project maintenance though and are not necessary to successfully build the app.  If you perform the build the completed .app will be placed in the SCSI2_ToolBox/SCSI_Inspector/Source directory to avoid over-writing the original pre-compiled app in the SCSI2_ToolBox/SCSI_Inspector directory.


DISTRIBUTION AND FEEDBACK CHANNELS
----------------------------------

SCSI_Inspector.app is available as part of the SCSI2_ToolBox which can be retrieved via ftp from the various NEXTSTEP ftp archives.  New versions of SCSI2_ToolBox will be announced on the Usenet newsgroup comp.sys.next.announce when they are available.

Bug-reports, comments, suggestions, and feature requests can be sent via e-mail to chris@alchemy.geo.cornell.edu.  (NeXTmail accepted and preferred.)   Please be sure to read all provided documentation and check the TODO files before complaining about broken or missing features though.  Also, when providing feedback please specify exactly which revision of SCSI_Inspector you were using.  Revision information can be found in the info panel of the app.  Thanks!

Sincerely,
Christopher Wolf

($Id: README,v 0.5 94/11/18 13:16:10 chris Exp $)

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.