Ping Command

Top  Previous  Next

You may add the -ping command to modify reporting behavior when devices are polled.  This option is added to polling operations to report if a device has been removed or no longer reporting.  You would generally use this function if you have an environment where you might not necessarily care about the health of a device, but you do want to know if the device has been removed.

 

This was added as an enhancement for some national security-related organization that needed 24x7 monitoring to make sure that no peripherals were removed. The default operation of the software is to just ignore a device if it is no longer reporting.

 

This is what will be logged with a 10-second polling and a ping.  The disk at /dev/sdf is an external ATA disk drive attached via a USB port. The command that was issued was:

 

./smartmon-ux -ping -L /dev/sdf -F 10 /dev/sdf

 

Wed Mar 23 19:45:45 2005: ./smartmon-ux started

Wed Mar 23 19:45:45 2005: Discovered WDC WD25 00JB-75FUA0 S/N " " on /dev/sdf (SMART unsupported)(238418 MB)

Wed Mar 23 19:46:05 2005: /dev/sdf polled at Wed Mar 23 07:46:05 2005 Status:Online [WDC WD25 00JB-75FUA0]

Wed Mar 23 19:46:15 2005: /dev/sdf polled at Wed Mar 23 07:46:15 2005 Status:Offline [S/N= ]

Wed Mar 23 19:46:45 2005: /dev/sdf polled at Wed Mar 23 07:46:45 2005 Status:Online [S/N= ]

Wed Mar 23 19:46:55 2005: /dev/sdf polled at Wed Mar 23 07:46:55 2005 Status:Online [WDC WD25 00JB-75FUA0]

Wed Mar 23 19:47:05 2005: /dev/sdf polled at Wed Mar 23 07:47:05 2005 Status:Online [WDC WD25 00JB-75FUA0]

Wed Mar 23 19:47:15 2005: /dev/sdf polled at Wed Mar 23 07:47:15 2005 Status:Online [WDC WD25 00JB-75FUA0]

 

While the device was unplugged, the status was reported as Offline, and when it was plugged in again, it reported online. The reason why the clock reported more than 10 seconds was to allow the operating system and device drivers a longer timeout window to make sure the device was not responding vs. busy.

 

Note also that the make and model strings in the WD disk drive are not 100% correct, and no serial number is reported. This is because the USB dongle card that is built into the external USB enclosure has some minor bugs with their emulation.  Below is sample output for what would be reported if you unplugged a Seagate SCSI disk drive.  This also shows the difference in output if you do not use the -ping command.

 

Here is an example where we polled 2 Seagate disk drives with the command. (No -ping was used).

./smartmon-ux -L - F 10 /dev/sd[b-c]

Fri Mar 25 23:18:38 2005: Discovered SEAGATE ST336706LC S/N "3FD010LG" on /dev/sdb (SMART enabled)(35003 MB)

Fri Mar 25 23:18:38 2005: Discovered SEAGATE ST373307LC S/N "3HZ0381E" on /dev/sdc (SMART enabled)(70007 MB)

Fri Mar 25 23:18:38 2005: /dev/sdb polled at Fri Mar 25 23:18:38 2005 Status:Passed

Fri Mar 25 23:18:38 2005: /dev/sdc polled at Fri Mar 25 23:18:38 2005 Status:Passed

Fri Mar 25 23:18:48 2005: /dev/sdb polled at Fri Mar 25 23:18:48 2005 Status:Passed

Fri Mar 25 23:18:48 2005: /dev/sdc polled at Fri Mar 25 23:18:48 2005 Status:Passed

Fri Mar 25 23:18:58 2005: /dev/sdb polled at Fri Mar 25 23:18:58 2005 Status:Passed

Fri Mar 25 23:18:58 2005: /dev/sdc polled at Fri Mar 25 23:18:58 2005 Status:Passed

Fri Mar 25 23:19:08 2005: /dev/sdb polled at Fri Mar 25 23:19:08 2005 Status:Passed

(We unplugged the disk at /dev/sdc).

Fri Mar 25 23:19:09 2005: /dev/sdc polled at Fri Mar 25 23:19:08 2005 - Device offline (skipping)

Fri Mar 25 23:19:19 2005: /dev/sdb polled at Fri Mar 25 23:19:19 2005 Status:Passed

Fri Mar 25 23:19:19 2005: /dev/sdc polled at Fri Mar 25 23:19:19 2005 - Device offline (skipping)

Fri Mar 25 23:19:29 2005: /dev/sdb polled at Fri Mar 25 23:19:29 2005 Status:Passed

Fri Mar 25 23:19:30 2005: /dev/sdc polled at Fri Mar 25 23:19:29 2005 - Device offline (skipping)

Fri Mar 25 23:19:40 2005: /dev/sdb polled at Fri Mar 25 23:19:40 2005 Status:Passed

 

Below is with the -ping.  (Note serial number is reported).

./smartmon-ux -L - F 10 -ping /dev/sd[b-c]

Fri Mar 25 23:24:51 2005: Discovered SEAGATE ST336706LC S/N "3FD010LG" on /dev/sdb (Enabling SMART)(35003 MB)

Fri Mar 25 23:24:51 2005: Discovered SEAGATE ST373307LC S/N "3HZ0381E" on /dev/sdc (Enabling SMART)(70007 MB)

Fri Mar 25 23:24:51 2005: /dev/sdb polled at Fri Mar 25 23:24:51 2005 Status:Online [S/N=3FD010LG]

Fri Mar 25 23:24:51 2005: /dev/sdc polled at Fri Mar 25 23:24:51 2005 Status:Online [S/N=3HZ0381E]

Fri Mar 25 23:25:01 2005: /dev/sdb polled at Fri Mar 25 23:25:01 2005 Status:Online [S/N=3FD010LG]

Fri Mar 25 23:25:01 2005: /dev/sdc polled at Fri Mar 25 23:25:01 2005 Status:Online [S/N=3HZ0381E]

Fri Mar 25 23:25:11 2005: /dev/sdb polled at Fri Mar 25 23:25:11 2005 Status:Online [S/N=3FD010LG]

 

(The disk was pulled).

 

Fri Mar 25 23:25:12 2005: /dev/sdc polled at Fri Mar 25 23:25:11 2005 Status:Offline [S/N=3HZ0381E]

Fri Mar 25 23:25:22 2005: /dev/sdb polled at Fri Mar 25 23:25:22 2005 Status:Online [S/N=3FD010LG]

 

Use this command to monitor your hardware to make sure nobody removes peripherals.