{
    "mode": "man",
    "parameter": "sg_turs",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/sg_turs/8/json",
    "generated": "2026-06-02T21:27:42Z",
    "synopsis": "sgturs  [--delay=MS]  [--help]  [--low]  [--num=NUM]  [--number=NUM]  [--progress]  [--time]\n[--verbose] [--version] DEVICE\nsgturs [-d=MS] [-n=NUM] [-p]  [-t] [-v] [-V] DEVICE",
    "sections": {
        "NAME": {
            "content": "sgturs - send one or more SCSI TEST UNIT READY commands\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "sgturs  [--delay=MS]  [--help]  [--low]  [--num=NUM]  [--number=NUM]  [--progress]  [--time]\n[--verbose] [--version] DEVICE\n\nsgturs [-d=MS] [-n=NUM] [-p]  [-t] [-v] [-V] DEVICE\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This utility sends one or more SCSI TEST UNIT READY commands to the DEVICE. This may be  use‐\nful  for  timing the per command overhead.  Note that TEST UNIT READY has no associated data,\njust a 6 byte command (with each byte a zero) and a returned SCSI status value.\n\nThis utility supports two command line syntaxes, the preferred one is shown first in the syn‐\nopsis  and explained in this section. A later section on the old command line syntax outlines\nthe second group of options.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Arguments to long options are mandatory for short options as well.\n",
            "subsections": [
                {
                    "name": "-d --delay",
                    "content": "this option causes a delay of MS milliseconds to occur before  each  TEST  UNIT  READY\ncommand is issued.\n",
                    "flag": "-d",
                    "long": "--delay"
                },
                {
                    "name": "-h --help",
                    "content": "print out the usage message then exit.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-l --low",
                    "content": "when [--progress] is not being used, this utility tries to complete the SCSI TEST UNIT\nREADY command(s) as quickly as possible. Usually it calls a  library  function  to  do\neach  TUR  (sglltestunitready). With this option it uses the lower level sgpt in‐\nterface (see sgpt.h) to save a little time on each TUR.\n",
                    "flag": "-l",
                    "long": "--low"
                },
                {
                    "name": "-n --num",
                    "content": "performs TEST UNIT READY NUM times. If not given defaults to 1.  These  suffix  multi‐\npliers  are  permitted:  c  C *1; w W *2; b B *512; k K KiB *1,024; KB *1,000; m M MiB\n*1,048,576; MB *1,000,000; g G GiB *1,073,741,824; and GB *1,000,000,000 . Also a suf‐\nfix  of the form \"x<n>\" multiplies the leading number by <n>. Alternatively a hex num‐\nber may be given, prefixed by either '0x' or has a trailing 'h'.\n\n--number=NUM\nsame as --num=NUM. Added for compatibility with sgrequests  and  other  utilities  in\nthis  package.  The sgrequest utility has taken over the role of polling the progress\nindication which was originally assigned to the TEST UNIT READY  command.  This  is  a\nchange by T10.\n",
                    "flag": "-n",
                    "long": "--num"
                },
                {
                    "name": "-O --old",
                    "content": "Switch to older style options. Please use as first option.\n",
                    "flag": "-O",
                    "long": "--old"
                },
                {
                    "name": "-p --progress",
                    "content": "show  progress  indication  (a percentage) if available. If --num=NUM is given, NUM is\ngreater than 1 and an initial progress indication was detected then this utility waits\n30  seconds  before subsequent checks.  If the --delay=MS option is given then it will\nwait for that number of milliseconds instead of 30 seconds.  Exits when NUM is reached\nor  there  are no more progress indications.  Ignores --time option. See NOTES section\nbelow.\n",
                    "flag": "-p",
                    "long": "--progress"
                },
                {
                    "name": "-t --time",
                    "content": "after completing the requested number of TEST UNIT READY commands, outputs  the  total\nduration and the average number of commands executed per second.\n",
                    "flag": "-t",
                    "long": "--time"
                },
                {
                    "name": "-v --verbose",
                    "content": "increase level or verbosity.\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "-V --version",
                    "content": "print version string then exit.\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "NOTES": {
            "content": "The progress indication is optionally part of the sense data. When a prior command that takes\na long time to complete (and typically precludes other media access commands) is still under‐\nway,  the  progress indication can be used to determine how long before the device returns to\nits normal state. Around SPC-3 T10 changed the preferred command for polling the progress in‐\ndication from TEST UNIT READY to REQUEST SENSE (see the sgrequests utility).\n\nThe  SCSI  FORMAT command for disks used with the IMMED bit set is an example of an operation\nthat takes a significant amount of time and precludes other media access  during  that  time.\nThe  IMMED  bit  set instructs the FORMAT command to return control to the application client\nonce the format has commenced (see SBC-3). Several long  duration  SCSI  commands  associated\nwith tape drives also use the progress indication (see SSC-3).\n\nThe DEVICE is opened with a read-only flag (e.g. in Unix with the ORDONLY flag).\n\nEarly  standards  suggested  that  the  SCSI  TEST UNIT READY command be used for polling the\nprogress indication. More recent standards seem to suggest the  SCSI  REQUEST  SENSE  command\nshould be used instead.\n",
            "subsections": []
        },
        "EXIT STATUS": {
            "content": "The exit status of sgturs is 0 when it is successful (e.g. in the case of a mechanical disk,\nit is spun up and ready to accept commands). For this utility the other exit status of inter‐\nest  is  2  corresponding  to the \"not ready\" sense key. For other exit status values see the\nsg3utils(8) man page.\n",
            "subsections": []
        },
        "OLDER COMMAND LINE OPTIONS": {
            "content": "The options in this section were the only ones available prior to sg3utils  version  1.23  .\nSince then this utility defaults to the newer command line options which can be overridden by\nusing --old (or -O) as the first option. See the ENVIRONMENT VARIABLES  section  for  another\nway to force the use of these older command line options.\n",
            "subsections": [
                {
                    "name": "-d --delay",
                    "content": "this  option  causes  a  delay of MS milliseconds to occur before each TEST UNIT READY\ncommand is issued.\n",
                    "flag": "-d",
                    "long": "--delay"
                },
                {
                    "name": "-n",
                    "content": "--num=NUM in the main description.\n",
                    "flag": "-n"
                },
                {
                    "name": "-N --new",
                    "content": "Switch to the newer style options.\n",
                    "flag": "-N",
                    "long": "--new"
                },
                {
                    "name": "-p",
                    "content": "main description.\n",
                    "flag": "-p"
                },
                {
                    "name": "-t",
                    "content": "duration and the average number of commands executed per second.  Equivalent to --time\nin the main description.\n",
                    "flag": "-t"
                },
                {
                    "name": "-v",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "-V",
                    "content": "",
                    "flag": "-V"
                }
            ]
        },
        "ENVIRONMENT VARIABLES": {
            "content": "Since sg3utils version 1.23 the environment variable SG3UTILSOLDOPTS can be  given.  When\nit  is  present  this  utility will expect the older command line options. So the presence of\nthis environment variable is equivalent to using --old (or -O) as the first command line  op‐\ntion.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Written by D. Gilbert\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright © 2000-2020 Douglas Gilbert\nThis software is distributed under the GPL version 2. There is NO warranty; not even for MER‐\nCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "sginq, sgrequests (sg3utils)\n\n\n\nsg3utils-1.46                                July 2020                                   SGTURS(8)",
            "subsections": []
        }
    },
    "summary": "sgturs - send one or more SCSI TEST UNIT READY commands",
    "flags": [
        {
            "flag": "-d",
            "long": "--delay",
            "arg": null,
            "description": "this option causes a delay of MS milliseconds to occur before each TEST UNIT READY command is issued."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "print out the usage message then exit."
        },
        {
            "flag": "-l",
            "long": "--low",
            "arg": null,
            "description": "when [--progress] is not being used, this utility tries to complete the SCSI TEST UNIT READY command(s) as quickly as possible. Usually it calls a library function to do each TUR (sglltestunitready). With this option it uses the lower level sgpt in‐ terface (see sgpt.h) to save a little time on each TUR."
        },
        {
            "flag": "-n",
            "long": "--num",
            "arg": null,
            "description": "performs TEST UNIT READY NUM times. If not given defaults to 1. These suffix multi‐ pliers are permitted: c C *1; w W *2; b B *512; k K KiB *1,024; KB *1,000; m M MiB *1,048,576; MB *1,000,000; g G GiB *1,073,741,824; and GB *1,000,000,000 . Also a suf‐ fix of the form \"x<n>\" multiplies the leading number by <n>. Alternatively a hex num‐ ber may be given, prefixed by either '0x' or has a trailing 'h'. --number=NUM same as --num=NUM. Added for compatibility with sgrequests and other utilities in this package. The sgrequest utility has taken over the role of polling the progress indication which was originally assigned to the TEST UNIT READY command. This is a change by T10."
        },
        {
            "flag": "-O",
            "long": "--old",
            "arg": null,
            "description": "Switch to older style options. Please use as first option."
        },
        {
            "flag": "-p",
            "long": "--progress",
            "arg": null,
            "description": "show progress indication (a percentage) if available. If --num=NUM is given, NUM is greater than 1 and an initial progress indication was detected then this utility waits 30 seconds before subsequent checks. If the --delay=MS option is given then it will wait for that number of milliseconds instead of 30 seconds. Exits when NUM is reached or there are no more progress indications. Ignores --time option. See NOTES section below."
        },
        {
            "flag": "-t",
            "long": "--time",
            "arg": null,
            "description": "after completing the requested number of TEST UNIT READY commands, outputs the total duration and the average number of commands executed per second."
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "increase level or verbosity."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "print version string then exit."
        }
    ],
    "examples": [],
    "see_also": []
}