- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- device file information
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2002 02:12 PM
тАО06-26-2002 02:12 PM
Given hardware path I want to find out device file information using some commands or script.
For example HW=0/7/0/0.6.0 I want to find out /dev/dsk/cNtNdN info. I want to automate this in the script for some tasks. Help.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2002 02:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2002 02:39 PM
тАО06-26-2002 02:39 PM
Re: device file information
If you have device file name by using the following command you can get more info about the device file.
#lssf < device file>
eg:
#lssf /dev/rmt/0mn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2002 06:57 PM
тАО06-26-2002 06:57 PM
Re: device file information
Let's say that you have a machine with two SCSI controllers (c0 and c1). Now you add a new controller - c3. Next, you decide to reload the OS. You might actually find that what was c1 is now c2!. While the order the hardware is searched is fixed, there is no definite mapping of a hardware path to a logical path.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-27-2002 03:38 AM
тАО06-27-2002 03:38 AM
Re: device file information
maybe this is what you need:
---begin script---
#!/bin/sh
#
#set -x
PATH=/usr/bin:/bin:/usr/sbin:/sbin
OUTFILE=/var/conf/stminfo.disk
if [ -f ${OUTFILE} ]
then
echo "NOTE: overwriting existing file ${OUTFILE}"
else
echo "Creating ${OUTFILE}"
fi
cstm </dev/null 2>&1
scl type disk
info
wait
infolog
saveas
${OUTFILE}
done
quit
ok
!
echo "Disk HW-Path, device files and Serial No."
echo "--------------------------------------------------------"
grep -e ^Hardware -e ^Serial ${OUTFILE} | awk '{print $3}' | while read VALUE ; do
echo $VALUE | grep -q '[0-9]/'
if [ $? -eq 0 ] ; then
HWPATH=$VALUE
ioscan -fnH${VALUE} | sed -n 's+.*\(/dev/dsk/[^ ]*\).*+\1+p' | read DEVICE
else
printf "%20s %15s %15s\n" $HWPATH $DEVICE $VALUE
fi
done
echo "NOTE: STM disk information has been saved to ${OUTFILE}."
echo "--------------------------------------------------------"
---end script---
Ensure that you have installed the online diagnostics bundle. This script puts out a table with the HW-Path, dsk devicefiles and serial number.
It should regard Clay's statement that devicefiles are not static.
BTW: Clay, i hope i understood your post.
HTH
RGDS, Holger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-27-2002 12:42 PM
тАО06-27-2002 12:42 PM