SG_READ_ATTR(8) SG3_UTILS SG_READ_ATTR(8) (NAME) sg_read_attr - SCSI READ ATTRIBUTE (SYNOPSIS) sg_read_attr [--cache] [--enumerate] [--ea=EA] [--filter=FL] [--first=FAI] [--help] [--hex] [--in=FN] [--lvn=LVN] [--maxlen=LEN] [--pn=PN] [--quiet] [--raw] [--readonly] [--sa=SA] [--verbose] [--version] DEVICE (DESCRIPTION) SCSI READ ATTRIBUTE DEVICE . SPC-3 SCSI . (tape) . SPC-5 (spc5r17.pdf) . (OPTIONS) . -c, --cache CACHE cdb READ ATTRIBUTE . . ( ) . -e, --enumerate ( ). T10 . DEVICE . -E, --ea=EA EA (element address) cdb READ ATTRIBUTE . SMC-2 SMC-3 (medium changers) . . -f, --filter=FL FL 0 65535 -1 . "0x" "h" . "-1" << >> FL . -F, --first=FAI FAI << >> (first attribute identifier) cdb . FAI . FAI . . -h, --help . -H, --hex . ASCII ( 0) . . . '-HHH' ( --hex) . --in=FN . -i, --in=FN FN ( '-' stdin) ASCII READ ATTRIBUTE 0x0 ( ) . DEVICE ( ) . FN ASCII . <<#>> ( ) . --raw FN . --raw raw 0 . READ ATTRIBUTE --sa=SA ( 0 ). -l, --lvn=LVN LVN << >> (logical volume number) cdb . . -m, --maxlen=LEN LEN () . "allocation length" cdb . ( LEN ) 8192 . LEN 1048576 . -p, --pn=PN PN << >> (partition number) cdb . DEVICE . PN . -q, --quiet . (SA=0) ( ) . -r, --raw SCSI ( data-out) ( ) . -R, --readonly DEVICE ( O_RDONLY). - . -s, --sa=SA SA << >> (service action) cdb . 0 63 0 . spc5r08.pdf : 0 (attribute values) 1 ( ) 2 3 4 SMC-3 5 . SA . 0 5 "av" "al" "lvl" "pn" "smc" "sa" . . -v, --verbose ( ) . -V, --version . (NOTES) SCSI READ ATTRIBUTE . SPC . READ ATTRIBUTE LOG SENSE ( sg_logs ) VPD INQUIRY . (EXAMPLES) DEVICE /dev/sg1 : # sg_read_attr -s al /dev/sg1 Attribute list: Remaining capacity in partition [MiB] Maximum capacity in partition [MiB] TapeAlert flags Load count MAM space remaining [B] Assigning organization Format density code ... : # sg_read_attr -s pl /dev/sg1 Partition number list: First partition number: 0 Number of partitions available: 2 ( ): # sg_read_attr /dev/sg1 Attribute values: Remaining capacity in partition [MiB]: 1386103 Maximum capacity in partition [MiB]: 1386103 TapeAlert flags: 0 .... : # sg_read_attr -HHH /dev/sg1 > av.hex av.hex : # sg_read_attr -s av --in=av.hex Attribute values: Remaining capacity in partition [MiB]: 1386103 Maximum capacity in partition [MiB]: 1386103 TapeAlert flags: 0 .... (EXIT STATUS) sg_read_attr 0 . sg3_utils(8) . (AUTHORS) Douglas Gilbert. (REPORTING BUGS) . (COPYRIGHT) Copyright (C) 2016-2020 Douglas Gilbert BSD-2-Clause . . (SEE ALSO) sg_vpd,sg_logs(sg3_utils) sg3_utils-1.46 December 2020 SG_READ_ATTR(8)