LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to find SAS Port Attributes from userspace (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-find-sas-port-attributes-from-userspace-4175437567/)

shreyaswaghmare 11-17-2012 08:38 AM

How to find SAS Port Attributes from userspace
 
How to find SAS Port attributes from linux userspace.
e.g. SAS Port Type, SAS Port State, SAS Port Protocol, Number of discovered ports etc.

I tried to find this in /sysfs but could not find these attributes.

Alternately for FC, /sysfs has much more information compare to SAS.

Can someone help me on how can i find these values from linux userspace?

-Shreyas

smallpond 11-19-2012 08:01 AM

Under sysfs, FC has a generic transport layer fc_host and a SCSI protocol driver scsi_host. SAS has the same SCSI protocol but there is no generic transport so you only have what all SCSI ports provide. For example, the state of the port:
Code:

cat /sys/class/scsi_host/host2/state
running

Disks connected to host port 2:
Code:

ls /sys/class/scsi_disk/2:*

shreyaswaghmare 11-20-2012 04:51 AM

Thanks smallpond,

If we cannot find this through sysfs then is there any other way i can find them out?
like probing driver or something similar? any idea on how can it be done?

PierreB. 11-20-2012 06:07 AM

Just in case, if you are using dell servers, you can use omreport and omconfig (both needs to be installed) to get this kind of informations.

Please check out this page and this other one for omreport and omconfig useful information (it is something i wrote), hope this helps.


All times are GMT -5. The time now is 11:57 AM.