Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
IndexSoft

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 65 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  

sg_inq




SYNOPSIS

       sg_inq [-c] [-cl>] [-e] [-h] [-o=<opcode_page>] [-p]  [-r]
       [-V] [-36] [-?] <sg_device>


DESCRIPTION

       This  utility  sends  an INQUIRY SCSI command to the given
       device and then outputs the response. All SCSI devices are
       meant  to  respond to a "standard" INQUIRY command with at
       least a 36 byte  response  (in  SCSI  2  and  higher).  An
       INQUIRY  is  termed  as  "standard" when both the EVPD and
       CmdDt bits are clear.

       -c     set the Command Support Data (CmdDt) bit  (defaults
              to   clear(0)).   Used   in  conjunction  with  the
              '-o=<opcode>' option to specify  the  SCSI  command
              opcode  to supply the support data for. The command
              support data is a mask of the same  length  as  the
              command with bits set in positions that are modifi­
              able. For example, '12 03 ff 00 ff  01'  shows  the
              device  supports  the  EVPD  and CmdDt bits ]byte 1
              bits 0 and 1] in an INQUIRY command.

       -cl    lists the command data for all  supported  commands
              (followed  by  the command name) by looping through
              all 256 opcodes.

       -e     enable (i.e. sets) the Vital  Product  Data  (EVPD)
              bit  (defaults  to  clear(0)).  Used in conjunction
              with the '-o=<page>' option to specify the VPD page
              to fetch. According to the SCSI 2 standard VPD page
              0 lists the supported VPD page numbers.

       -h     outputs INQUIRY response in hex rather than  trying
              to decode it.

       -o=<opcode_page>
              used  in  conjunction with the '-c' option in which
              case the argument is  a  command  opcode.  Alterna­
              tively  it can be used in conjunction with the '-e'
              option in which case the argument  is  a  VPD  page
              number.  Argument is hexadecimal and expected to be
              in the range 0 to ff inclusive.

       -p     outputs PCI slot information of  the  given  device
              (if there is any) after the INQUIRY response.

       -r     outputs  the  INQUIRY  response in binary. Standard
              output should be redirected to a file or some other
              program that can process binary data.

       -V     print out version string
       the device indicates it could have supplied more data then
       a second INQUIRY is issued to fetch the longer response.

       In the 2.4 series of Linux kernels the given  device  must
       be  a  SCSI  generic  (sg) device. In the 2.5 series block
       devices (e.g. disks and SCSI DVDs) can also be  specified.
       For  example "sg_inq /dev/sda" will work in the 2.5 series
       kernels.


AUTHOR

       Written by Doug Gilbert


REPORTING BUGS

       Report bugs to <dgilbert@interlog.com>.


COPYRIGHT

       Copyright © 2001-2003 Douglas Gilbert
       This software is distributed  under  the  GPL  version  2.
       There is NO warranty; not even for MERCHANTABILITY or FIT­
       NESS FOR A PARTICULAR PURPOSE.


SEE ALSO

       sgdiag(scsirastools),                 sg_modes(sg3_utils),
       sg_logs(sg3_utils)

sg3_utils-1.03              April 2003                  SG_INQ(8)
  
Show your Support for the Linux Tutorial

Purchase one of the products from our new online shop. For each product you purchase, the Linux Tutorial gets a portion of the proceeds to help keep us going.


Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
You can choose larger fonts by selecting a different themes.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.11 Seconds