Thank you Ralph and Jeff. 

This was the list I was hoping to read through hwloc.

3. Memory
        a. Total memory
        b. Total DIMMS
        c. Individual DIMM's:
                (i) Serial numbers
                (ii) Vendor Name
                (iii) Model
                (iv) Memory Frequency
4a. Network Adapters (Ethernet)
        a. Model
        b. Speed
        c. Serial Number (if applicable)
        d. MAC address
4b. Network Adapters (Infiniband)
        a. Model
        b. Speed
        c. Serial Number (if applicable)
        d. MAC address
4. Host Bus Adapters
        a. Manufacturer
        b. Serial Number
        c. MAC address
6. Coprocessors
        a. Manufacturer
        b. Serial Number
7. Other PCI Devices
        a. Device ID
        b. Device Serial number (if applicable)
8. HardDrive
        a. Model, Form factor, etc.
        b. Vendor
        c. Serial Number
        d. Size


Some of it is already provided by HWLOC. For some other items, a limited set of 
information is provided by HWLOC.

Most of the DIMM related data is provided by the SMBIOS tables. 'dmidecode' 
provides a lot of this information.
The application hdparm provides a lot of information about hard drives. I 
glanced over their code, and it seems like they also udev to retrieve the 
information.


* For Memory, I would suggest have a single object for each node and list the 
DIMM details as attributes for that object.
* For hard drives, we can have similar objects for each SATA0.., etc node, 
whose lanes are usually connected via the PCH to a single socket. Each hard 
drive can have its own object, and all the attributes of the hard drive can be 
stored within that object.
* For the PCI devices I understand it is not simple to read the serial number 
and UUID details, but I know how to read the serial numbers for some 
products(like the Intel coprocessors) and it would be really cool to add this 
also as an attribute to it.

I'm still not entirely familiar with the hwloc's internal architecture, I 
apologize in case I make any wrong assumptions.
How would you like me to proceed from here?

Thanks,
Vineet

-----Original Message-----
From: hwloc-devel [mailto:hwloc-devel-boun...@open-mpi.org] On Behalf Of Brice 
Goglin
Sent: Tuesday, September 23, 2014 8:48 AM
To: hwloc-de...@open-mpi.org
Subject: Re: [hwloc-devel] Using hwloc to detect Hard Disks

Le 23/09/2014 16:46, Brice Goglin a écrit :
> Le 23/09/2014 16:38, Guy Streeter a écrit :
>> I know that udev gathers this information:
>>
>> # ll /sys/block/sda/bdi
>> lrwxrwxrwx. 1 root root 0 Sep 23 09:33 /sys/block/sda/bdi ->
>> ../../../../../../../../virtual/bdi/8:0
>> # grep SERIAL '/run/udev/data/b8:0'
>> E:ID_SERIAL=SAMSUNG_MZ7TD256HAFV-000L9_S17LNSADC13325
>> E:ID_SERIAL_SHORT=S17LNSADC13325
>>
>> So you could get it from udev or gather it the same way udev does. If 
>> you want to know how udev does it, I can research that.
> If you can get more information, that'd be great. I wonder if they are 
> using ioctls to retrieve these, I can't find anything in sysfs even 
> though udev has similar info on my machines.
>

Indeed there's a struct hd_driveid in linux/hdreg.h that you get with ioctl 
HDIO_GET_IDENTITY on the device.

There's also a libblkid that may help.

Brice

_______________________________________________
hwloc-devel mailing list
hwloc-de...@open-mpi.org
Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
Link to this post: 
http://www.open-mpi.org/community/lists/hwloc-devel/2014/09/4235.php

Reply via email to