Linux Utilities

QLogic Corporation.
All rights reserved.

Table of Contents

1.
Package Contents
2.
Dynamic TGT-LUN Discovery Utility
2.1 Package Contents
2.2 Requirements
2.3 OS Support
2.4 Supported Features
2.5 Using the Dynamic TGT-LUN Discovery Utility
2.6 Additional Notes
2.7 Known Issues and Workarounds
3.
HBA Collect Utility
  3.1 Package Contents
  3.2 Requirements
  3.3 OS Support
  3.4 Supported Features
  3.5 Using the HBA Collect Utility
  3.6 Additional Notes
  3.7 Known Issues and Workarounds
4.
FC HBA Snapshot Utility
  4.1 Package Contents
  4.2 Requirements
  4.3 OS Support
  4.4 Supported Features
  4.5 Using the FC HBA Snapshot Utility
  4.6 Additional Notes
  4.7 Known Issues and Workarounds
5.
FC HBA Change LUN State Utility
  5.1 Package Contents
  5.2 Requirements
  5.3 OS Support
  5.4 Supported Features
  5.5 Using the FC HBA Change LUN State Utility
  5.6 Additional Notes
  5.7 Known Issues and Workarounds
6.
Set Device Command Timeout Utility
  6.1 Package Contents
  6.2 Requirements
  6.3 OS Support
  6.4 Supported Features
  6.5 Using the Set Device Command Timeout Utility
  6.6 Additional Notes
  6.7 Known Issues and Workarounds
7.
Contacting Support

1. Package Contents

The QLogic Linux tools package (Linux-Tools-20090429-1.tgz) is a compressed file that contains the utility packages described in the following table.

File Name Description
ql-dynamic-tgt-lun-disc-2.16.tgz Scans for newly added LUNs (see Dynamic TGT-LUN Discovery Utility).
ql-hba-collect-1.9.tgz Allows you to gather troubleshooting information on a variety of Linux hosts (see HBA Collect Utility for Linux).
ql-hba-snapshot-1.13.tgz Works on sysfs to display details about the QLogic Fibre Channel Adapter attached to the system (see FC HBA Snapshot Utility).
ql-lun-state-online-1.5.tgz Allows you to change the state of LUNs connected to a QLogic Fibre Channel Adapter from offline to online/running (see FC HBA Change LUN State Utility).
ql-set-cmd-timeout-1.7.tgz Allows you to set the timeout on the devices connected to the QLogic FC Fibre Channel Adapter (see Set Device Command Timeout Utility).

2. Dynamic TGT-LUN Discovery Utility

This section provides the following user information regarding the Dynamic TGT-LUN Discovery Utility:

2.1 Package Contents

The Dynamic TGT-LUN Discovery Utility package contains the following: :

File Name Description
COPYING GNU General Public License that describes user rights to copy, distribute, and use the open source content in this Linux tool.
ql-dynamic-tgt-lun-disc.sh Script file used to scan the QLogic adapters for all the logical unit numbers (LUNs).
README.ql-dynamic-tgt-lun-disc.txt This readme file.
revision.qldynamic.txt Text file that identifies the changes made between versions of this package.
sg3_utils-1.23.tgz Package containing utilities that send SCSI commands to the scsi_devices.

2.2 Requirements

The Dynamic TGT-LUN Discovery Utility (ql-dynamic-tgt-lun-disc.sh) requires one of the Linux platforms listed in section 3, OS Support.

2.3 OS Support

The Dynamic TGT-LUN Discovery Utility for Linux runs on the following OS platforms:

NOTE: For specific OS service packs (SP) and updates, refer to the descriptions where this software version is posted on the QLogic Web site:
http://support.qlogic.com/support/drivers_software.aspx

Operating Systems
OS Name
OS Type
Hardware Platform
Red Hat RHEL AS 3.0
32-bit, 64-bit
Intel x86, Intel EM64T, AMD64
Red Hat RHEL AS 4.0
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Red Hat RHEL AS 5.0
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Novell SLES 8.0
32-bit, 64-bit
x86, AMD64
Novell SLES 9
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Novell SLES 10
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64

