Log Sense - 4Dh

The library returns information for the requested log page. The only supported log page is the Tape Alert page, with a limited set of flags. The library will return the current values of the flags on request, and then clear them.

This command can be used to monitor conditions of the library.

The LOG SENSE CDB format is shown in the following table.
Table 1: LOG SENSE CDB format
Bit Byte |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
0 |
Op Code (4Dh) |
|||||||
1 |
Logical Unit Number |
Reserved |
PPC |
SP |
||||
2 |
PC |
Page Code |
||||||
3 |
Reserved |
|||||||
4 |
Reserved |
|||||||
5 |
Parameter Pointer |
|||||||
6 |
||||||||
7 |
Allocation Length |
|||||||
8 |
||||||||
9 |
Control |
Field | Description |
---|---|
Parameter Pointer Control (PPC) |
Must be set to 0. The library will return log parameters starting with the parameter code specified in the Parameter Pointer field, and return up to the number of bytes specified in the Allocation Length field. Log parameters are returned in ascending order according to their parameter code. A PPC bit of 0 and a Parameter Pointer field of 0 will cause all available log parameters for the requested page code to be returned, subject to the Allocation Length. |
Save Parameters (SP) |
Must be set to 0. The library does not support the saving of log parameters. |
Page Control (PC) |
Must be set to 01b. The library only returns cumulative values for any log parameter rather than threshold or default values. |
Page Code |
The Page Code field identifies which log page is being requested by the initiator. See Table 2. |
Parameter Pointer |
This field specifies which log parameter to begin with for the requested log page. A PPC bit of 0 and a Parameter Pointer field of 0 will cause all available log parameters for the requested page code to be returned, subject to the Allocation Length. More detailed definition of this field is contained within the specific log page descriptions. |
Allocation Length |
The Allocation Length field is used to determine the maximum amount of data to return. The transfer completes after either all the data has been transferred or an amount equal to the Allocation Length has been sent. Specify FFFFh to include all available data. |
Page Code | Page Name | Page Description |
---|---|---|
00h |
Supported Log Pages |
Returns list of supported log pages |
2Eh |
Tape Alert Log |
Returns the 64 library-defined tape alert flags |

The response to a LOG SENSE command returns the log page specified in the Page Code field of the CDB. The log page format is described in “Log Page Format.” The valid Page Code fields are listed in Table 2. The various log parameters are described within their respective pages, along with their Parameter Codes. The Log Parameter format is described in “Log Parameter Format.”
Log Page Format
The following table shows the Log Page format. The first four bytes are the Parameter List Header, followed by the list of log parameters.
Table 3: Log Page format
Bit Byte |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
0 |
Reserved |
Page Code |
||||||
1 |
Reserved |
|||||||
2 |
Page Length (n-3) |
|||||||
3 |
||||||||
4 : x+3 |
Log Parameter (First) (Length x) |
|||||||
: |
||||||||
n-y+1 : n |
Log Parameter (Last) (Length y) |
|||||||
Field | Description |
---|---|
Page Code |
This field identifies which log page is being transferred. |
Page Length |
This field indicates the total number of bytes available to return for this page, beginning with the first log parameter. The value set for this field depends on the value specified for the Page Code. |
Log Parameters |
These are dependent upon the log page. The various parameters as well as their format for the supported pages are listed below. |
Table 4: Log Parameter Format
Bit Byte |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
0 |
Parameter Code |
|||||||
1 |
||||||||
2 |
DU |
DS |
TSD |
ETC |
TMC |
LBIN |
LP |
|
3 |
Parameter Length (n-3) |
|||||||
4 : n |
Parameter Value |
|||||||
Field | Description |
---|---|
Parameter Code |
This field identifies which log parameter was transferred. The valid values for this field depend on the log page. |
Disable Update (DU) |
Will be set to 0. The library will always update values reflected by the log parameters. |
Disable Save (DS) |
Will be set to 1. The library does not support saving of log parameters. |
Target Save Disable (TSD) |
Will be set to 0. The library provides a self-defined method for saving log parameters. |
Enable Threshold Comparison (ETC) |
Will be set to 0. No comparison to threshold values is made. |
Threshold Met Criteria (TMC) |
Will be set to 0. Comparison to threshold values is not supported. |
List Parameter Binary (LBIN) |
This field is only valid if LP is set to 1. When LBIN is set to 0, the list parameter is ASCII. When LBIN is set to 1, the list parameter is a binary value. |
List Parameter (LP) |
This field will be set to 0 for data counters and set to 1 for list parameters. |
Parameter Length |
This field indicates the number of bytes that follow this field, which is the size of the parameter value. |
Parameter Value |
This field contains the actual parameter data, which can be either a data counter or a list parameter (ASCII string or binary value). |

