FreeBSD Bugzilla – Attachment 223884 Details for
Bug 254841
usr.sbin/mpsutil: add functionality (temperature monitoring, PCIe speed etc)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Add functionality to mpsutil
20210407-mpsutil.diff (text/plain), 1.55 KB, created by
Daniel Austin
on 2021-04-06 23:54:38 UTC
(
hide
)
Description:
Add functionality to mpsutil
Filename:
MIME Type:
Creator:
Daniel Austin
Created:
2021-04-06 23:54:38 UTC
Size:
1.55 KB
patch
obsolete
>diff --git a/usr.sbin/mpsutil/mps_show.c b/usr.sbin/mpsutil/mps_show.c >index bb790fe21229..e776e4959165 100644 >--- a/usr.sbin/mpsutil/mps_show.c >+++ b/usr.sbin/mpsutil/mps_show.c >@@ -58,12 +58,17 @@ MPS_TABLE(top, show); > static int > show_adapter(int ac, char **av) > { >+ const char* pcie_speed[] = { "2.5", "5.0", "8.0" }; >+ const char* temp_units[] = { "", "F", "C" }; >+ const char* ioc_speeds[] = { "", "Full", "Half", "Quarter", "Eighth" }; >+ > MPI2_CONFIG_PAGE_SASIOUNIT_0 *sas0; > MPI2_CONFIG_PAGE_SASIOUNIT_1 *sas1; > MPI2_SAS_IO_UNIT0_PHY_DATA *phy0; > MPI2_SAS_IO_UNIT1_PHY_DATA *phy1; > MPI2_CONFIG_PAGE_MAN_0 *man0; > MPI2_CONFIG_PAGE_BIOS_3 *bios3; >+ MPI2_CONFIG_PAGE_IO_UNIT_7 *iounit7; > MPI2_IOC_FACTS_REPLY *facts; > U16 IOCStatus; > char *speed, *minspeed, *maxspeed, *isdisabled, *type; >@@ -125,6 +130,23 @@ show_adapter(int ac, char **av) > ? "yes" : "no"); > free(facts); > >+ iounit7 = mps_read_config_page(fd, MPI2_CONFIG_PAGETYPE_IO_UNIT, 7, 0, NULL); >+ if (iounit7 == NULL) { >+ error = errno; >+ warn("Failed to get IOUNIT page 7 info"); >+ return (error); >+ } >+ printf(" PCIe Width/Speed: x%d (%s GB/sec)\n", iounit7->PCIeWidth, >+ pcie_speed[iounit7->PCIeSpeed]); >+ printf(" IOC Speed: %s\n", ioc_speeds[iounit7->IOCSpeed]); >+ printf(" Temperature: "); >+ if (iounit7->IOCTemperatureUnits == MPI2_IOUNITPAGE7_IOC_TEMP_NOT_PRESENT) >+ printf("Unknown/Unsupported\n"); >+ else >+ printf("%d %s\n", iounit7->IOCTemperature, >+ temp_units[iounit7->IOCTemperatureUnits]); >+ free(iounit7); >+ > fd = mps_open(mps_unit); > if (fd < 0) { > error = errno;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 254841
:
223884
|
223965
|
223966
|
224099
|
224748
|
224749