2.4 Supported Features

The Dynamic TGT-LUN Discovery Utility provides the following features:

  • Re-scans all the QLogic adapters for new LUNs.
  • Re-scans and removes lost LUNs from the system.
  • By default, scans up to 256 LUNs and allows you to set the maximum number of LUNs to scan.
  • By default, scans all QLogic adapters and allows you to select a specific adapter to scan.
  • Displays information for each adapter.
  • Provides an option for proc-based scanning, as an alternative to the default sysfs-based scanning.
  • Provides an option for extended scanning to rescan the devices
    whose disk size has changed.

 

  • Supports QLogic FC Driver Versions 7.xx.xx and 8.xx.xx.
  • Also supports QLogic ISCSI Driver Versions 3.xx.xx.xx and 5.xx.xx.xx

2.5 Using the Dynamic TGT-LUN Discovery Utility

This utility scans for newly-added LUNs. After adding new LUNs, you do not need to unload and then reload the QLogic FC driver, or reboot the system. To see the newly-added LUNs, run the
ql-dynamic-tgt-lun-disc.sh utility.

The following sections describe how to use this utility:

2.5.1 Starting the Utility

To start this utility, run the following command:

# ./ql-dynamic-tgt-lun-disc.sh [ -is | --iscsi ]

By default, the utility re-scans the QLogic FC adapters for new LUNs.

2.5.2 Command Line Options

-al, --allow-lip

Allows the utility to issue the loop initialization processor (LIP) whenever required. By default, the LIP is not issued, even if it is required for scanning LUNs. If the utility does not discover the necessity of LIP, this option is ignored.

-cl, --current-luns

Displays current LUNs on the system.

-e, --extended-scan

Rescans the LUNs to identify any change in attributes of existing LUNs. This option can also be used in combination of scan/refresh or maximum LUNs.

-h, --help, ?

Prints the help text.

-i, --interactive

Invokes the menu-driven mode of the utility.

-is, --iscsi

Operates on ISCSI adapters. This option can be used in combination with any other supported option.

-m, --max-lun

Sets the maximum LUNs to be scanned.

-p, --proc

Uses the proc file system to perform LUN scanning on the 2.6 kernel. On a 2.4 kernel, the LUN scanning is based on proc file system only.

-s, --scan [-r|--refresh]

Re-scans all the devices connected to the QLogic adapter. To remove LUNs that are lost, use the -r|--refresh option.

CAUTION: Take care when using the refresh option because it removes the existing LUNs before performing a re-scan.

The following examples each list two or three command options that you can use to perform specific operations. Enter only one command.

To re-scan all the adapters:

# ./ql-dynamic-tgt-lun-disc.sh

# ./ql-dynamic-tgt-lun-disc.sh -s

# ./ql-dynamic-tgt-lun-disc.sh --scan

To re-scan and remove any lost LUNs:

# ./ql-dynamic-tgt-lun-disc.sh -s -r

# ./ql-dynamic-tgt-lun-disc.sh --scan --refresh

To run a proc-based scan of all the adapters:

# ./ql-dynamic-tgt-lun-disc.sh -s -p

# ./ql-dynamic-tgt-lun-disc.sh --scan --proc

To set the maximum LUNs to be scanned:

# ./ql-dynamic-tgt-lun-disc.sh -m 124

# ./ql-dynamic-tgt-lun-disc.sh -s -m 124

To identify any changes in attributes:

# ./ql-dynamic-tgt-lun-disc.sh -e

# ./ql-dynamic-tgt-lun-disc.sh --extended-scan

To use the --extended-scan option in combination with scan/refresh and max LUNs:

# ./ql-dynamic-tgt-lun-disc.sh -e -s

# ./ql-dynamic-tgt-lun-disc.sh -e -r

# ./ql-dynamic-tgt-lun-disc.sh -e -s -m 120

To invoke the menu-driven utility:

# ./ql-dynamic-tgt-lun-disc.sh -i

# ./ql-dynamic-tgt-lun-disc.sh --interactive

To view the current LUNs on the system:

# ./ql-dynamic-tgt-lun-disc.sh -cl

