Commit Graph

16 Commits

Author SHA1 Message Date
Alexander Motin
efab8bfdb3 Fix sesutil fault operation.
Fault and ident bits are located in different control bytes, so previous
code was just doing nothing, writing into reserved bit.

MFC after:	1 week
2016-09-30 20:35:12 +00:00
Baptiste Daroussin
f734685ea4 Plug memory leak
Reported by:	coverity
CID:		1331664, 1331665
2016-04-20 21:37:32 +00:00
Baptiste Daroussin
1427ff7da9 Cleanup headers
Found by:	include-what-you-use
2016-03-26 12:11:46 +00:00
Bryan Drewery
e3ebb82118 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	EMC / Isilon Storage Division
2016-01-07 19:58:23 +00:00
Baptiste Daroussin
60f466403f Show the enclosure name and id in sesutil map
Sponsored by:	Gandi.net
2015-12-15 13:01:14 +00:00
Baptiste Daroussin
96e6c444c3 Fix sesutil locate when a sesid is passed to locate command 2015-12-11 21:11:02 +00:00
Baptiste Daroussin
d7654478d3 sesutil: Add extra information specific to some SES devices to sesutil map
Rework stat2ascii preparing a buffer of what could be printed. This prevent the
risk of overflowing a static buffer.

Do not print those informations anymore in the "status" but into a new
"extra status" only printed if there are actually extra things to print.

Now add those extra informations:

* Thermal sensor temperature
* Cooling devices speed
* Voltage sensors, current consumption

Tested by:	AllanJude
Sponsored by:	Gandi.net
Differential Revision:	https://reviews.freebsd.org/D4520
2015-12-11 20:45:39 +00:00
Baptiste Daroussin
f57605fb7d sesutils, pass the correct element type when printing the status of a given
element of the ses.

Sponsored by:	Gandi.net
2015-12-11 11:08:00 +00:00
Baptiste Daroussin
845614cd22 sesutil: fix map not printing the status of the LED device in an array
Sponsored by:	Gandi.net
2015-12-11 10:58:26 +00:00
Allan Jude
6af5d161e7 Rename some functions and variables inside sesutil(8) to make gcc happy
Reported by:	bz
Approved by:	bapt (implicit)
Sponsored by:	ScaleEngine Inc.
2015-09-19 18:41:24 +00:00
Bryan Drewery
6fcd667fd6 Connect sesutil(1) and numactl(1) for META_MODE.
Sponsored by:	EMC / Isilon Storage Division
2015-09-19 17:47:36 +00:00
Allan Jude
8729f5ec0e Improve and expand sesutil(8)
- Return an error if no matching device is found when the locate command is run
- Enhance the locate command to be able to address drive bays with no disk, or where the SES controller has not made the mapping to the device name
- Added the fault command, similar to locate, but a different SES property. On some of my controllers locate blinks the activity light, others the fault light. The fault command keeps the fault light on constant.
- Improve the usage() output and use it everywhere
- Added the map command, displays all elements connected to each (or the specified) ses(4) controller
- Added the status command, returns the overall status of the ses(4) controller

Reviewed by:	wblock (man page, earlier version)
Approved by:	bapt (mentor)
MFC after:	3 weeks
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3580
2015-09-19 16:36:45 +00:00
Baptiste Daroussin
1bc54324e9 Yet another fix for gcc 4.2 2015-09-05 22:33:40 +00:00
Baptiste Daroussin
cb291e8aa1 Remove extra i++
Reported by:	allanjude@
2015-09-05 21:55:01 +00:00
Baptiste Daroussin
4569e7cfe2 Fix build with gcc 4.2
Reported by:	kib
2015-09-05 16:59:30 +00:00
Baptiste Daroussin
cddcb2599f Add a new sesutil(8) utility
This is an utility for managing SCSI Enclosure Services (SES) device.

For now only one command is supported "locate" which will change the test of the
external LED associated to a given disk.

Usage if the following:
sesutil locate disk [on|off]

Disk can be a device name: "da12" or a special keyword: "all".

Reviewed by:	mav
MFC after:	1 month
Relnotes:	yes
Sponsored by:	gandi.net
Differential Revision:	https://reviews.freebsd.org/D3544
2015-09-05 00:06:01 +00:00