This page returns a list of all log pages supported by the library.
Table 5: Supported Log Page (00h)
Bit Byte |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
0 |
Reserved |
Page Code (000000b) |
||||||
1 |
Reserved |
|||||||
2 |
Page Length (0002h) |
|||||||
3 |
||||||||
4 |
Supported Log Page (00h) |
|||||||
5 |
Tape Alert Log Page (2Eh) |
Field | Description |
---|---|
Page Code |
The returned value is 00h, indicating this page. |
Page Length |
The returned value is 0002h. |
The page codes for all the supported pages (including this one) follow the page length field.

The Tape Alert log page follows the standard log page format. Each Tape Alert is returned as an individual log parameter, with its state reflected in bit zero of the one-byte Parameter Value field of the log parameter. When this bit is set to one, the alert is active.
When requesting the Tape Alert log page, the Parameter Pointer determines from what point in the Tape Alert table the alerts are returned. The value zero specifies that all tape alerts should be returned. If the Parameter Pointer is set from 1 to 64, all tape alerts from that point to the end of the list are returned. The various log parameters are listed in the following table.
Table 6: Tape Alert Log Page Parameters
Log Parameter |
Parameter Code |
DU |
DS |
TSD |
ETC |
TMC |
LBIN |
LP |
Parameter Length |
Tape Alert Flag 1 |
0001h |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
1 |
Tape Alert Flag 2 |
0002h |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
1 |
: |
|
0 |
1 |
0 |
0 |
0 |
0 |
0 |
1 |
Tape Alert Flag 63 |
003Fh |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
1 |
Tape Alert Flag 64 |
0040h |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
1 |
The severity of the flags has the following meaning:
- Critical (C)
- Warning (W)
- Informational (I)
The supported Tape Alert flag parameter values are described in the table below. A tape alert is active if the parameter value byte reports a 1, inactive if the parameter reports a 0.
Table 7: Tape Alert Flag Descriptions
Tape Alert Flag | Description |
---|---|
Flag 1: Drive Communication Failure (C) |
This flag is set to indicate a drive communication failure. |
Flag 2: Library Hardware B (W) |
This flag is set for any unrecoverable mechanical error. |
Flag 4: Library Hardware D (C) |
This flag is set when the internal Power-On-Self-Tests (POST) fail or when a mechanical error occurs that requires a power cycle to recover, and is not internally cleared until the device is powered off. |
Flag 13: Library Pick Retry (W) |
This flag is set when a high retry count threshold is passed when performing an operation to pick a cartridge from a slot before the operation succeeds. It is internally cleared when another pick operation is attempted. |
Flag 14: Library Place Retry (W) |
This flag is set when a high retry count threshold is passed when performing an operation to place a cartridge back into a slot before the operation succeeds. It is internally cleared when another place operation is attempted. |
Flag 15: Library Load Retry (W) |
This flag is set when a high retry count threshold is passed when performing an operation to load a cartridge into a drive before the operation succeeds. It is internally cleared when another load operation is attempted. Note that if the load actually fails due to a media or drive problem, the appropriate TapeAlert flags should be set by the drive. |
Flag 16: Library Door (C) |
This flag is set when media move operations cannot be performed because a door is open, and is internally cleared when the door is closed. |
Flag 17: Mailbox Mechanical Problem (C) |
This flag is set when a mailbox station mechanical problem is detected. |
Flag 23: Library Scan Retry (W) |
This flag is set when a high retry count threshold is passed when performing an operation to scan the barcode on a cartridge before the operation succeeds. It is internally cleared when another barcode scanning operation is attempted. |
Flag 27: Cooling Fan Failure (W) |
This flag is set when a cooling fan has failed within a library component. This flag is only supported by the Scalar i40 and Scalar i80 libraries. |
Flag 28: Power Supply Failure (W) |
This flag is set when a redundant power supply has failed within the library. This flag is only supported by the Scalar i40 and Scalar i80 libraries.) |
Flag 32: Barcode Label Unreadable (I) |
This flag is set when a tape cartridge barcode label could not be read. |