# ./ql-dynamic-tgt-lun-disc.sh --current-luns

2.5.3 Menu Options

The utility provides a menu-driven interface that provides finer control of the operation.

To invoke the menu, use the -i or --interactive option with the ql-dynamic-tgt-lun-disc utility. For example:

# ./ql-dynamic-tgt-lun-disc.sh -i

The following sections describe the utility menus.

2.5.3.1 Main Menu

MAIN MENU

1: ALL HOSTS SCAN
2: ALL HOST SCAN & REFRESH
3: ALL HOSTS EXTENDED SCAN
4: SELECT HOST TO SCAN
5: SET MAX LUNs TO SCAN (Current: 256)
6: DISPLAY CURRENT LUNS
7: QUIT

1: ALL HOSTS SCAN

Scans all the QLogic adapters connected in the system. A message indicates the new LUN found.

2: ALL HOST SCAN & REFRESH

Scans all the QLogic adapters connected in the system and removes LUNs that no longer exist.

For example, if LUN 1 is seen on Host:2, Bus:0, and Device:0, a corresponding entry exists in /proc/scsi/scsi. For example:

Host: scsi2 Channel: 00 Id: 00 Lun: 01

If the LUN is removed, the system still shows the LUN present in /proc/scsi/scsi. To remove any lost LUNS, use this option to re-scan the adapter.

3: ALL HOSTS EXTENDED SCAN

Scans all the devices connected to QLogic adapters in the system. This rescans the devices whose disk size has changed.

4: SELECT HOST TO SCAN

Invokes the menu to select a specific QLogic adapter to be scanned. (See section 2.5.3.2.)

5: SET MAX LUNs TO SCAN (Current: 256)

Changes the maximum number of LUNs to be scanned. By default, the utility scans a maximum of 256 LUNs.

6: DISPLAY CURRENT LUNS

Shows the current LUNs attached to all QLogic hosts in the system.

7: QUIT

Exits the ql-dynamic-tgt-lun-disc utility.

2.5.3.2 Select Host to Scan

SELECT HOST TO SCAN

1. HOST: scsi2
2. HOST: scsi3
3. SET SCAN TYPE (Current : SCAN ONLY)
4. GO BACK TO PREVIOUS SCREEN
5. QUIT

1. HOST: scsi<n>

Specifies the adapter to be scanned. Select this option to start re-scanning the adapter that corresponds to this host number.

2. SET SCAN TYPE

Specifies whether re-scanning removes LUNs that no longer exist as a default. By default, the utility re-scans without removing LUNs from the system. Extended scan allows you to scan hosts whose disk size has changed. This option allows you change to HOST SCAN, REFRESH &
EXTENDED SCAN
.

3. GO BACK TO PREVIOUS SCREEN

Returns to the main menu.

4. QUIT

Exits the ql-dynamic-tgt-lun-disc utility.

2.6 Additional Notes

CAUTION: Take care when using the refresh (-r|--refresh) option because it removes the existing LUNs before it re-scans.

2.7 Known Issues and Workarounds

None.

3. HBA Collect Utility for Linux

This section provides the following user information regarding the HBA Collect Utility:

3.1 Package Contents

The HBA Collect Utility package contains the following:

File Name Description
COPYING GNU General Public License that describes user rights to copy, distribute, and use the open source content in this Linux tool.
ql-hba-collect.sh Script file used to gather diagnostic information for troubleshooting on a variety of Linux hosts.
README.ql-hba-collect.txt This readme file.
revision-qlhbacollect.txt Text file that identifies the changes made between versions of this package.

3.2 Requirements

The HBA Collect Utility (ql-hba-collect) requires one of the Linux platforms identified in OS Support.

3.3 OS Support

The HBA Collect Utility runs on the following OS platforms:

Operating Systems
OS Name
OS Type
Hardware Platform
Red Hat RHEL AS 3.0
32-bit, 64-bit
Intel x86, Intel EM64T, AMD64
Red Hat RHEL AS 4.0
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Red Hat RHEL AS 5.0
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Novell SLES 8.0
32-bit, 64-bit
x86, AMD64
Novell SLES 9
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Novell SLES 10
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64

