{
    "content": [
        {
            "type": "text",
            "text": "# sg_sat_read_gplog (man)\n\n## NAME\n\nsgsatreadgplog - use ATA READ LOG EXT command via a SCSI to ATA Translation (SAT) layer\n\n## SYNOPSIS\n\nsgsatreadgplog   [--ckcond]   [--count=CO]   [--dma]   [--help]  [--hex]  [--len={16|12}]\n[--log=LA] [--page=PN] [--readonly] [--verbose] [--version] DEVICE\n\n## DESCRIPTION\n\nThis utility sends an ATA READ LOG EXT or an ATA READ LOG DMA EXT command to the DEVICE. This\ncommand  is  used  to read the general purpose log of (S)ATA disks (not ATAPI devices such as\nDVD driver). Rather than send the READ LOG (DMA) EXT command directly to  the  device  it  is\nsent  via  a SCSI transport which is assumed to contain a SCSI to ATA Translation (SAT) Layer\n(SATL). The SATL may be in an operating system driver, in host bus adapter (HBA) firmware  or\nin some external enclosure.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (11 subsections)\n- **NOTES**\n- **EXIT STATUS**\n- **AUTHOR**\n- **REPORTING BUGS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "sg_sat_read_gplog",
        "section": "",
        "mode": "man",
        "summary": "sgsatreadgplog - use ATA READ LOG EXT command via a SCSI to ATA Translation (SAT) layer",
        "synopsis": "sgsatreadgplog   [--ckcond]   [--count=CO]   [--dma]   [--help]  [--hex]  [--len={16|12}]\n[--log=LA] [--page=PN] [--readonly] [--verbose] [--version] DEVICE",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-C",
                "long": "--ck",
                "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 ATA command succeeded or failed. When clear the SATL should only yield a sense buffer containing a ATA Result descriptor if the ATA command failed."
            },
            {
                "flag": "-c",
                "long": "--count",
                "arg": null,
                "description": "the number CO is placed in the \"count\" field in the ATA READ LOG EXT command. This specified the number of 512-byte blocks of data to be read from the specified log."
            },
            {
                "flag": "-d",
                "long": "--dma",
                "arg": null,
                "description": "use the ATA READ LOG DMA EXT command instead of ATA READ LOG EXT command. Some de‐ vices require this to return valid log data."
            },
            {
                "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": "when given once, the response is output in ASCII hexadecimal bytes. When given twice, then the response is grouped into 16 bit words using ATA conventions (i.e. little en‐ dian); this is the default output (i.e. when this option is not given). When given thrice (i.e. '-HHH') the output is in hex, grouped in 16 bit words (without a leading offset and trailing ASCII on each line), in a format that is acceptable for 'hdparm --Istdin' to process."
            },
            {
                "flag": "-L",
                "long": "--log",
                "arg": null,
                "description": "the number LA is known as the \"log address\" in the ATA standards and is placed in bits 7:0 of the \"lba\" field of the ATA READ LOG (DMA) EXT command. This specifies the log to be returned (See ATA-ACS for a detailed list of available log addresses). The de‐ fault value placed in the \"lba field is 0, returning the directory of available logs. The maximum value allowed for LOG is 0xff."
            },
            {
                "flag": "-p",
                "long": "--page",
                "arg": null,
                "description": "the number PN is the page number (within the log address) and is placed in bits 32:16 of the \"lba\" field of the ATA READ LOG (DMA) EXT command. The default value placed in the \"lba\" field is 0. The maximum value allowed for LOG is 0xffff."
            },
            {
                "flag": "-l",
                "long": "--len",
                "arg": null,
                "description": "this is the length of the SCSI cdb used for the ATA PASS-THROUGH commands. The argu‐ ment can either be 16 or 12. The default is 16. Some SCSI transports cannot convey SCSI commands longer than 12 bytes."
            },
            {
                "flag": "-r",
                "long": "--readonly",
                "arg": null,
                "description": "causes the DEVICE to be opened with the read-only flag (ORDONLY in Unix). The default action is to open DEVICE with the read-write flag (ORDWR in Unix). In some cases sending power management commands to ATA disks are defeated by OS actions on the close() if the DEVICE was opened with the read-write flag (e.g. the OS might think it needs to flush something to disk)."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "increases the level or verbosity."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "print out version string"
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "sgsatidentify",
                "section": "sg3utils",
                "url": "https://www.chedong.com/phpMan.php/man/sgsatidentify/sg3utils/json"
            },
            {
                "name": "sginq",
                "section": "sg3utils",
                "url": "https://www.chedong.com/phpMan.php/man/sginq/sg3utils/json"
            },
            {
                "name": "sdparm",
                "section": "sdparm",
                "url": "https://www.chedong.com/phpMan.php/man/sdparm/sdparm/json"
            },
            {
                "name": "hdparm",
                "section": "hdparm",
                "url": "https://www.chedong.com/phpMan.php/man/hdparm/hdparm/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "-C --ck",
                        "lines": 6,
                        "flag": "-C",
                        "long": "--ck"
                    },
                    {
                        "name": "-c --count",
                        "lines": 3,
                        "flag": "-c",
                        "long": "--count"
                    },
                    {
                        "name": "-d --dma",
                        "lines": 3,
                        "flag": "-d",
                        "long": "--dma"
                    },
                    {
                        "name": "-h --help",
                        "lines": 3,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-H --hex",
                        "lines": 7,
                        "flag": "-H",
                        "long": "--hex"
                    },
                    {
                        "name": "-L --log",
                        "lines": 6,
                        "flag": "-L",
                        "long": "--log"
                    },
                    {
                        "name": "-p --page",
                        "lines": 4,
                        "flag": "-p",
                        "long": "--page"
                    },
                    {
                        "name": "-l --len",
                        "lines": 4,
                        "flag": "-l",
                        "long": "--len"
                    },
                    {
                        "name": "-r --readonly",
                        "lines": 6,
                        "flag": "-r",
                        "long": "--readonly"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "NOTES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "EXIT STATUS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "sgsatreadgplog - use ATA READ LOG EXT command via a SCSI to ATA Translation (SAT) layer\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "sgsatreadgplog   [--ckcond]   [--count=CO]   [--dma]   [--help]  [--hex]  [--len={16|12}]\n[--log=LA] [--page=PN] [--readonly] [--verbose] [--version] DEVICE\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This utility sends an ATA READ LOG EXT or an ATA READ LOG DMA EXT command to the DEVICE. This\ncommand  is  used  to read the general purpose log of (S)ATA disks (not ATAPI devices such as\nDVD driver). Rather than send the READ LOG (DMA) EXT command directly to  the  device  it  is\nsent  via  a SCSI transport which is assumed to contain a SCSI to ATA Translation (SAT) Layer\n(SATL). The SATL may be in an operating system driver, in host bus adapter (HBA) firmware  or\nin some external enclosure.\n\nThis  utility  does not currently attempt to decode the response from the ATA disk, rather it\noutputs the response in ASCII hexadecimal grouped in 16 bit words. Following ATA  conventions\nthose  words  are decoded little endian (note that SCSI commands use a big endian representa‐\ntion). In the future this utility may attempt to decode some log  pages,  perhaps  using  the\n--decode option.\n\nThe  SAT-2  standard  (SAT ANSI INCITS 465-2010, prior draft: sat2r09.pdf at www.t10.org) de‐\nfines two SCSI \"ATA PASS-THROUGH\" commands: one using a 16 byte \"cdb\" and the other with a 12\nbyte cdb. This utility defaults to using the 16 byte cdb variant.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "Arguments to long options are mandatory for short options as well.\n",
                "subsections": [
                    {
                        "name": "-C --ck",
                        "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 ATA command succeeded or failed. When clear the\nSATL should only yield a sense buffer containing a ATA Result descriptor  if  the  ATA\ncommand failed.\n",
                        "flag": "-C",
                        "long": "--ck"
                    },
                    {
                        "name": "-c --count",
                        "content": "the  number  CO  is  placed in the \"count\" field in the ATA READ LOG EXT command. This\nspecified the number of 512-byte blocks of data to be read from the specified log.\n",
                        "flag": "-c",
                        "long": "--count"
                    },
                    {
                        "name": "-d --dma",
                        "content": "use the ATA READ LOG DMA EXT command instead of ATA READ LOG EXT  command.   Some  de‐\nvices require this to return valid log data.\n",
                        "flag": "-d",
                        "long": "--dma"
                    },
                    {
                        "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": "when given once, the response is output in ASCII hexadecimal bytes. When given  twice,\nthen  the response is grouped into 16 bit words using ATA conventions (i.e. little en‐\ndian); this is the default output (i.e. when this option is  not  given).  When  given\nthrice  (i.e. '-HHH') the output is in hex, grouped in 16 bit words (without a leading\noffset and trailing ASCII on each line), in a format that is  acceptable  for  'hdparm\n--Istdin' to process.\n",
                        "flag": "-H",
                        "long": "--hex"
                    },
                    {
                        "name": "-L --log",
                        "content": "the number LA is known as the \"log address\" in the ATA standards and is placed in bits\n7:0 of the \"lba\" field of the ATA READ LOG (DMA) EXT command. This specifies  the  log\nto  be  returned (See ATA-ACS for a detailed list of available log addresses). The de‐\nfault value placed in the \"lba field is 0, returning the directory of available  logs.\nThe maximum value allowed for LOG is 0xff.\n",
                        "flag": "-L",
                        "long": "--log"
                    },
                    {
                        "name": "-p --page",
                        "content": "the  number PN is the page number (within the log address) and is placed in bits 32:16\nof the \"lba\" field of the ATA READ LOG (DMA) EXT command. The default value placed  in\nthe \"lba\" field is 0. The maximum value allowed for LOG is 0xffff.\n",
                        "flag": "-p",
                        "long": "--page"
                    },
                    {
                        "name": "-l --len",
                        "content": "this  is the length of the SCSI cdb used for the ATA PASS-THROUGH commands.  The argu‐\nment can either be 16 or 12. The default is 16. Some  SCSI  transports  cannot  convey\nSCSI commands longer than 12 bytes.\n",
                        "flag": "-l",
                        "long": "--len"
                    },
                    {
                        "name": "-r --readonly",
                        "content": "causes the DEVICE to be opened with the read-only flag (ORDONLY in Unix). The default\naction is to open DEVICE with the read-write flag (ORDWR  in  Unix).  In  some  cases\nsending  power  management  commands  to  ATA  disks are defeated by OS actions on the\nclose() if the DEVICE was opened with the read-write flag (e.g. the OS might think  it\nneeds to flush something to disk).\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": "Prior  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": []
            },
            "EXIT STATUS": {
                "content": "The exit status  of  sgsatreadgplog  is  0  when  it  is  successful.  Otherwise  see  the\nsg3utils(8) man page.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Written by Hannes Reinecke and Douglas Gilbert\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "Report bugs to <dgilbert at interlog dot com>.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright © 2014-2015 Hannes Reinecke, SUSE Linux GmbH\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": "sgsatidentify(sg3utils), sginq(sg3utils), sdparm(sdparm), hdparm(hdparm)\n\n\n\nsg3utils-1.41                               April 2015                         SGSATREADGPLOG(8)",
                "subsections": []
            }
        }
    }
}