1
2
3
4
5 package oshi.driver.unix.aix.perfstat;
6
7 import com.sun.jna.platform.unix.aix.Perfstat;
8 import com.sun.jna.platform.unix.aix.Perfstat.perfstat_partition_config_t;
9
10 import oshi.annotation.concurrent.ThreadSafe;
11
12
13
14
15 @ThreadSafe
16 public final class PerfstatConfig {
17
18 private static final Perfstat PERF = Perfstat.INSTANCE;
19
20 private PerfstatConfig() {
21 }
22
23
24
25
26
27
28 public static perfstat_partition_config_t queryConfig() {
29 perfstat_partition_config_t config = new perfstat_partition_config_t();
30 int ret = PERF.perfstat_partition_config(null, config, config.size(), 1);
31 if (ret > 0) {
32 return config;
33 }
34 return new perfstat_partition_config_t();
35 }
36 }