NOTE: For specific OS service packs (SPs) and updates, refer to the descriptions where this software version is posted on the QLogic Web site:
http://support.qlogic.com/support/drivers_software.aspx

3.4 Supported Features

The ql-hba-collect utility collates information from the following sources:

  • Driver-related information:
    • Debug messages in /var/log/messages
    • Information in /proc/scsi/scsi
    • Information in /etc/qla2[xxx/300].conf
    • All relevant information from the driver perspective
  • OS distribution information:
    • Red Hat RHEL
    • Novell SLES
    • Kernel version
  • System configuration information:
    • List of PCI devices
    • Device information
    • CPU and memory information
    • Partitions
    • Kernel and command line parameter
    • Interrupt information
  • Reporting features:
    • Kernel defaults
    • RPM installed
    • Modules loaded
    • Process running
    • List of open files

3.5 Using the HBA Collect Utility

This script gathers information that is helpful in troubleshooting on a variety of Linux hosts. It collects the information pertaining to system configuration and prepares a compressed archive of the collected information.

The gathered information, in the form of an archive, is helpful to the QLogic Support Team in diagnosing a reported issue of a remote system.

To run this script, enter the following command:

# ./ql-hba-collect.sh

By default, the utility gathers system-specific information regarding the attached QLogic adapter and creates a compressed information archive.

3.6 Additional Notes

None

3.7 Known Issues and Workarounds

None

4. FC HBA Snapshot Utility

This section provides the following user information regarding the FC HBA Snapshot Utility:

4.1 Package Contents

The FC HBA Snapshot Utility package contains the following:

File Name Description
COPYING GNU General Public License that describes user rights to copy, distribute, and use the open source content in this Linux tool.
ql-hba-snapshot.sh Script file used to display the details of the QLogic adapter attached to the system.
README.ql-hba-snapshot.txt This readme file.
revision.qlhbasnapshot.txt Text file that identifies the changes made between versions of this package.

4.2 Requirements

The FC HBA Snapshot Utility requires one of the Linux platforms listed in section 3, OS Support.

4.3 OS Support

The FC HBA Snapshot Utility runs on the following OS platforms:

Operating Systems
OS Name
OS Type
Hardware Platform
Red Hat RHEL AS 4.0
32-bit, 64-bit
IA64, Intel EM64T, AMD64
Red Hat RHEL AS 5.0
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Novell SLES 9
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Novell SLES 10
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64

NOTE: For specific OS service packs (SP) and updates, refer to the descriptions where this software version is posted on the QLogic Web site:
http://support.qlogic.com/support/drivers_software.aspx

4.4 Supported Features

The FC HBA Snapshot Utility provides the following features:

  • Displays specific information of the adapter, such as world wide port number (WWPN), port ID, and connected targets.

  • Lists QLogic adapters in the system.

  • Provides detailed adapter information, including logical unit numbers (LUNs).

  • Provides parameters or options that can be passed to the QLogic driver.

  • Displays statistics for the QLogic host. This option is not available for the standard driver.
  • Supports Fibre Channel driver version 8.xx.xx.

4.5 Using the FC HBA Snapshot Utility

This utility displays the details of the QLogic adapter attached to the system. It uses one of the two file systems for scanning: proc or sysfs.

  • Displayed details include the following:
  • QLogic adapter general information
  • Targets connected to the QLogic host
  • Details about targets and LUNs
  • Statistics and parameters
  • Host list

By default, the utility displays specific information for the QLogic adapter, as described in the following sections:

4.5.1 Command Line Options

FC HBA Snapshot Utility command line options include the following:

<Host number> | <-a/--all> [optional]

Provides the <HOST NUMBER> of the adapter to display its detailed information. If you do not specify host number, this command shows general information for all hosts. For example:

# ./ql-hba-snapshot.sh <Host Number>

-h, --help

Displays the help text. For example:

# ./ql-hba-snapshot.sh --help

-hl, --hostlist

Displays the list of QLogic hosts (adapters) connected to this system. To obtain the <HOST NUMBER>, enter the following command:

# ./ql-hba-snapshot.sh --hostlist

