References > Template Reference > Linux > Linux Disk Monitoring Perl

Linux Disk Monitoring Perl

This template assesses the disk performance of a Linux computer. This template uses Perl scripts for monitoring performance.

Works with the Orion Agent for Linux.

Prerequisites

SSH and Perl installed on the target server.

If Perl is installed in a location different from /usr/bin/perl, you should correct all components in the first line of the field ”script body” (#!/usr/bin/perl), or you can create a symbolic link to Perl (refer to the documentation for the ln command).

You can find where Perl is installed by using the following command: which perl

Operating Systems

The following operating system versions may cause issues with certain counters in this template:

  • Fedora 14

Credentials

The component monitors Timing cached reads and Timing buffered disk reads require root credentials on the target server. These component monitors require access to vmstat and df utilities.

All other component monitors can use any user account.

Monitored Components

For details on monitors, see SAM Component Monitor Types.

Components without predetermined threshold values have guidance such as "use the lowest threshold possible" or "use the highest threshold possible" to help you find a threshold appropriate for your application.

Timing cached reads (MB/sec)

Perform timings of cache reads for benchmark and comparison purposes. This displays the speed of reading directly from the Linux buffer cache without disk access. This measurement is essentially an indication of the throughput of the processor, cache, and memory of the system under test.

Use the highest threshold possible. You should monitor this counter for some time and then set thresholds appropriately for your environment.

Troubleshooting: There is a bug in the component script. It tests only the first hard drive (SATA or IDE). If you have a first SATA or a first IDE (but only one hard drive), the script works well. But if you have SATA first hard drive and IDE first hard drive (both hard drives), the result will be only for the SATA first hard drive.

If you need to monitor a second or third IDE hard drive, you should find and change the lines “/dev/hda” to “/dev/hdb” (for the second IDE) or to “/dev/hdc” (for the third IDE hard drive).

If you need to monitor a second or third SATA hard drive, you should find and change the lines “/dev/sda” to “/dev/sdb” (for second SATA) or to “/dev/sdc”(for third SATA hard drive).

This component requires root credentials on the target server.

Timing buffered disk reads (MB/sec)

Perform timings of device reads for benchmark and comparison purposes. This displays the speed of reading through the buffer cache to the disk without any prior caching of data. This measurement is an indication of how fast the drive can sustain sequential data reads under Linux, without any file system overhead.

Use the highest threshold possible. You should monitor this counter for some time and then set thresholds appropriately for your environment.

Troubleshooting: There is a bug in the component script. It tests only the first hard drive (SATA or IDE). If you have a first SATA or a first IDE (but only one hard drive), the script works well. But if you have SATA first hard drive and IDE first hard drive (both hard drives), the result will be only for the SATA first hard drive.

If you need to monitor a second or third IDE hard drive, you should find and change the lines “/dev/hda” to “/dev/hdb” (for the second IDE) or to “/dev/hdc” (for the third IDE hard drive).

If you need to monitor a second or third SATA hard drive, you should find and change the lines “/dev/sda” to “/dev/sdb” (for second SATA) or to “/dev/sdc”(for third SATA hard drive).

This component requires root credentials on the target server.

Blocks received from block device (blocks/sec)

This shows the number of blocks read from the disk in the previous interval. All Linux blocks are  currently 1024 bytes. Old kernels may report blocks as 512 bytes, 2048 bytes, or 4096 bytes.

Blocks sent to a block device (blocks/sec)

This indicates the total number of blocks written to disk in the previous interval. All Linux blocks are currently 1024 bytes. Old kernels may report blocks as 512 bytes, 2048 bytes, or 4096 bytes.

Available space on / partition (MB)

This shows the available space on the root (/) partition in MB.

You should set this threshold according to your Linux installation and your requirements. In the worst case, it should be more than 512 MB.