- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Retrieving disk serial number programmatically
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
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
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
тАО11-27-2002 01:23 AM - last edited on тАО06-02-2014 09:31 PM by Maiko-I
тАО11-27-2002 01:23 AM - last edited on тАО06-02-2014 09:31 PM by Maiko-I
Hello,
I am trying to retrieve the disk serial number programmatically.
I saw a post
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xc4bf0bce6f33d6118fff0090279cd0f9,00.html
that gives a way (run cstm tool and parse the output).
Can we retrieve the serial number by calling some API in C
or a kernel call?
How does cstm find the serial number? (I tried running tusc,
but couldn't extract much info). Is it doing ioctl? If yes,
then what IOCTL code can be used to get the serial number?
Any help will be appreciated.
With regards,
Nikhil
P.S. this thread has been moved from Disk to HP-UX > sysadmin. - Hp forum moderator
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2002 01:49 AM
тАО11-27-2002 01:49 AM
Re: Retrieving disk serial number programmatically
I saw this information in disk log pages. How to get it from C - ask in languages forum on ITRC
Eugeny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2002 02:33 AM
тАО11-27-2002 02:33 AM
Re: Retrieving disk serial number programmatically
Could you please point me to the exact forum name?
With regards,
Nikhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2002 02:54 AM
тАО11-27-2002 02:54 AM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2002 03:06 AM
тАО11-27-2002 03:06 AM
Re: Retrieving disk serial number programmatically
I have posted my query on that forum.
Do you have any refs/links about the "disk log pages" that I can read? (I am not familiar with this concept).
With regards,
Nikhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2002 03:52 AM
тАО11-27-2002 03:52 AM
Re: Retrieving disk serial number programmatically
I saw SCSI advanced application (don't ask me which one) which can access these pages. Disk is set-up through these log pages - you can find disk size, disk inquiry string, fw revision, disk statistics, caching parameters etc. I remember I killed one Maxtor disk reducing number of cylinders to 1 :o( So please play carefully with them
Eugeny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2002 03:54 AM
тАО11-27-2002 03:54 AM
Re: Retrieving disk serial number programmatically
Eugeny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2002 06:09 AM
тАО11-27-2002 06:09 AM
Re: Retrieving disk serial number programmatically
The serial number appears in the "mode sense" pages of the device. The mode sense pages are retrieved from the device via direct SCSI commands. You will need to build the SCSI command to retrieve the pages manually - meaning define a struct{} for the record(s), build a CDB, and issue this via the SCSI Pass-Thru interface. The Pass-Thru interface allows you to send raw SCSI commands directly to a device.
It's been years since I've done this myself, but it wasn't all that complicated.
There is lots of docs on how to do this, and it would be too much to post here. Look up the SCSI command specifications on the 'net, and see docs.hp.com for the Pass-Thru interface documentation.
Good luck!