{
    "mode": "man",
    "parameter": "sg_sat_identify",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/sg_sat_identify/8/json",
    "generated": "2026-10-05T07:18:15Z",
    "synopsis": "sgsatidentify  [--ckcond]  [--extend]  [--help]  [--hex] [--ident] [--len=CLEN] [--packet]\n[--raw] [--readonly] [--verbose] [--version] DEVICE",
    "sections": {
        "NAME": {
            "content": "sgsatidentify - send ATA IDENTIFY DEVICE command via SCSI to ATA Translation (SAT) layer\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "sgsatidentify  [--ckcond]  [--extend]  [--help]  [--hex] [--ident] [--len=CLEN] [--packet]\n[--raw] [--readonly] [--verbose] [--version] DEVICE\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This utility sends either an ATA IDENTIFY DEVICE command or an  ATA  IDENTIFY  PACKET  DEVICE\ncommand  to  DEVICE  and outputs the response. The devices that respond to these commands are\nATA disks and ATAPI devices respectively.  Rather than send these commands  directly  to  the\ndevice  they are sent via a SCSI transport which is assumed to contain a SCSI to ATA Transla‐\ntion (SAT) Layer (SATL). The SATL may be in an operating system driver, in host  bus  adapter\nfirmware or in some external enclosure.\n\nThe  SAT standard (SAT ANSI INCITS 431-2007, prior draft: sat-r09.pdf at www.t10.org) defines\ntwo SCSI \"ATA PASS-THROUGH\" commands: one using a 16 byte \"cdb\" and the other with a 12  byte\ncdb.  This  utility  defaults to using the 16 byte cdb variant. SAT-4 revision 5 added a SCSI\n\"ATA PASS-THROUGH(32)\" command. SAT-2 and SAT-3 are now also  standards:  SAT-2  ANSI  INCITS\n465-2010  and  SAT-3 ANSI INCITS 517-2015 . The SAT-4 project is near standardization and the\nmost recent draft is sat4r06.pdf .\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Arguments to long options are mandatory for short options as well.\n",
            "subsections": [
                {
                    "name": "-c --ck_cond",
                    "content": "sets the CKCOND bit in the ATA PASS-THROUGH SCSI cdb. The default  setting  is  clear\n(i.e.  0).  When  set the SATL should yield a sense buffer containing a ATA Result de‐\nscriptor irrespective of whether the command succeeded or failed. When clear the  SATL\nshould  only  yield  a  sense buffer containing a ATA Result descriptor if the command\nfailed.\n",
                    "flag": "-c",
                    "long": "--ck_cond"
                },
                {
                    "name": "-e --extend",
                    "content": "sets the EXTEND bit in the ATA PASS-THROUGH SCSI cdb. The  default  setting  is  clear\n(i.e.  0). When set a 48 bit LBA command is sent to the device. This option has no ef‐\nfect when --len=12.\n",
                    "flag": "-e",
                    "long": "--extend"
                },
                {
                    "name": "-h --help",
                    "content": "outputs the usage message summarizing command line options then exits. Ignores  DEVICE\nif given.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-H --hex",
                    "content": "outputs  the  ATA  IDENTIFY  (PACKET) DEVICE response in hex. The default action (i.e.\nwithout any '-H' options) is to output the response in hex, grouped in  16  bit  words\n(i.e.  the  ATA  standard's  preference).   When given once, the response is output in\nASCII hex bytes (i.e. the SCSI standard's preference). When given twice  (i.e.  '-HH')\nthe  output  is in hex, grouped in 16 bit words, the same as the default but without a\nheader. When given thrice (i.e. '-HHH') the output is in hex, grouped in 16 bit words,\nin a format that is acceptable for 'hdparm --Istdin' to process. '-HHHH'  simply  out‐\nputs hex data bytes, space separated, 16 per line.\n",
                    "flag": "-H",
                    "long": "--hex"
                },
                {
                    "name": "-i --ident",
                    "content": "outputs the World Wide Name (WWN) of the device. This should be a NAA-5 64 bit number.\nIt  is output in hex prefixed with \"0x\". If not available then \"0x0000000000000000\" is\noutput. The equivalent for a SCSI disk (i.e. its logical unit name) can be found  with\n\"sgvpd -ii\".\n",
                    "flag": "-i",
                    "long": "--ident"
                },
                {
                    "name": "-l --len",
                    "content": "CLEN  this  is the length of the SCSI cdb used for the ATA PASS-THROUGH command.  CLEN\ncan either be 12, 16 or 32. The default is 16. The larger cdb sizes are needed for  48\nbit  LBA  addressing of ATA devices. The ATA Auxiliary and ICC registers are only con‐\nveyed with the 32 byte cdb variant.\n",
                    "flag": "-l",
                    "long": "--len"
                },
                {
                    "name": "-p --packet",
                    "content": "send an ATA IDENTIFY PACKET DEVICE command (via the SATL). The default  action  is  to\nsend  an  ATA  IDENTIFY DEVICE command. Note that the ATAPI specification by T13 (i.e.\nthe PACKET interface) is now obsolete.\n",
                    "flag": "-p",
                    "long": "--packet"
                },
                {
                    "name": "-r --raw",
                    "content": "output the ATA IDENTIFY (PACKET) DEVICE response in binary. The output should be piped\nto a file or another utility when this option is used.  The binary is sent to  stdout,\nand errors are sent to stderr.\n",
                    "flag": "-r",
                    "long": "--raw"
                },
                {
                    "name": "-R --readonly",
                    "content": "open  the  DEVICE  read-only (e.g. in Unix with the ORDONLY flag).  The default is to\nopen it read-write.\n",
                    "flag": "-R",
                    "long": "--readonly"
                },
                {
                    "name": "-v --verbose",
                    "content": "increases the level or verbosity.\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "-V --version",
                    "content": "print out version string\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "NOTES": {
            "content": "Since the response to the IDENTIFY (PACKET) DEVICE command is very important for the  correct\nuse  of an ATA(PI) device (and is typically the first command sent), a SATL should provide an\nATA Information VPD page which contains the similar information.\n\nThe SCSI ATA PASS-THROUGH (12) command's opcode is 0xa1 and it clashes  with  the  MMC  set's\nBLANK  command  used  by  cd/dvd writers. So a SATL in front of an ATAPI device that uses MMC\n(i.e. has peripheral device type 5) probably should treat opcode 0xa1 as a BLANK command  and\nsend  it  through to the cd/dvd drive. The ATA PASS-THROUGH (16) command's opcode (0x85) does\nnot clash with anything so it is a better choice.\n\nPrior to Linux kernel 2.6.29 USB mass storage limited sense data to 18 bytes which  made  the\n--ckcond option yield strange (truncated) results.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "These  examples use Linux device names and a Linux utility called hdparm. For suitable device\nnames in other supported Operating Systems see the sg3utils(8) man page.\n\nIn this example /dev/sdb is a SATA 2.5\" disk connected via a USB (type  C  connector)  dongle\nthat  implements the UAS (USB attached SCSI) protocol (also known as UASP). UAS is a vast im‐\nprovement over the USB mass storage class.\n\n# sgsatidentify /dev/sdb\nResponse for IDENTIFY DEVICE ATA command:\n00   0c5a 3fff c837 0010 0000 0000 003f 0000  .Z ?. .7 .. .. .. .? ..\n....\n\nThe hexadecimal ASCII (with plain ASCII to the right) output is abridged  to  a  single  line\n(i.e.  the  first  16  bytes (or 8 words)). Now to decode some of that ATA Identify response.\nFirst sginq can decode a few strings:\n\n# sgsatidentify -HHHH /dev/sdb | sginq --ata -I -\nATA device: model, serial number and firmware revision:\nST9500420AS     5VJCE6R7 0002SDM1\n\nFor a lot more details, the hdparm utility is a good choice:\n\n# sgsatidentify -HHH /dev/sdb | hdparm --Istdin\nATA device, with non-removable media\nModel Number:       ST9500420AS\nSerial Number:      5VJCE6R7\nFirmware Revision:  0002SDM1\nTransport:          Serial\nStandards:\n....\n\nThere are about 80 more lines of details decoded by hdparm in this case.  Notice the  differ‐\nence in the number of \"H\" options: three give an unadorned hex output arranged in (little en‐\ndian)  words (i.e. 16 bits each) while four \"H\" options give an unadorned hex output in bytes\n(i.e. 8 bits each).\n",
            "subsections": []
        },
        "EXIT STATUS": {
            "content": "The exit status of sgsatidentify is 0 when it is successful. Otherwise see the sg3utils(8)\nman page.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Written by Douglas Gilbert\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "Report bugs to <dgilbert at interlog dot com>.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright © 2006-2020 Douglas Gilbert\nThis software is distributed under a FreeBSD license. There is NO warranty; not even for MER‐\nCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "",
            "subsections": [
                {
                    "name": "sg_vpd(sg3_utils), sg_inq(sg3_utils), sdparm(sdparm), hdparm(hdparm)",
                    "content": "sg3utils-1.45                              January 2020                          SGSATIDENTIFY(8)"
                }
            ]
        }
    },
    "summary": "sgsatidentify - send ATA IDENTIFY DEVICE command via SCSI to ATA Translation (SAT) layer",
    "flags": [
        {
            "flag": "-c",
            "long": "--ck_cond",
            "arg": null,
            "description": "sets the CKCOND bit in the ATA PASS-THROUGH SCSI cdb. The default setting is clear (i.e. 0). When set the SATL should yield a sense buffer containing a ATA Result de‐ scriptor irrespective of whether the command succeeded or failed. When clear the SATL should only yield a sense buffer containing a ATA Result descriptor if the command failed."
        },
        {
            "flag": "-e",
            "long": "--extend",
            "arg": null,
            "description": "sets the EXTEND bit in the ATA PASS-THROUGH SCSI cdb. The default setting is clear (i.e. 0). When set a 48 bit LBA command is sent to the device. This option has no ef‐ fect when --len=12."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "outputs the usage message summarizing command line options then exits. Ignores DEVICE if given."
        },
        {
            "flag": "-H",
            "long": "--hex",
            "arg": null,
            "description": "outputs the ATA IDENTIFY (PACKET) DEVICE response in hex. The default action (i.e. without any '-H' options) is to output the response in hex, grouped in 16 bit words (i.e. the ATA standard's preference). When given once, the response is output in ASCII hex bytes (i.e. the SCSI standard's preference). When given twice (i.e. '-HH') the output is in hex, grouped in 16 bit words, the same as the default but without a header. When given thrice (i.e. '-HHH') the output is in hex, grouped in 16 bit words, in a format that is acceptable for 'hdparm --Istdin' to process. '-HHHH' simply out‐ puts hex data bytes, space separated, 16 per line."
        },
        {
            "flag": "-i",
            "long": "--ident",
            "arg": null,
            "description": "outputs the World Wide Name (WWN) of the device. This should be a NAA-5 64 bit number. It is output in hex prefixed with \"0x\". If not available then \"0x0000000000000000\" is output. The equivalent for a SCSI disk (i.e. its logical unit name) can be found with \"sgvpd -ii\"."
        },
        {
            "flag": "-l",
            "long": "--len",
            "arg": null,
            "description": "CLEN this is the length of the SCSI cdb used for the ATA PASS-THROUGH command. CLEN can either be 12, 16 or 32. The default is 16. The larger cdb sizes are needed for 48 bit LBA addressing of ATA devices. The ATA Auxiliary and ICC registers are only con‐ veyed with the 32 byte cdb variant."
        },
        {
            "flag": "-p",
            "long": "--packet",
            "arg": null,
            "description": "send an ATA IDENTIFY PACKET DEVICE command (via the SATL). The default action is to send an ATA IDENTIFY DEVICE command. Note that the ATAPI specification by T13 (i.e. the PACKET interface) is now obsolete."
        },
        {
            "flag": "-r",
            "long": "--raw",
            "arg": null,
            "description": "output the ATA IDENTIFY (PACKET) DEVICE response in binary. The output should be piped to a file or another utility when this option is used. The binary is sent to stdout, and errors are sent to stderr."
        },
        {
            "flag": "-R",
            "long": "--readonly",
            "arg": null,
            "description": "open the DEVICE read-only (e.g. in Unix with the ORDONLY flag). The default is to open it read-write."
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "increases the level or verbosity."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "print out version string"
        }
    ],
    "examples": [
        "These  examples use Linux device names and a Linux utility called hdparm. For suitable device",
        "names in other supported Operating Systems see the sg3utils(8) man page.",
        "In this example /dev/sdb is a SATA 2.5\" disk connected via a USB (type  C  connector)  dongle",
        "that  implements the UAS (USB attached SCSI) protocol (also known as UASP). UAS is a vast im‐",
        "provement over the USB mass storage class.",
        "# sgsatidentify /dev/sdb",
        "Response for IDENTIFY DEVICE ATA command:",
        "00   0c5a 3fff c837 0010 0000 0000 003f 0000  .Z ?. .7 .. .. .. .? ..",
        "....",
        "The hexadecimal ASCII (with plain ASCII to the right) output is abridged  to  a  single  line",
        "(i.e.  the  first  16  bytes (or 8 words)). Now to decode some of that ATA Identify response.",
        "First sginq can decode a few strings:",
        "# sgsatidentify -HHHH /dev/sdb | sginq --ata -I -",
        "ATA device: model, serial number and firmware revision:",
        "ST9500420AS     5VJCE6R7 0002SDM1",
        "For a lot more details, the hdparm utility is a good choice:",
        "# sgsatidentify -HHH /dev/sdb | hdparm --Istdin",
        "ATA device, with non-removable media",
        "Model Number:       ST9500420AS",
        "Serial Number:      5VJCE6R7",
        "Firmware Revision:  0002SDM1",
        "Transport:          Serial",
        "Standards:",
        "....",
        "There are about 80 more lines of details decoded by hdparm in this case.  Notice the  differ‐",
        "ence in the number of \"H\" options: three give an unadorned hex output arranged in (little en‐",
        "dian)  words (i.e. 16 bits each) while four \"H\" options give an unadorned hex output in bytes",
        "(i.e. 8 bits each)."
    ],
    "see_also": []
}