summaryrefslogtreecommitdiffstats
path: root/sbin/atacontrol
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2002-03-30 16:36:41 +0000
committersos <sos@FreeBSD.org>2002-03-30 16:36:41 +0000
commit65dd7ee2d664fd3e803c25710ebb8cff700d4693 (patch)
tree9eb58c78c6a73f6a83116f480d13036d52b41301 /sbin/atacontrol
parent59fa66220ea04959e377ec1831047b655bbe4da6 (diff)
downloadFreeBSD-src-65dd7ee2d664fd3e803c25710ebb8cff700d4693.zip
FreeBSD-src-65dd7ee2d664fd3e803c25710ebb8cff700d4693.tar.gz
Add support for getting status (fan, temp, 5V and 12V levels) from
Promise Superswap enclosures. Sponsored by: Advanis
Diffstat (limited to 'sbin/atacontrol')
-rw-r--r--sbin/atacontrol/atacontrol.88
-rw-r--r--sbin/atacontrol/atacontrol.c11
2 files changed, 19 insertions, 0 deletions
diff --git a/sbin/atacontrol/atacontrol.8 b/sbin/atacontrol/atacontrol.8
index 6d8bd53..44aad43 100644
--- a/sbin/atacontrol/atacontrol.8
+++ b/sbin/atacontrol/atacontrol.8
@@ -65,6 +65,9 @@
.Ic cap
.Ar channel device
.Nm
+.Ic enclosure
+.Ar channel device
+.Nm
.Ic list
.Sh DESCRIPTION
.Nm
@@ -145,6 +148,11 @@ the device name and manufacture/version strings are shown.
Show detailed info about the device on
.Ar channel device
where device is 0 for master and 1 for slave.
+.It Ic enclosure
+Show detailed info about the encolsure on
+.Ar channel device
+where device is 0 for master and 1 for slave.
+Fan RPM speed, enclosure temperature, 5V and 12V levels are shown.
.It Ic list
Show info about all attached devices on all active controllers.
.El
diff --git a/sbin/atacontrol/atacontrol.c b/sbin/atacontrol/atacontrol.c
index e339a25..9fe2201 100644
--- a/sbin/atacontrol/atacontrol.c
+++ b/sbin/atacontrol/atacontrol.c
@@ -272,6 +272,17 @@ main(int argc, char **argv)
else if (!strcmp(argv[1], "cap") && argc == 4) {
ata_cap_print(fd, iocmd.channel, atoi(argv[3]));
}
+ else if (!strcmp(argv[1], "enclosure") && argc == 4) {
+ iocmd.device = atoi(argv[3]);
+ iocmd.cmd = ATAENCSTAT;
+ if (ioctl(fd, IOCATA, &iocmd) < 0)
+ err(1, "ioctl(ATAENCSTAT)");
+ printf("fan RPM: %d temp: %.1f 5V: %.2f 12V: %.2f\n",
+ iocmd.u.enclosure.fan,
+ (double)iocmd.u.enclosure.temp / 10,
+ (double)iocmd.u.enclosure.v05 / 1000,
+ (double)iocmd.u.enclosure.v12 / 1000);
+ }
else if (!strcmp(argv[1], "detach") && argc == 3) {
iocmd.cmd = ATADETACH;
if (ioctl(fd, IOCATA, &iocmd) < 0)
OpenPOWER on IntegriCloud