-p, --parameters

Displays the command line parameters that can be passed to the QLogic adapter driver. For example:

# ./ql-hba-snapshot.sh --parameters <Host Number>

# ./ql-hba-snapshot.sh --procfs --parameters (for procfs)

-s, --statistics

Displays statistical information for the specified host. The statistics option is only supported in a sysfs-based scan. For example:

# ./ql-hba-snapshot.sh --statistics <Host number/--all>

-proc, --procfs

Forces the utility to scan procfs-base information, instead of the default sysfs. For example:

# ./ql-hba-snapshot.sh --procfs [other valid option]

-v, --verbose

Enables verbose display. Using this option shows detailed LUN information, in addition to standard information. For example:

# ./ql-hba-snapshot.sh --verbose <Host number/-a>

4.5.2 Usage Examples

The following examples show how to apply the command line options in PROC-based and SYSFS-based file systems.

4.5.2.1 SYSFS-based File Systems

To display default adapter information, enter the following command:

# ./ql-hba-snapshot.sh

To display detailed information of host 7, enter the following command:

# ./ql-hba-snapshot.sh 7

To display detailed information of all hosts, enter the following command:

# ./ql-hba-snapshot.sh --all

To display QLogic adapters driver parameters, enter one of the following commands:

# ./ql-hba-snapshot.sh -p

# ./ql-hba-snapshot.sh --parameters

To display the QLogic adapter, enter one of the following commands:

# ./ql-hba-snapshot.sh -hl

# ./ql-hba-snapshot.sh --hostlist

To view help, enter one of the following commands:

# ./ql-hba-snapshot.sh -h

# ./ql-hba-snapshot.sh --help

4.5.2.2 PROC-based File Systems

To display default adapter information, enter one of the following commands:

# ./ql-hba-snapshot.sh -proc

# ./ql-hba-snapshot.sh --procfs

To display detailed information of host 7, enter one of the following commands:

# ./ql-hba-snapshot.sh -proc 7

# ./ql-hba-snapshot.sh --procfs 7

To display detailed information of all hosts, enter one of the following commands:

# ./ql-hba-snapshot.sh -proc -a

# ./ql-hba-snapshot.sh --procfs --all

NOTE: The preceding two options both support the -v/--verbose parameter. For example:

# ./ql-hba-snapshot.sh -proc -v 7

# ./ql-hba-snapshot.sh --procfs --verbose --all

To display QLogic adapter driver command line parameters, enter one of the following commands:

# ./ql-hba-snapshot.sh -proc -p

# ./ql-hba-snapshot.sh --procfs --parameters

To display statistics of host 8, enter one of the following commands:

# ./ql-hba-snapshot.sh -proc -s 8

# ./ql-hba-snapshot.sh --procfs --statistics 8

To display QLogic adapters, enter one of the following commands:

# ./ql-hba-snapshot.sh -proc -hl

# ./ql-hba-snapshot.sh --procfs --hostlist

To view help, enter one of the following commands:

# ./ql-hba-snapshot.sh -h

# ./ql-hba-snapshot.sh --help

4.6 Additional Notes

None

4.7 Known Issues and Workarounds

None

5. FC HBA Change LUN State Utility

This section provides the following user information regarding the FC HBA Change LUN State Utility:

5.1 Package Contents

The FC HBA Change LUN State Utility package contains the following:

File Name Description
COPYING GNU General Public License that describes user rights to copy, distribute, and use the open source content in this Linux tool.
ql-lun-state-online.sh Script file used to change the state of LUNs connected to QLogic adapters from offline to online/running.
README.ql-lun-state-online.txt This readme file.
revision.qllunstateonline.txt Text file that identifies the changes made between versions of this package.

5.2 Requirements

The FC HBA Change LUN State Utility requires one of the Linux platforms identified in OS Support.

5.3 OS Support

The FC HBA Change LUN State Utility runs on the following OS platforms:

Operating Systems
OS Name
OS Type
Hardware Platform
Red Hat RHEL AS 4.0
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Red Hat RHEL AS 5.0
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Novell SLES 9
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Novell SLES 10
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64

