July 22, 1994 Release 3.3 New in release 3.3: o -V flag o -f output format changed slightly o special-case code for Central Data SCSITerminal servers o various bugfixes SCSIINFO displays information about SCSI devices attached to a given system, as seen by the Sun ESP device driver. For each target known to the SCSI host adapter, scsinfo reports whether it is synchronous or asynchronous, whether or not the tranfers to/from the target are clean or susceptible to noise, and whether or not the target can disconnect and reconnect. When a target supports synchronous transfer, the negotiated maximum transfer rate (in MB/sec) is reported. In version 3.0 and up, scsiinfo supports querying SCSI disks for geometry and formatting information, and optionally generates a format.dat entry based on these values. In version 2.0 and up, scsinfo supports querying SCSI devices for vendor, product, and revision information, in the style of the Openboot prom's probe-scsi and probe-scsi-all. SCSI Notes: The negotiated maxiumum synchronous transfer rate normally will be the lesser of the maximum rate supported by the adapter and the maximum rate supported by the device, but it can be lower than this under various circumstances. This rate is typically negotiated at reboot (SunOS 4.1 and 4.1.1 report it for each synchronous device), but it can also be renegotiated during operations if necessary. SCSIINFO notes: - tested on SunOS 4.1.1 through 4.1.3, SunOS 5.2 and 5.3. - "-s" option most useful for SunOS 4.1.2 and above, since in these versions of the OS, the SCSI driver no longer reports the transfer rates it negotiates with synchronous SCSI devices on boot. - Does nothing on suns without ESP host adapters or without openboot prom support. - Supports multiple ESP host adapters - Scsiinfo needs to be recompiled on any (even minor) OS releases that changed the format of the esp structure. For example, a 4.1.1 binary will not work on 4.1.2 or 4.1.3. - Scsiinfo can only probe a SCSI device when the following conditions are met: - the device's device-driver supports user-mode SCSI commands. - scsiinfo can find the device's character special file. - the character special file is readable. - nothing has an exclusive open on the character special file. Sun's 4.x tape driver doesn't support user-mode SCSI commands. Sun's disk drivers do. Sun's CD-ROM driver only does when there is valid media in the drive. In Solaris 2.2 or greater, /usr/sbin/vold, if it is running, may hold an exclusive open on the CD-ROM device, preventing a probe from succeeding. If scsiinfo cannot probe a drive, it returns a message saying why the probe failed. - The format.dat entries generated by SCSIINFO are certainly not perfect. Firstly, SCSIINFO just guesses at the bpt figure (bpt = bits per track), because there's no standard way of querying the drive for this figure. Secondly, some drives are overly optimistic in their estimation of the number of blocks available; if a format.dat entry runs into problems, try reducing ncyl until it works. Finally, some drives simply don't return a valid rpm figure; if this is the case, SCSIINFO will report an error and make a guess of 3600rpm, which may not be correct. Installation: 1. Edit the Makefile to taste. 2. Compile. 3. scsiinfo needs to be able to read /dev/kmem. For use by users without read permissions on /dev/kmem, it can be made setgid kmem or setgid sys. "make install" will install it setgid kmem. 4. If SCSI probing (scsiinfo -p) or drive format querying (scsiinfo -f or -F) is to work for a given device, scsiinfo will need to be able to access the device via a raw/character device file in /dev (or /devices/... in Solaris 2.x). 5. When probing for disks, scsiinfo attempts to access the raw device for the third ("c") partition. This device file must be readable to root! If users other than root are to use SCSI probing, scsiinfo can be installed setuid root (or setgroupid or setuid to a group or user that can read the devices, like "operator"). Porting notes: - It will be almost impossible to port to 4.0.x without source, since there are no suitable include files. - The esp driver has tended to change quite a bit between releases; the code is written to be as portable as possible, but future (greater than 5.3) versions of SunOS 5.x may break something. Bug reports, fixes, enhancements, etc. are welcome. John -- John DiMarco jdd@cdf.toronto.edu Computing Disciplines Facility Systems Manager jdd@cdf.utoronto.ca University of Toronto EA201B,(416)978-1928