SG_READ_BLOCK_LIMITS(8)

✨ SG_READ_BLOCK_LIMITS ✨

okay bestie, welcome to sg_read_block_limits β€” it's a little member of the sg3_utils fam and honestly? it's giving "small but mighty" πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

sg_read_block_limits [--help] [--hex] [--mloi] [--raw] [--readonly]
[--verbose] [--version] DEVICE

🌸 DESCRIPTION 🌸

So what does this icon actually do? It sends a SCSI READ BLOCK LIMITS command to DEVICE, then prints out whatever the response is. That's it. That's the whole vibe ✨

Heads up though: this command is defined for tape (drives), and the full description lives in the SSC documents over at https://www.t10.org β€” so if you wanna read the source material, it's right there 🫢


πŸ’– OPTIONS πŸ’–

Little note before we dive in: arguments to long options are mandatory for short options as well. iykyk πŸ”₯

  • -h, --help β€” spits out the usage message and then dips. classic.
  • -H, --hex β€” outputs the response in hex instead of decoding it. sometimes you just want the raw tea β˜•
  • -m, --mloi β€” sets the MLOI bit in the READ BLOCK LIMITS command, and if that works out, prints out the Maximum Logical Object Identifier (MLOI) value. fun fact: the MLOI bit was introduced in the ssc4r02.pdf draft πŸ‘‘
  • -r, --raw β€” outputs the response in binary to stdout. no decoding, just vibes (and bytes) πŸ¦‹
  • -R, --readonly β€” opens DEVICE in read-only mode. just so you know, the default is to open it in read-write mode, so this is your "don't touch anything" safety blanket 🧚
  • -v, --verbose β€” turns up the verbosity (i.e. debug output). more words = more clues πŸ”
  • -V, --version β€” prints the version string and then exits. short and sweet, periodt πŸ’…

⭐ EXIT STATUS ⭐

The exit status of sg_read_block_limits is 0 when it's successful. Anything else? go peek at the sg3_utils(8) man page, it'll fill you in 🫢


🌈 EXAMPLES 🌈

ngl, it's usually okay to just use no options at all. here's an invocation (on the first line following the # command prompt) followed by some typical output:

# sg_read_block_limits /dev/st0
Read Block Limits results:
  Minimum block size: 1 byte(s)
  Maximum block size: 16777215 byte(s), 16383 KB, 15 MB
  Granularity: 0

look at those numbers go 😭πŸ”₯


πŸ‘‘ AUTHORS πŸ‘‘

Written by Douglas Gilbert. legend behaviour, fr fr.


πŸ’€ REPORTING BUGS πŸ’€

Report bugs to <dgilbert at interlog dot com>. don't be shy, they wanna know πŸ›


Copyright Β© 2009-2022 Douglas Gilbert

This software is distributed under a BSD-2-Clause license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. so like… don't come for them if it explodes πŸ™ˆ


πŸ¦‹ SEE ALSO πŸ¦‹

  • sg3_utils(sg3_utils)

and that's the whole page, bestie πŸŽ€ this masterpiece is from sg3_utils-1.48, dated November 2022 β€” go forth and read those block limits πŸ’œβœ¨

πŸ“¦ where this page comes from