SES(4)
π SES(4) β the SCSI Environmental Services driver, but make it iconic β¨
okay so bestie, welcome to ses(4) β yes that's the manual page name and yes we're gonna get into it. this is the kernel interfaces manual vibe, and it's literally all about the SCSI Environmental Services driver. no cap, it's giving "your enclosure has feelings and we're checking on them" π«Ά
πΈ NAME πΈ
ses β the SCSI Environmental Services driver, periodt π
β¨ SYNOPSIS β¨
device ses
that's it. that's the line. slay.
π¦ DESCRIPTION π¦
okay so the ses driver provides support for all SCSI devices of the environmental services class that are attached to the system through a supported SCSI Host Adapter, and it also gives you emulated support for SAF-TE β aka SCSI Accessible Fault Tolerant Enclosures, iykyk π
the environmental services class is generally enclosure devices that provide environmental information like the number of power supplies (and their state), temperature, device slots, and so on. literally the enclosure's whole personality π
bestie, important: a SCSI Host Adapter must also be separately configured into the system before a SCSI Environmental Services device can be configured. no host adapter, no ses device. that's the rule π
π KERNEL CONFIGURATION π
so here's the tea: it's only necessary to explicitly configure one ses device β data structures are dynamically allocated as devices are found on the SCSI bus. the kernel handles the rest, main character energy fr fr π
a separate option, SES_ENABLE_PASSTHROUGH, may be specified to allow the ses driver to perform functions on devices of other classes that claim to also support ses functionality. yes, it's that girl π
π₯ IOCTLS π₯
the following ioctl(2) calls apply to ses devices. they are defined in the header file <cam/scsi/scsi_enc.h> (q.v.). let's go through them one by one because we don't skip β¨
ENCIOC_GETNELMβ used to find out how manyseselements are driven by this particular device instance.ENCIOC_GETELMMAPβ read, from the kernel, an array of SES elements which contains the element identifier, which subenclosure it is in, and thesestype of the element.ENCIOC_GETENCSTATβ get the overall enclosure status.ENCIOC_SETENCSTATβ set the overall enclosure status.ENCIOC_GETELMSTATβ get the status of a particular element.ENCIOC_SETELMSTATβ set the status of a particular element.ENCIOC_GETTEXTβ get the associated help text for an element (not yet implemented).sesdevices often have descriptive text for an element which can tell you things like location (e.g.,"left power supply").ENCIOC_INITβ initialize the enclosure.ENCIOC_GETELMDESCβ get the element's descriptor string.ENCIOC_GETELMDEVNAMESβ get the device names, if any, associated with this element.ENCIOC_GETSTRINGβ used to read the SES String In Diagnostic Page. the contents of this page are device-specific.ENCIOC_SETSTRINGβ used to set the SES String Out Diagnostic Page. the contents of this page are device-specific.ENCIOC_GETENCNAMEβ used to get the name of the enclosure.ENCIOC_GETENCIDβ used to get the Enclosure Logical Identifier.
like, that's the whole list. every single one. we ate and left no crumbs π
π§ EXAMPLE USAGE π§
the files contained in /usr/share/examples/ses show simple mechanisms for how to use these interfaces, as well as a very stupid simple monitoring daemon. literally go look at them, they're so helpful, I'm obsessed ππ
π FILES π
/dev/sesNβ the *N*th SES device.
π DIAGNOSTICS π
when the kernel is configured with DEBUG enabled, the first open to an SES device will spit out overall enclosure parameters to the console. it's giving "hello world but make it hardware" ngl π
π SEE ALSO π
sesutil(8)β go check it out bestie, fr fr
π HISTORY π
the ses driver was originally written for the CAM SCSI subsystem by Matthew Jacob and first released in FreeBSD 4.3. it was a functional equivalent of a similar driver available in Solaris, Release 7. it was largely rewritten by Alexander Motin, Justin Gibbs, and Will Andrews for FreeBSD 9.2. historians could never π
β¨
and that's the whole page, bestie β Debian, November 12, 2019, signing off like the icon it is π«Άπ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2000 Matthew Jacob <mjacob@FreeBSD.org>. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms