Operating System - HP-UX
1830207 Members
1996 Online
109999 Solutions
New Discussion

using STM - test 'x' harddrive from console.

 
SOLVED
Go to solution
Steven  Bucek
Frequent Advisor

using STM - test 'x' harddrive from console.

I want to issue one command that will start STM and do a read / write test on a tape or harddrive.

Does anyone have simple scripts they use?

TIA!

--To go forward, you must backup
8 REPLIES 8
Torsten.
Acclaimed Contributor

Re: using STM - test 'x' harddrive from console.

Well, it depends. The recommended tool for testing a tape drive is ltt (http://www.hp.com/support/tapetools)

You can start the exercise or verify tool on disks, but you have to decide which one. Doing this on all drives will extremly decrease the performance.

You can pass your arguments to cstm, e.g.

echo "sel dev 1;info;wait;il"|cstm

to select the "system" device on a server and run the info tool.

But what is the reason for doing this by script? I can't see any.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Steven  Bucek
Frequent Advisor

Re: using STM - test 'x' harddrive from console.

Thanks for your response.

I am using L&TT for tape diagnotics, so im good there, heres the scoop on the hard drives.

I am required to test drives with stm and send the logs along with it. I issue the stm command w/o agruments, find the device, right click, choose read write / hit ok a few times, wait for the excerise to finish, print the log and go. Doing this over and over and over is getting really old. I figure there must be a way to do this from the CLI, without using the GUI. It would be nice to have a script called 'drvtst' that calls up stm, tells stm to do a read/write test on /dev/rdsk/whatever.. and save the log.

Can that be done?




--To go forward, you must backup
Torsten.
Acclaimed Contributor
Solution

Re: using STM - test 'x' harddrive from console.

You can script all stm activities.

You have to run mstm or cstm to see the index of your device (first column).

Let's assume its ID4.

To run the exerciser do this:

echo "sel dev 4; exc;wait;efl"|cstm

sel dev 4 = select device 4 from the systems map

exc = run exercise program

wait = wait for finishing the tool

efl = exercise failure log report

If you want more information, just run "cstm" and type "help"

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Steven  Bucek
Frequent Advisor

Re: using STM - test 'x' harddrive from console.

Last poster had the solution. Man pages of stm did not have much, should have looked at man paged of cstm and mstm.

Thank you everyone.

--To go forward, you must backup
Steven  Bucek
Frequent Advisor

Re: using STM - test 'x' harddrive from console.

My device id is 6, run i run the command it does the following:

-- Updating map --
Updating map..
-- Exercise Tools for device SCSI Disk on path 10/0/14/0.0.0. --

Insert a CD into the drive, then select "OK" to continue with the test.

Enter,Cancel, Help, or OK [Cancel] #.

#



My device ID is 6, the real hardware path is 10/0/15/1.6.0

the command im used was:

echo "sel dev 6; exc;wait;efl"|cstm

using wrong id?
--To go forward, you must backup
Bill Hassell
Honored Contributor

Re: using STM - test 'x' harddrive from console.

STM assigns a unique device number that has no connection to SCSI address or other hardware addresses. You'll have to get the hardware map first and then reference the actual cst-device number.


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: using STM - test 'x' harddrive from console.

Sorry, I forgot to show how to get a device map:

echo "map" | /usr/sbin/cstm

However, figuring out a specific disk from the device map is a pain. So you can specify the actual path. From a "map" listing:

8 8/4.10.0 SCSI Disk (SEAGATEST34572 Information Successful

The cstm-device is 8, but the path is 8/4.10.0 corresponding to SCSI address 10 on the I/O card at 8/4. So you can select the path like this to get the info:

echo "sel path 8/4.10.0;info;wait;infolog"|cstm


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: using STM - test 'x' harddrive from console.

One last bit of help (man pages aren't useful):

http://docs.hp.com/en/diag.html
and
http://docs.hp.com/en/diag/stm/stt_cmap.htm

For your example:

echo "sel path 10/0/15/1.6.0; exc;wait;efl"|cstm


Bill Hassell, sysadmin