NOTE: For specific OS service packs (SP) and updates, refer to the descriptions where this software version is posted on the QLogic Web site:
http://support.qlogic.com/support/drivers_software.aspx

5.4 Supported Features

The FC HBA Change LUN State Utility (ql-lun-state-online.sh):

  • Allows you to select a specific host for enabling logical unit numbers (LUNs).
  • Provides an interactive menu, which lets you select a specific LUN.
  • Enables all offline LUNs with single command.
  • Lets you select specific targets for every host using a menu.
  • Supports Fibre Channel driver version 8.xx.xx.

5.5 Using the FC HBA Change LUN State Utility

This utility allows you to change the state of LUNs connected to a QLogic adapter from offline to online/running. The SCSI mid-layer may change a device’s state to offline when it does not receive a response from the device. When these devices are offline, the SCSI mid-layer ignores them.

For example, if a SCSI command times out on a specific device and fails to recover the device, the SCSI mid-layer marks the device as offline. Later, when the device is online or accessible, you can use the ql-lun-state.sh utility to change the state to running or online.

5.5.1 Starting the Utility

To start this script, enter one of the following commands:

# ./ql-lun-state-online.sh <HOST NUMBER/S>
# ./ql-lun-state-online.sh --all

For example:

  • For /sys/class/scsi_device/2:0:1:4/ HOST number - > 2
  • For /sys/class/scsi_device/3:0:2:6/ HOST number - > 3

COMMAND:

# ./ql-lun-state-online.sh 2 3

This changes the state of all the offline LUNs to running.

5.5.2 Command Line Options

Usage:

# ./ql-lun-state-online.sh [OPTIONS]

Options:

HOST NUMBER/S

Scans for all offline LUNs on the specified HOSTS and enables them.

-a, --all

Enables all disabled LUNs.

-i, --interactive

Starts the menu-driven program.

-h, --help, ?

Displays help text.

Examples:

To enable all LUNs on HOST 2 and 4, enter the following command:

# ./ql-lun-state-online.sh 2 4

To enable all LUNs on all adapters, enter one of the following commands:

# ./ql-lun-state-online.sh -a

# ./ql-lun-state-online.sh --all

To invoke the menu, enter one of the following commands:

# ./ql-lun-state-online.sh -i

# ./ql-lun-state-online.sh --interactive

To view help, enter one of the following commands:

# ./ql-lun-state-online.sh -h

# ./ql-lun-state-online.sh --help

5.5.3 Menu Options

The utility provides a menu-driven interface that provides finer control of the operation.

To invoke the menu, use the -i or --interactive option with the ql-lun-state utility. For example:

# ./ql-lun-state-online.sh -i

The following describes the main menu.

MAIN MENU
1. HOST: 2 TGT: 0 LUN: 4
2. HOST: 3 TGT: 1 LUN: 4
3. MAKE ALL ONLINE
4. QUIT

Please select any one option:

1. HOST: 2 TGT: 0 LUN: 4 and 2. HOST: 3 TGT: 1 LUN: 4 are system-specific options. These only appear if the QLogic adapter has targets with LUN state “offline.” To enable the specified LUN, select the appropriate option.

MAIN MENU
1. HOST: 2 TGT: 0 LUN: 4
2. HOST: 3 TGT: 1 LUN: 4
3. MAKE ALL ONLINE
4. QUIT

Please select any one option: 2

Modifying to running HOST: 3 TGT: 1 LUN: 4

3. MAKE ALL ONLINE enables all offline LUNs.

MAIN MENU
1. HOST: 2 TGT: 0 LUN: 4
2. HOST: 3 TGT: 1 LUN: 4
3. MAKE ALL ONLINE
4. QUIT

Please select any one option: 3

Found LUN 4 on HOST 2 in offline state

Modifying to running

Found LUN 4 on HOST 3 in offline state

Modifying to running

4. QUIT exits the utility. As an alternative, you can quit the utility by typing q or x.

5.6 Additional Notes

None

5.7 Known Issues and Workarounds

None

6. Set Device Command Timeout Utility

This section provides the following user information regarding the Set Device Command Timeout Utility:

