1
2
3
4
5 package oshi.hardware.platform.unix.aix;
6
7 import java.util.List;
8 import java.util.function.Supplier;
9
10 import oshi.annotation.concurrent.ThreadSafe;
11 import oshi.hardware.common.AbstractSensors;
12
13
14
15
16 @ThreadSafe
17 final class AixSensors extends AbstractSensors {
18
19 private final Supplier<List<String>> lscfg;
20
21 AixSensors(Supplier<List<String>> lscfg) {
22 this.lscfg = lscfg;
23 }
24
25 @Override
26 public double queryCpuTemperature() {
27
28 return 0d;
29 }
30
31 @Override
32 public int[] queryFanSpeeds() {
33
34
35 int fans = 0;
36 for (String s : lscfg.get()) {
37 if (s.contains("Air Mover")) {
38 fans++;
39 }
40 }
41 return new int[fans];
42 }
43
44 @Override
45 public double queryCpuVoltage() {
46
47 return 0d;
48 }
49 }