0

the project currently i am working on require me that fetch all info installed in the system, like total capacity, form factor, ssd or hdd, rotational speed, interface type, etc.

i searched a lot and i could find any command that does this. as a comparison, i found in windows, there are applications that would satisfy my requirement. how they do this?

just for interest, is there something similar in Linux too?

these two os is majorly for server, so i think the hardware info should play more important role than one in pc.

7
  • Duplicated on Superuser: superuser.com/questions/868106
    – JdeBP
    Jan 22 '15 at 16:23
  • @JdeBP i don't know which one is properer to ask question in this type.
    – Jason Hu
    Jan 22 '15 at 16:33
  • 1
    sasinfo target-port -s will give you some info. smartmontools will get low-level disk drive details. Are you looking for something text-based or GUI? Jan 22 '15 at 18:02
  • @MarkPlotnick text only
    – Jason Hu
    Jan 22 '15 at 18:02
  • @MarkPlotnick i checked. that's not enough. i want more numbers. i googled and found people said that all info actually not reside in the disk but in the profile page of venders, is that true?
    – Jason Hu
    Jan 22 '15 at 18:04
0

If you're using Solaris 11, you may want look at the new diskinfo command to see if it can get you want you want.

I know under Solaris 8, that you could query the kernel to get most of that information. Think there was even c code in the sysinternals (?--going off memory from 10ish years back) book to get the data.

And depending on the hardware, you may be able to get that data from the ILOM or XSCF. You could also look into using Ops Center.

0

The question is will disks will like to share this info. If you look into SCSI protocol, it provides not that much information. There are three main commands regarding this:

  • READ CAPACITY is probably self explanatory -- it provides number of blocks
  • INQUIRY provides vendor name, serial number, etc.
  • LOG SENSE is likely is most interesting -- it provides many disk-specific informational pages like current temperature, usage statistics, etc. However many of the pages are not supported by disks.

This trio of commands can be issued using lower-layer commands from sg3_utils using sg_readcap, sg_inq and sg_logs commands correspondingly. This package is supplied by Linux and shipped with Solaris 11.2+

However, if you look into what sg_logs can provide for physical disks, there is not that much:

root@calypso-sparc31:~# sg_logs -p 0x0 /dev/rdsk/c0t5000CCA01248AAE0d0s2
    HITACHI   H106060SDSUN600G  A2B0
Supported log pages:
    0x00        Supported log pages
    0x02        Error counters (write)
    0x03        Error counters (read)
    0x05        Error counters (verify)
    0x06        Non-medium errors
    0x0d        Temperature
    0x0e        Start-stop cycle counter
    0x0f        Application client
    0x10        Self-test results
    0x15        Background scan results (sbc-3)
    0x18        Protocol specific port
    0x1a        Power condition transition
    0x2f        Informational exceptions (SMART)
    0x30        Performance counters (Hitachi)
    0x37        Cache (Seagate), Miscellaneous (Hitachi)

Plus if disk lives behind RAID-controller (like LSI) or storage server, you won't get anything from it.

And this is only for SCSI. ATA family of protocols is completely different beast.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.