6.1 Package Contents

The Set Device Command Timeout Utility package contains the following:

File Name Description
COPYING GNU General Public License that describes user rights to copy, distribute, and use the open source content in this Linux tool.
ql-set-cmd-timeout.sh Script file used to set the timeout on the devices connected to the QLogic FC adapter.
README.ql-set-cmd-timeout.txt This readme file.
revision.qlsetcmdtimeout.txt Text file that identifies the changes made between versions of this package.

6.2 Requirements

The Set Device Command Timeout Utility (ql-set-cmd-timeout) requires one of the Linux platforms listed in OS Support.

6.3 OS Support

The ql-set-cmd-timeout utility runs on the following OS platforms:

Operating Systems
OS Name
OS Type
Hardware Platform
Red Hat RHEL AS 4.0
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Red Hat RHEL AS 5.0
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Novell SLES 9
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64
Novell SLES 10
32-bit, 64-bit
Intel IA64, Intel EM64T, AMD64

NOTE: For specific OS service packs (SP) and updates, refer to the descriptions where this software version is posted on the QLogic Web site:
http://support.qlogic.com/support/drivers_software.aspx

6.4 Supported Features

The ql-set-cmd-timeout utility:

  • Allows you to set the timeout on devices by specifying the host and target number using the command line.
  • Allows you to select a host to set timeout on targets connected to the host using a menu.
  • Sets a common value for all hosts at the same time.
  • Supports Fibre Channel driver version 8.xx.xx.

6.5 Using the Set Device Command Timeout Utility

This utility allows you to set the timeout on the devices connected to the QLogic FC adapter.

This timeout value applies to the commands sent to the device. This can help when target devices take longer to execute a command, for example under heavy I/O. Setting a longer timeout reduces the chance of the Linux SCSI mid-layer driver aborting the tasks after a timeout.

The following sections describe how to use this utility:

6.5.1 Starting the Utility

To start this utility, enter the following command:

# ./ql-set-cmd-timeout.sh HOST TARGET TIMEOUT

where:

HOST is the QLogic adapter number.
TARGET is the target connected to the adapter.
TIMEOUT is the new timeout value to be set on the devices under TARGET.

For example, for /sys/bus/pci/drivers/qla2300/0000:05:01.0/host2/target2:0:0/ HOST and TARGET will be:

HOST=2 (from ..host2..)

TARGET=0 (from target2:0:0 <--) specify new timeout as

# ./ql-set-cmd-timeout.sh 2 0 60

6.5.2 Command Line Options

[DEFAULT]

Displays the timeout on devices connected to the all HOSTs. These devices must be QLogic adapters.

[HOST]

Specifies the HOST value to see the timeout on devices connected to the HOST. These devices must be QLogic adapters.

[HOST] [TARGET]

Specifies the HOST and TARGET values to see the timeout on devices connected to the TARGET. These devices must be QLogic adapters.

[HOST] [TARGET] [TIMEOUT]

Specifies the HOST, TARGET, and TIMEOUT values to set the timeout on devices connected to the TARGET. These devices must be QLogic adapters.

-h, --help, ?

Displays the help text.

-i, --interactive

Invokes the menu-driven program.

Examples:

To display the timeout of all devices connected to QLogic adapters, enter the following command:

# ./ql-set-cmd-timeout.sh

To display the timeout of all devices connected to HOST 2, enter the following command:

# ./ql-set-cmd-timeout.sh 2

To display the timeout of devices connected on HOST 2, TARGET 0, enter the following command:

# ./ql-set-cmd-timeout.sh 2 0

To set a timeout of 30 seconds on HOST 2, TARGET 0, enter the following command:

# ./ql-set-cmd-timeout.sh 2 0 30

To invoke the menu, enter one of the following commands:

# ./ql-set-cmd-timeout.sh -i

# ./ql-set-cmd-timeout.sh --interactive

To view help, enter one of the following commands:

# ./ql-set-cmd-timeout.sh -h

# ./ql-set-cmd-timeout.sh --help

6.5.2 Menu Options

The utility provides a menu-driven interface that provides finer control of the operation.

