linux-l: SCSI-Befehle

Jens Dreger dreger at physik.fu-berlin.de
Do Okt 28 22:00:13 CEST 1999


Hi Bjoern !

> Hallo Linux-Freunde,
> 
> ich sitze gerade an meiner Diplomarbeit über IDE und SCSI.
> Ich möchte Messungen am SCSI-Bus durchführen und suche deshalb
> nach einer Möglichkeit, gezielt SCSI-Befehle auf den Bus zu
> schicken, um das Timing auf einem Logic Analyzer darzustellen.

In linux-kernel-src/Documentation/scsi-generic.txt ist die Rede von
sg_utils, die folgendes koennen sollen:

--------8<-----------------------
See the README file in the sg_utils<date>.tgz tarball. At the time of
writing this was sg_utils990527.tgz .

Briefly, that tarball contains the following utilities:
sg_dd512        'dd' like program that assumes 512 byte blocks size
sg_dd2048       'dd' like program that assumes 2048 byte blocks size
sgq_dd512       like 'sg_dd512' but does command queuing on "if"
sg_scan         outputs information (optionally Inquiry) on SCSI devices
sg_rbuf         tests SCSI bus transfer speed (without physical IO)
sg_whoami       outputs info (optionally capacity) of given SCSI device
sginfo          outputs "mode" information about SCSI devices (it is a
                  re-port of the scsiinfo program onto the sg interface)

It also contains the following test programs:
sg_debug        outputs sg driver state to console/log file
sg_poll         tests asynchronous notification
sg_inquiry      does a SCSI Inquiry command (from original HOWTO)
sg_tst_med      checks presence of media (from original HOWTO)
--------8<---------------------------------

Ich konnte besagte utils jedoch nirgends finden. Selbst wenn die Tools
nicht das tun, was Du willst, koennte man ihnen das sicherlich beibringen,
wenn man den Sourcecode hat.

Ansonsten gibt's noch 'echo "scsi-command" > /proc/scsi/scsi', aber
wieviel da moeglich ist, weiss ich nicht.

> Wisst Ihr, ob es Software unter Linux gibt, mit der man Befehle
> auf den Bus setzen kann? Vielleicht gibts ja auch etwas
> vergleichbares für die IDE-Schnittstelle?!

hdparm greift ja schon ziemlich direkt auf die IDE-Schnittstelle zu, denke
ich. Wenn Du Dir anschaust, wie hdparm das macht, und was dem seitens des
kernels gegenuebersteht (ide.c, usw.), vielleicht kannst Du dann hdparm so
modifizieren, dass es beliebige commandos auf den IDE-Bus legen kann (wenn
es das schon kann, habe ich die man-page zu schnell ueberflogen...)

Gruss,

Jens.

________________________________________________________________________
Jens Dreger                     | Freie Universitaet Berlin
Cauerstrasse 35a                | Fachbereich Physik, WWW Administration
10587 Berlin                    | Arnimallee 14
Tel: (030)342-3616              | 14195 Berlin
Fax: (089)66617-10770           | Tel.: (030)838-4774
                                | Raum: 0.4.08
jens.dreger at physik.fu-berlin.de | webadmin at physik.fu-berlin.de



Mehr Informationen über die Mailingliste linux-l