- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Disk 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
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
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-17-2003 11:06 PM
06-17-2003 11:06 PM
I would like to know the following about all types of drives
1. Model Name
2. Manufacturer
3. Free space
4. Unmounted space
Also similar information for CD-ROMs. The information that diskinfo returns seems to be for SCSI only. An API to get the above would solve my problem, a command would also do, but GUI based applications won't be helpful.
Thanks and regards
SJ
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 11:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 11:11 PM
06-17-2003 11:11 PM
Re: Disk information
# diskinfo /dev/rdsk/cxtydz (root access is required)
model size and manufacturer
# pvdisplay -v /dev/dsk/cxtydz
usage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 11:19 PM
06-17-2003 11:19 PM
Re: Disk information
#diskinfo
#bdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2003 12:24 AM
06-18-2003 12:24 AM
Re: Disk information
Thanks for the information. However, I would like to know if the format that ioscan uses to display the information is a fixed format? For instance on the machine that I am using I get the following output in the description column for one disk:
HP 73.4GST373405LC
Can I assume that for any type of hard disk (non-HP for eg) the first four characters will be for the manufacturer, followed by size and model name?
Is there an API for the same?
Thanks and regards
Sonison James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2003 12:32 AM
06-18-2003 12:32 AM
Re: Disk information
HP is manufacturer.(hewlett packard)
ST is manufacturer. (segate)
73.4G is size
373405 is size
Rest all you can find from the diskinfo command only.
If you have ignite installed in your system,
print_manifest command also gives detailed information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2003 12:43 AM
06-18-2003 12:43 AM
Re: Disk information
Do an ioctl call on disk device with SIOC_INQUIRY like in this example:
#include
#include
#include
#include
#include
#include
int main(int argc,char *argv[])
{
struct inquiry inquiry;
char *dev;
int fd;
if (argc != 2)
{
fprintf(stderr, "Usage: %s
exit(1);
}
if (argc == 2)
dev=argv[1];
/* open the device */
if ((fd=open(dev,O_RDONLY))<0)
{
perror("open failed");
exit(errno);
}
if ((ioctl(fd,SIOC_INQUIRY,&inquiry))<0)
{
perror("ioctl(SIOC_INQUIRY) failed");
exit(errno);
}
printf("\nVendor ID = %s\n",inquiry.vendor_id);
printf("Product ID=%s\n",inquiry.product_id);
printf("Vendor Spec=%s\n",inquiry.vendor_spec);
printf("Rev Number=%s\n",inquiry.rev_num);
exit(0) ;
}
It comes from somewhere on ITRC btw,I think it was posted by Robin Wakefiled (so there goes the credit :))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2003 02:21 AM
06-18-2003 02:21 AM
Re: Disk information
Vijay thanks for the clarification. Zeev (Robin & Nikhil :) ) thanks for the API, it was really helpful. However, I would like to know if there is something similar for devices that are not SCSI?
Thanks and regards
SJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2003 06:51 AM
06-18-2003 06:51 AM
Re: Disk information
I don't think that diskinfo on IDE devices
wouldn't return info.I remember doing it on
CDROMs in B-2000 workstations (which come with
IDE cdroms).And I think there should be /usr/include/sys/ide.h or ata.h that can be used in simmilar manner.
What other devices you mean?
Zeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2003 11:52 AM
06-18-2003 11:52 AM
Re: Disk information
The diskinfo will return info about
the ide,
i try it on ide cdrom on b2000 and it's worked
Caesar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2003 07:29 PM
06-18-2003 07:29 PM
Re: Disk information
Unfortunately I do not have /usr/include/sys/ide.h and ata.h
The man page on diskinfo said that it would return info for SCSI devices only, so just wanted to confirm if I could use it for IDE also. Thanks for the help
Thanks and regards
Sonison James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2003 07:44 PM
06-18-2003 07:44 PM
Re: Disk information
Running an 'ioscan -fn' will report *all* attached hardware.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2003 07:44 PM
06-18-2003 07:44 PM