Operating System - HP-UX
1825561 Members
3240 Online
109681 Solutions
New Discussion

In dire need of script to run diskinfo

 
SOLVED
Go to solution
Keith C. Patterson
Frequent Advisor

In dire need of script to run diskinfo

I really hate to ask this because I can figure it out given a little time but if someone has a script that has already been created I'd very much appreciate it.

All I need is a script that runs an ioscan and does a diskinfo on all the /dev/rdsk entries that correspond to the Description field "HITACHI DISK SUBSYSTEM".
What I need it to do is find all devices that have 0 byte size and tell me which /dev/rdsk devices these are at the end of the script.
Thanks so much in advance.
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: In dire need of script to run diskinfo

There are several scripts you can adapt in these threads.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf0fc5dc05a7ad711abdc0090277a778c,00.html

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x836cc1c4ceddd61190050090279cd0f9,00.html

Good Luck,

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor
Solution

Re: In dire need of script to run diskinfo

Hi Keith:

See if this satistfies your need:

# ioscan -nFC disk|awk -F: '$16~/CLAIMED/ && $18~/HITACHI/ {getline;split($0,a," ");system("diskinfo "a[2])}'

Regards!

...JRF...