{
    "mode": "man",
    "parameter": "tapestat",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/tapestat/1/json",
    "generated": "2026-09-02T17:39:46Z",
    "synopsis": "tapestat [ -k | -m ] [ -t ] [ -V ] [ -y ] [ -z ] [ --human ] [ interval [ count ] ]",
    "sections": {
        "NAME": {
            "content": "tapestat - Report tape statistics.\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "tapestat [ -k | -m ] [ -t ] [ -V ] [ -y ] [ -z ] [ --human ] [ interval [ count ] ]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The  tapestat  command is used for monitoring the activity of tape drives connected to a sys‐\ntem.\n\nThe first report generated by the tapestat command provides statistics  concerning  the  time\nsince the system was booted, unless the -y option is used, when this first report is omitted.\nEach subsequent report covers the time since the previous report.\n\nThe interval parameter specifies the amount of time in seconds between each report. The count\nparameter can be specified in conjunction with the interval parameter. If the count parameter\nis  specified, the value of count determines the number of reports generated at interval sec‐\nonds apart. If the interval parameter is specified without the count parameter, the  tapestat\ncommand generates reports continuously.\n\n",
            "subsections": []
        },
        "REPORT": {
            "content": "The  tapestat  report  provides  statistics for each tape drive connected to the system.  The\nfollowing data are displayed:\n\nr/s    The number of reads issued expressed as the number per second averaged over the inter‐\nval.\n\nw/s    The number of writes issued expressed as the number per second averaged over  the  in‐\nterval.\n\nkBread/s | MBread/s\nThe  amount  of  data read expressed in kilobytes (by default or if option -k used) or\nmegabytes (if option -m used) per second averaged over the interval.\n\nkBwrtn/s | MBwrtn/s\nThe amount of data written expressed in kilobytes (by default or if option -k used) or\nmegabytes (if option -m used) per second averaged over the interval.\n\n%Rd    Read percentage wait - The percentage of time over the interval spent waiting for read\nrequests to complete.  The time is measured from when the request is dispatched to the\nSCSI mid-layer until it signals that it completed.\n\n%Wr    Write percentage wait - The percentage of time over the  interval  spent  waiting  for\nwrite  requests  to complete. The time is measured from when the request is dispatched\nto the SCSI mid-layer until it signals that it completed.\n\n%Oa    Overall percentage wait - The percentage of time over the interval spent  waiting  for\nany I/O request to complete (read, write, and other).\n\nRs/s   The  number  of  I/Os,  expressed as the number per second averaged over the interval,\nwhere a non-zero residual value was encountered.\n\nOt/s   The number of I/Os, expressed as the number per second  averaged  over  the  interval,\nthat  were included as \"other\". Other I/O includes ioctl calls made to the tape driver\nand implicit operations performed by the tape driver such as rewind on close (for tape\ndevices that implement rewind on close). It does not include any I/O  performed  using\nmethods outside of the tape driver (e.g. via sg ioctls).\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "--human",
                    "content": "Print sizes in human readable format (e.g. 1.0k, 1.2M, etc.)  The units displayed with\nthis option supersede any other default units (e.g.  kilobytes, sectors...) associated\nwith the metrics.\n",
                    "long": "--human"
                },
                {
                    "name": "-k",
                    "content": "This option is mutually exclusive with -m.\n",
                    "flag": "-k"
                },
                {
                    "name": "-m",
                    "content": "This option is mutually exclusive with -k.\n",
                    "flag": "-m"
                },
                {
                    "name": "-t",
                    "content": "MAT environment variable (see below).\n",
                    "flag": "-t"
                },
                {
                    "name": "-V",
                    "content": "",
                    "flag": "-V"
                },
                {
                    "name": "-y",
                    "content": "",
                    "flag": "-y"
                },
                {
                    "name": "-z",
                    "content": "sample period.\n\n",
                    "flag": "-z"
                }
            ]
        },
        "CONSIDERATIONS": {
            "content": "It  is possible for a percentage value (read, write, or other) to be greater than 100 percent\n(the tapestat command will never show a percentage value more than 999).  If rewinding a tape\ntakes 40 seconds where the interval time is 5 seconds the %Oa value would show as  0  in  the\nintervals  before  the  rewind  completed and then show as approximately 800 percent when the\nrewind completes.\n\nSimilar values will be observed for %Rd and %Wr if a tape drive stops reading or writing  and\nthen  restarts (that is it stopped streaming). In such a case you may see the r/s or w/s drop\nto zero and the %Rd/%Wr value could be higher than 100 when reading or writing continues (de‐\npending on how long it takes to restart writing or reading).  This is only  an  issue  if  it\nhappens a lot as it may cause tape wear and will impact on the backup times.\n\nFor  fast tape drives you may see low percentage wait times.  This does not indicate an issue\nwith the tape drive. For a slower tape drive (e.g. an older generation DDS drive)  the  speed\nof  the  tape  (and  tape  drive)  is much slower than filesystem I/O, percent wait times are\nlikely to be higher. For faster tape drives (e.g. LTO) the percentage wait times  are  likely\nto  be  lower  as  program  writing  to  or reading from tape is going to be doing a lot more\nfilesystem I/O because of the higher throughput.\n\nAlthough tape statistics are implemented in the kernel using atomic variables they cannot  be\nread  atomically as a group. All of the statistics values are read from different files under\n/sys, because of this there may be I/O completions while reading the different files for  the\none  tape drive. This may result in a set of statistics for a device that contain some values\nbefore an I/O completed and some after.\n\nThis command uses rounding down as the rounding method when calculating  per  second  statis‐\ntics.   If,  for  example,  you are using dd to copy one tape to another and running tapestat\nwith an interval of 5 seconds and over the interval there were 3210  writes  and  3209  reads\nthen  w/s  would show 642 and r/s 641 (641.8 rounded down to 641). In such a case if it was a\ntar archive being copied (with a 10k block size) you would also see a difference between  the\nkBread/s  and  kBwrtn/s  of 2 (one I/O 10k in size divided by the interval period of 5 sec‐\nonds). If instead there were 3210 writes and 3211 reads both w/s and r/s would both show  642\nbut you would still see a difference between the kBread/s and kBwrtn/s values of 2 kB/s.\n\nThis  command  is  provided  with  an interval in seconds. However internally the interval is\ntracked per device and can potentially have an effect on the per second statistics  reported.\nThe time each set of statistics is captured is kept with those statistics. The difference be‐\ntween the current and previous time is converted to milliseconds for use in calculations.  We\ncan look at how this can impact the statistics reported if we use an example of a tar archive\nbeing  copied  between  two  tape  drives using dd.  If both devices reported 28900 kilobytes\ntransferred and the reading tape drive had an interval of 5001 milliseconds and  the  writing\ntape drive 5000 milliseconds that would calculate out as 5778 kBread/s and 5780 kBwrtn/s.\n\nThe  impact  of some retrieving statistics during an I/O completion, rounding down, and small\ndifferences in the interval period on the statistics calculated should be minimal but may  be\nnon-zero.\n\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "The tapestat command takes into account the following environment variables:\n\nSCOLORS\nBy  default statistics are displayed in color when the output is connected to a termi‐\nnal.  Use this variable to change the settings. Possible values for this variable  are\nnever, always or auto (the latter is equivalent to the default settings).\nPlease  note that the color (being red, yellow, or some other color) used to display a\nvalue is not indicative of any kind of issue simply because of the color. It only  in‐\ndicates different ranges of values.\n\nSCOLORSSGR\nSpecify  the  colors  and other attributes used to display statistics on the terminal.\nIts  value  is   a   colon-separated   list   of   capabilities   that   defaults   to\nH=31;1:I=32;22:M=35;1:N=34;1:Z=34;22.  Supported capabilities are:\n\nH=     SGR  (Select Graphic Rendition) substring for percentage values greater than or\nequal to 75%.\n\nI=     SGR substring for tape names.\n\nM=     SGR substring for percentage values in the range from 50% to 75%.\n\nN=     SGR substring for non-zero statistics values.\n\nZ=     SGR substring for zero values.\n\nSTIMEFORMAT\nIf this variable exists and its value is ISO then the current locale will  be  ignored\nwhen  printing  the  date  in the report header. The tapestat command will use the ISO\n8601 format (YYYY-MM-DD) instead.  The timestamp displayed with option -t will also be\ncompliant with ISO 8601 format.\n\n",
            "subsections": []
        },
        "BUGS": {
            "content": "/sys filesystem must be mounted for tapestat to work. It will not work on kernels that do not\nhave sysfs support\n\nThis command requires kernel version 4.2 or later (or tape statistics support backported  for\nan earlier kernel version).\n\nAlthough  tapestat  speaks  of  kilobytes (kB), megabytes (MB)..., it actually uses kibibytes\n(kiB), mebibytes (MiB)...  A kibibyte is equal to 1024 bytes, and a mebibyte is equal to 1024\nkibibytes.\n\n",
            "subsections": []
        },
        "FILES": {
            "content": "/sys/class/scsitape/st<num>/stats/*\nStatistics files for tape devices.\n\n/proc/uptime contains system uptime.\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Initial revision by Shane M. SEYMOUR (shane.seymour <at> hpe.com)\nModified for sysstat by Sebastien Godard (sysstat <at> orange.fr)\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "iostat(1), mpstat(1)\n\nhttps://github.com/sysstat/sysstat\nhttp://pagesperso-orange.fr/sebastien.godard/\n\nLinux                                         JUNE 2020                                  TAPESTAT(1)",
            "subsections": []
        }
    },
    "summary": "tapestat - Report tape statistics.",
    "flags": [
        {
            "flag": "",
            "long": "--human",
            "arg": null,
            "description": "Print sizes in human readable format (e.g. 1.0k, 1.2M, etc.) The units displayed with this option supersede any other default units (e.g. kilobytes, sectors...) associated with the metrics."
        },
        {
            "flag": "-k",
            "long": null,
            "arg": null,
            "description": "This option is mutually exclusive with -m."
        },
        {
            "flag": "-m",
            "long": null,
            "arg": null,
            "description": "This option is mutually exclusive with -k."
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": "MAT environment variable (see below)."
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-y",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-z",
            "long": null,
            "arg": null,
            "description": "sample period."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "iostat",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/iostat/1/json"
        },
        {
            "name": "mpstat",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mpstat/1/json"
        }
    ]
}