To invoke the menu, use the -i or --interactive option with the ql-set-cmd-timeout utility command:

# ./ql-set-cmd-timeout.sh -i

Invoking this command opens the main menu:

MAIN MENU
1. HOST2
2. HOST3
3. SELECT ALL HOSTS
4. SET COMMON TIMEOUT FOR ALL HOSTS
5. QUIT

Selecting a Specific Host

The HOST2/3 option appears if the system has a QLogic adapter installed with a QLogic driver loaded. The host number differs from system to system; as an example, the host numbers 2 and 3 are shown in the preceding.

Selecting a Target

Selecting the HOST by specifying the index number opens the next menu, where you can select a specific target.

Select Target for HOST2
1. Target 0
2. Target 1
3. Target 2
4. Target 3
5. GO TO PREVIOUS MENU
6. Quit

Please select one of the options above: 2

Modifying and Displaying Timeout for a Specific Target

Select the TARGET by specifying the index number to open the next menu, where you can select a specific action.

Select option:
1. MODIFY TIMEOUT
2. DISPLAY TIMEOUT
3. GO BACK TO PREVIOUS MENU
4. QUIT

Please select one of the options above: 1
Please enter new timeout for selected device: 60

Modifying the devices......

DEVICE OLD TIMEOUT NEW TIMEOUT
2:0:0:0 4 60
2:0:0:4 4 60
2:0:0:5 4 60
2:0:0:6 4 60
Hit any key to continue......

Select the DISPLAY TIMEOUT option to display the following:

Select option:
1. MODIFY TIMEOUT
2. DISPLAY TIMEOUT
3. GO BACK TO PREVIOUS MENU
4. QUIT

Please select one of the options above: 2

DEVICE TIMEOUT
2:0:0:0 60
2:0:0:4 60
2:0:0:5 60
2:0:0:6 60

Hit any key to continue......

Selecting All Hosts

Select SELECT ALL HOSTS option to select targets on all the HOSTS, and then enter a timeout for each one.

For example:

MAIN MENU
1. HOST2
2. HOST3
3. SELECT ALL HOSTS
4. SET COMMON TIMEOUT FOR ALL HOSTS
5. QUIT

Please select one of the options above: 3

Modifying and Displaying Timeout for All Hosts

Selecting the SELECT ALL HOSTS option by specifying the index number opens the next menu, where you can select a specific action.

Select option:
1. MODIFY TIMEOUT
2. DISPLAY TIMEOUT
3. GO BACK TO PREVIOUS MENU
4. QUIT

Please select one of the options above: 1

Enter new timeout for HOST 2 and TARGET 0: 40

Modifying the devices......

DEVICE OLD TIMEOUT NEW TIMEOUT
2:0:0:0 50 40
2:0:0:4 50 40

Enter new timeout for HOST 2 and TARGET 1: 5
Modifying the devices......

DEVICE OLD TIMEOUT NEW TIMEOUT
2:0:1:0 50 5
2:0:1:1 50 5

Select the DISPLAY TIMEOUT option to display the following:

Select option:
1. MODIFY TIMEOUT
2. DISPLAY TIMEOUT
3. GO BACK TO PREVIOUS MENU
4. QUIT

Please select one of the options above: 2

DEVICE OLD TIMEOUT NEW TIMEOUT
2:0:0:0 50 40
2:0:0:4 50 40

DEVICE OLD TIMEOUT NEW TIMEOUT
2:0:1:0 50 5
2:0:1:1 50 5
Hit any key to continue......

Setting a Common Timeout for All Hosts

Select the SET COMMON TIMEOUT FOR ALL HOSTS option to set the timeout on all the devices connected to all the targets on all QLogic adapters.

Quitting the Utility

Select the QUIT option to exit the ql-set-cmd-timeout utility.

6.6 Additional Notes

None

6.7 Known Issues and Workarounds

None

7. Contacting Support

Please feel free to contact your QLogic approved reseller or QLogic Technical Support at any phase of integration for assistance. QLogic Technical Support can be reached by the following methods:

Web: http://support.qlogic.com

E-mail: support@qlogic.com

Go to Top