一、引入jar包

  本项目主要使用第开源jar包:https://github.com/oshi/oshi

  1. <dependency>
  2. <groupId>junit</groupId>
  3. <artifactId>junit</artifactId>
  4. <version>RELEASE</version>
  5. </dependency>
  6. <!-- https://mvnrepository.com/artifact/com.github.oshi/oshi-core -->
  7. <dependency>
  8. <groupId>com.github.oshi</groupId>
  9. <artifactId>oshi-core</artifactId>
  10. <version>3.5.0</version>
  11. </dependency>

二、测试代码

  1. import org.slf4j.Logger;
  2. import org.slf4j.LoggerFactory;
  3. import oshi.SystemInfo;
  4. import oshi.hardware.*;
  5. import oshi.hardware.CentralProcessor.TickType;
  6. import oshi.software.os.*;
  7. import oshi.software.os.OperatingSystem.ProcessSort;
  8. import oshi.util.FormatUtil;
  9. import oshi.util.Util;
  10.  
  11. import java.util.Arrays;
  12. import java.util.List;
  13.  
  14. /**
  15. * The Class SystemInfoTest.
  16. *
  17. * @author dblock[at]dblock[dot]org
  18. */
  19. public class SystemInfoTest {
  20.  
  21. /**
  22. * The main method.
  23. *
  24. * @param args the arguments
  25. */
  26. public static void main(String[] args) {
  27. // Options: ERROR > WARN > INFO > DEBUG > TRACE
  28. Logger LOG = LoggerFactory.getLogger(SystemInfoTest.class);
  29.  
  30. LOG.info("Initializing System...");
  31. SystemInfo si = new SystemInfo();
  32.  
  33. HardwareAbstractionLayer hal = si.getHardware();
  34. OperatingSystem os = si.getOperatingSystem();
  35.  
  36. System.out.println(os);
  37.  
  38. LOG.info("Checking computer system...");
  39. printComputerSystem(hal.getComputerSystem());
  40.  
  41. LOG.info("Checking Processor...");
  42. printProcessor(hal.getProcessor());
  43.  
  44. LOG.info("Checking Memory...");
  45. printMemory(hal.getMemory());
  46.  
  47. LOG.info("Checking CPU...");
  48. printCpu(hal.getProcessor());
  49.  
  50. LOG.info("Checking Processes...");
  51. printProcesses(os, hal.getMemory());
  52.  
  53. LOG.info("Checking Sensors...");
  54. printSensors(hal.getSensors());
  55.  
  56. LOG.info("Checking Power sources...");
  57. printPowerSources(hal.getPowerSources());
  58.  
  59. LOG.info("Checking Disks...");
  60. printDisks(hal.getDiskStores());
  61.  
  62. LOG.info("Checking File System...");
  63. printFileSystem(os.getFileSystem());
  64.  
  65. LOG.info("Checking Network interfaces...");
  66. printNetworkInterfaces(hal.getNetworkIFs());
  67.  
  68. LOG.info("Checking Network parameterss...");
  69. printNetworkParameters(os.getNetworkParams());
  70.  
  71. // hardware: displays
  72. LOG.info("Checking Displays...");
  73. printDisplays(hal.getDisplays());
  74.  
  75. // hardware: USB devices
  76. LOG.info("Checking USB Devices...");
  77. printUsbDevices(hal.getUsbDevices(true));
  78. }
  79.  
  80. private static void printComputerSystem(final ComputerSystem computerSystem) {
  81.  
  82. System.out.println("manufacturer: " + computerSystem.getManufacturer());
  83. System.out.println("model: " + computerSystem.getModel());
  84. System.out.println("serialnumber: " + computerSystem.getSerialNumber());
  85. final Firmware firmware = computerSystem.getFirmware();
  86. System.out.println("firmware:");
  87. System.out.println(" manufacturer: " + firmware.getManufacturer());
  88. System.out.println(" name: " + firmware.getName());
  89. System.out.println(" description: " + firmware.getDescription());
  90. System.out.println(" version: " + firmware.getVersion());
  91. System.out.println(" release date: " + (firmware.getReleaseDate() == null ? "unknown"
  92. : firmware.getReleaseDate() == null ? "unknown" : FormatUtil.formatDate(firmware.getReleaseDate())));
  93. final Baseboard baseboard = computerSystem.getBaseboard();
  94. System.out.println("baseboard:");
  95. System.out.println(" manufacturer: " + baseboard.getManufacturer());
  96. System.out.println(" model: " + baseboard.getModel());
  97. System.out.println(" version: " + baseboard.getVersion());
  98. System.out.println(" serialnumber: " + baseboard.getSerialNumber());
  99. }
  100.  
  101. private static void printProcessor(CentralProcessor processor) {
  102. System.out.println(processor);
  103. System.out.println(" " + processor.getPhysicalPackageCount() + " physical CPU package(s)");
  104. System.out.println(" " + processor.getPhysicalProcessorCount() + " physical CPU core(s)");
  105. System.out.println(" " + processor.getLogicalProcessorCount() + " logical CPU(s)");
  106.  
  107. System.out.println("Identifier: " + processor.getIdentifier());
  108. System.out.println("ProcessorID: " + processor.getProcessorID());
  109. }
  110.  
  111. private static void printMemory(GlobalMemory memory) {
  112. System.out.println("Memory: " + FormatUtil.formatBytes(memory.getAvailable()) + "/"
  113. + FormatUtil.formatBytes(memory.getTotal()));
  114. System.out.println("Swap used: " + FormatUtil.formatBytes(memory.getSwapUsed()) + "/"
  115. + FormatUtil.formatBytes(memory.getSwapTotal()));
  116. }
  117.  
  118. private static void printCpu(CentralProcessor processor) {
  119. System.out.println("Uptime: " + FormatUtil.formatElapsedSecs(processor.getSystemUptime()));
  120. System.out.println(
  121. "Context Switches/Interrupts: " + processor.getContextSwitches() + " / " + processor.getInterrupts());
  122.  
  123. long[] prevTicks = processor.getSystemCpuLoadTicks();
  124. System.out.println("CPU, IOWait, and IRQ ticks @ 0 sec:" + Arrays.toString(prevTicks));
  125. // Wait a second...
  126. Util.sleep(1000);
  127. long[] ticks = processor.getSystemCpuLoadTicks();
  128. System.out.println("CPU, IOWait, and IRQ ticks @ 1 sec:" + Arrays.toString(ticks));
  129. long user = ticks[TickType.USER.getIndex()] - prevTicks[TickType.USER.getIndex()];
  130. long nice = ticks[TickType.NICE.getIndex()] - prevTicks[TickType.NICE.getIndex()];
  131. long sys = ticks[TickType.SYSTEM.getIndex()] - prevTicks[TickType.SYSTEM.getIndex()];
  132. long idle = ticks[TickType.IDLE.getIndex()] - prevTicks[TickType.IDLE.getIndex()];
  133. long iowait = ticks[TickType.IOWAIT.getIndex()] - prevTicks[TickType.IOWAIT.getIndex()];
  134. long irq = ticks[TickType.IRQ.getIndex()] - prevTicks[TickType.IRQ.getIndex()];
  135. long softirq = ticks[TickType.SOFTIRQ.getIndex()] - prevTicks[TickType.SOFTIRQ.getIndex()];
  136. long steal = ticks[TickType.STEAL.getIndex()] - prevTicks[TickType.STEAL.getIndex()];
  137. long totalCpu = user + nice + sys + idle + iowait + irq + softirq + steal;
  138.  
  139. System.out.format(
  140. "User: %.1f%% Nice: %.1f%% System: %.1f%% Idle: %.1f%% IOwait: %.1f%% IRQ: %.1f%% SoftIRQ: %.1f%% Steal: %.1f%%%n",
  141. 100d * user / totalCpu, 100d * nice / totalCpu, 100d * sys / totalCpu, 100d * idle / totalCpu,
  142. 100d * iowait / totalCpu, 100d * irq / totalCpu, 100d * softirq / totalCpu, 100d * steal / totalCpu);
  143. System.out.format("CPU load: %.1f%% (counting ticks)%n", processor.getSystemCpuLoadBetweenTicks() * 100);
  144. System.out.format("CPU load: %.1f%% (OS MXBean)%n", processor.getSystemCpuLoad() * 100);
  145. double[] loadAverage = processor.getSystemLoadAverage(3);
  146. System.out.println("CPU load averages:" + (loadAverage[0] < 0 ? " N/A" : String.format(" %.2f", loadAverage[0]))
  147. + (loadAverage[1] < 0 ? " N/A" : String.format(" %.2f", loadAverage[1]))
  148. + (loadAverage[2] < 0 ? " N/A" : String.format(" %.2f", loadAverage[2])));
  149. // per core CPU
  150. StringBuilder procCpu = new StringBuilder("CPU load per processor:");
  151. double[] load = processor.getProcessorCpuLoadBetweenTicks();
  152. for (double avg : load) {
  153. procCpu.append(String.format(" %.1f%%", avg * 100));
  154. }
  155. System.out.println(procCpu.toString());
  156. }
  157.  
  158. private static void printProcesses(OperatingSystem os, GlobalMemory memory) {
  159. System.out.println("Processes: " + os.getProcessCount() + ", Threads: " + os.getThreadCount());
  160. // Sort by highest CPU
  161. List<OSProcess> procs = Arrays.asList(os.getProcesses(5, ProcessSort.CPU));
  162.  
  163. System.out.println(" PID %CPU %MEM VSZ RSS Name");
  164. for (int i = 0; i < procs.size() && i < 5; i++) {
  165. OSProcess p = procs.get(i);
  166. System.out.format(" %5d %5.1f %4.1f %9s %9s %s%n", p.getProcessID(),
  167. 100d * (p.getKernelTime() + p.getUserTime()) / p.getUpTime(),
  168. 100d * p.getResidentSetSize() / memory.getTotal(), FormatUtil.formatBytes(p.getVirtualSize()),
  169. FormatUtil.formatBytes(p.getResidentSetSize()), p.getName());
  170. }
  171. }
  172.  
  173. private static void printSensors(Sensors sensors) {
  174. System.out.println("Sensors:");
  175. System.out.format(" CPU Temperature: %.1f°C%n", sensors.getCpuTemperature());
  176. System.out.println(" Fan Speeds: " + Arrays.toString(sensors.getFanSpeeds()));
  177. System.out.format(" CPU Voltage: %.1fV%n", sensors.getCpuVoltage());
  178. }
  179.  
  180. private static void printPowerSources(PowerSource[] powerSources) {
  181. StringBuilder sb = new StringBuilder("Power: ");
  182. if (powerSources.length == 0) {
  183. sb.append("Unknown");
  184. } else {
  185. double timeRemaining = powerSources[0].getTimeRemaining();
  186. if (timeRemaining < -1d) {
  187. sb.append("Charging");
  188. } else if (timeRemaining < 0d) {
  189. sb.append("Calculating time remaining");
  190. } else {
  191. sb.append(String.format("%d:%02d remaining", (int) (timeRemaining / 3600),
  192. (int) (timeRemaining / 60) % 60));
  193. }
  194. }
  195. for (PowerSource pSource : powerSources) {
  196. sb.append(String.format("%n %s @ %.1f%%", pSource.getName(), pSource.getRemainingCapacity() * 100d));
  197. }
  198. System.out.println(sb.toString());
  199. }
  200.  
  201. private static void printDisks(HWDiskStore[] diskStores) {
  202. System.out.println("Disks:");
  203. for (HWDiskStore disk : diskStores) {
  204. boolean readwrite = disk.getReads() > 0 || disk.getWrites() > 0;
  205. System.out.format(" %s: (model: %s - S/N: %s) size: %s, reads: %s (%s), writes: %s (%s), xfer: %s ms%n",
  206. disk.getName(), disk.getModel(), disk.getSerial(),
  207. disk.getSize() > 0 ? FormatUtil.formatBytesDecimal(disk.getSize()) : "?",
  208. readwrite ? disk.getReads() : "?", readwrite ? FormatUtil.formatBytes(disk.getReadBytes()) : "?",
  209. readwrite ? disk.getWrites() : "?", readwrite ? FormatUtil.formatBytes(disk.getWriteBytes()) : "?",
  210. readwrite ? disk.getTransferTime() : "?");
  211. HWPartition[] partitions = disk.getPartitions();
  212. if (partitions == null) {
  213. // TODO Remove when all OS's implemented
  214. continue;
  215. }
  216. for (HWPartition part : partitions) {
  217. System.out.format(" |-- %s: %s (%s) Maj:Min=%d:%d, size: %s%s%n", part.getIdentification(),
  218. part.getName(), part.getType(), part.getMajor(), part.getMinor(),
  219. FormatUtil.formatBytesDecimal(part.getSize()),
  220. part.getMountPoint().isEmpty() ? "" : " @ " + part.getMountPoint());
  221. }
  222. }
  223. }
  224.  
  225. private static void printFileSystem(FileSystem fileSystem) {
  226. System.out.println("File System:");
  227.  
  228. System.out.format(" File Descriptors: %d/%d%n", fileSystem.getOpenFileDescriptors(),
  229. fileSystem.getMaxFileDescriptors());
  230.  
  231. OSFileStore[] fsArray = fileSystem.getFileStores();
  232. for (OSFileStore fs : fsArray) {
  233. long usable = fs.getUsableSpace();
  234. long total = fs.getTotalSpace();
  235. System.out.format(
  236. " %s (%s) [%s] %s of %s free (%.1f%%) is %s "
  237. + (fs.getLogicalVolume() != null && fs.getLogicalVolume().length() > 0 ? "[%s]" : "%s")
  238. + " and is mounted at %s%n",
  239. fs.getName(), fs.getDescription().isEmpty() ? "file system" : fs.getDescription(), fs.getType(),
  240. FormatUtil.formatBytes(usable), FormatUtil.formatBytes(fs.getTotalSpace()), 100d * usable / total,
  241. fs.getVolume(), fs.getLogicalVolume(), fs.getMount());
  242. }
  243. }
  244.  
  245. private static void printNetworkInterfaces(NetworkIF[] networkIFs) {
  246. System.out.println("Network interfaces:");
  247. for (NetworkIF net : networkIFs) {
  248. System.out.format(" Name: %s (%s)%n", net.getName(), net.getDisplayName());
  249. System.out.format(" MAC Address: %s %n", net.getMacaddr());
  250. System.out.format(" MTU: %s, Speed: %s %n", net.getMTU(), FormatUtil.formatValue(net.getSpeed(), "bps"));
  251. System.out.format(" IPv4: %s %n", Arrays.toString(net.getIPv4addr()));
  252. System.out.format(" IPv6: %s %n", Arrays.toString(net.getIPv6addr()));
  253. boolean hasData = net.getBytesRecv() > 0 || net.getBytesSent() > 0 || net.getPacketsRecv() > 0
  254. || net.getPacketsSent() > 0;
  255. System.out.format(" Traffic: received %s/%s%s; transmitted %s/%s%s %n",
  256. hasData ? net.getPacketsRecv() + " packets" : "?",
  257. hasData ? FormatUtil.formatBytes(net.getBytesRecv()) : "?",
  258. hasData ? " (" + net.getInErrors() + " err)" : "",
  259. hasData ? net.getPacketsSent() + " packets" : "?",
  260. hasData ? FormatUtil.formatBytes(net.getBytesSent()) : "?",
  261. hasData ? " (" + net.getOutErrors() + " err)" : "");
  262. }
  263. }
  264.  
  265. private static void printNetworkParameters(NetworkParams networkParams) {
  266. System.out.println("Network parameters:");
  267. System.out.format(" Host name: %s%n", networkParams.getHostName());
  268. System.out.format(" Domain name: %s%n", networkParams.getDomainName());
  269. System.out.format(" DNS servers: %s%n", Arrays.toString(networkParams.getDnsServers()));
  270. System.out.format(" IPv4 Gateway: %s%n", networkParams.getIpv4DefaultGateway());
  271. System.out.format(" IPv6 Gateway: %s%n", networkParams.getIpv6DefaultGateway());
  272. }
  273.  
  274. private static void printDisplays(Display[] displays) {
  275. System.out.println("Displays:");
  276. int i = 0;
  277. for (Display display : displays) {
  278. System.out.println(" Display " + i + ":");
  279. System.out.println(display.toString());
  280. i++;
  281. }
  282. }
  283.  
  284. private static void printUsbDevices(UsbDevice[] usbDevices) {
  285. System.out.println("USB Devices:");
  286. for (UsbDevice usbDevice : usbDevices) {
  287. System.out.println(usbDevice.toString());
  288. }
  289. }
  290. }

三、结果

  1. Microsoft Windows 10 build 15063
  2. manufacturer: LENOVO
  3. model: 80RU
  4. serialnumber: R90LN08UR9N0B6922009
  5. firmware:
  6. manufacturer: LENOVO
  7. name: E5CN53WW
  8. description: E5CN53WW
  9. version: LENOVO - 0
  10. release date: 07/11/2016
  11. baseboard:
  12. manufacturer: LENOVO
  13. model: unknown
  14. version: SDK0K09938 WIN
  15. serialnumber: R90LN08U
  16. Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz
  17. 1 physical CPU package(s)
  18. 4 physical CPU core(s)
  19. 4 logical CPU(s)
  20. Identifier: Intel64 Family 6 Model 94 Stepping 3
  21. ProcessorID: BFEBFBFF000506E3
  22. Memory: 1.5 GiB/7.8 GiB
  23. Swap used: 84.4 MiB/6.3 GiB
  24. Uptime: 1 days, 11:45:25
  25. Context Switches/Interrupts: 648525190 / 338012494
  26. CPU, IOWait, and IRQ ticks @ 0 sec:[18421421, 0, 10068431, 288934828, 0, 266351, 143296, 0]
  27. CPU, IOWait, and IRQ ticks @ 1 sec:[18421578, 0, 10068486, 288938671, 0, 266351, 143304, 0]
  28. User: 3.9% Nice: 0.0% System: 1.4% Idle: 94.6% IOwait: 0.0% IRQ: 0.0% SoftIRQ: 0.2% Steal: 0.0%
  29. CPU load: 13.0% (counting ticks)
  30. CPU load: 17.4% (OS MXBean)
  31. CPU load averages: N/A N/A N/A
  32. CPU load per processor: 19.3% 12.8% 12.8% 12.8%
  33. Processes: 184, Threads: 2447
  34. PID %CPU %MEM VSZ RSS Name
  35. 0 100.0 0.0 64 KiB 8 KiB System Idle Process
  36. 5416 10.0 1.6 3.4 GiB 130.4 MiB java.exe
  37. 12676 8.8 1.3 2.1 GiB 104.9 MiB java.exe
  38. 11988 5.8 16.8 3.3 GiB 1.3 GiB idea64.exe
  39. 5312 4.4 1.3 2.0 TiB 101.4 MiB chrome.exe
  40. Sensors:
  41. CPU Temperature: 42.0°C
  42. Fan Speeds: [0]
  43. CPU Voltage: 0.0V
  44. Power: Charging
  45. System Battery @ 96.6%
  46. Disks:
  47. \\.\PHYSICALDRIVE0: (model: SanDisk SD7SN6S128G (标准磁盘驱动器) - S/N: 161416401094) size: 128.0 GB, reads: 1117123 (33.4 GiB), writes: 703948 (21.2 GiB), xfer: 2570354 ms
  48. |-- 磁盘 #0,分区 #0: GPT: Basic Data (GPT: 基本数据) Maj:Min=0:0, size: 471.9 MB @ F:\
  49. |-- 磁盘 #0,分区 #1: GPT: System (GPT: 系统) Maj:Min=0:1, size: 104.9 MB
  50. |-- 磁盘 #0,分区 #2: GPT: Basic Data (GPT: 基本数据) Maj:Min=0:2, size: 126.6 GB @ C:\
  51. |-- 磁盘 #0,分区 #3: GPT: Basic Data (GPT: 基本数据) Maj:Min=0:3, size: 845.2 MB @ G:\
  52. \\.\PHYSICALDRIVE1: (model: WDC WD10SPCX-24HWST1 (标准磁盘驱动器) - S/N: WD-WX31A86F35XC) size: 1.0 TB, reads: 379263 (6.0 GiB), writes: 103105 (2.6 GiB), xfer: 4014792 ms
  53. |-- 磁盘 #1,分区 #0: GPT: Basic Data (GPT: 基本数据) Maj:Min=1:0, size: 475.9 GB @ D:\
  54. |-- 磁盘 #1,分区 #1: GPT: Basic Data (GPT: 基本数据) Maj:Min=1:1, size: 524.3 GB @ E:\
  55. File System:
  56. File Descriptors: 0/0
  57. 本地固定磁盘 (F:) (Fixed drive) [NTFS] 436.1 MiB of 450.0 MiB free (96.9%) is \\?\Volume{9afc85a4-9f44-11e7-ab77-a5dc01376557}\ and is mounted at F:\
  58. 本地固定磁盘 (C:) (Fixed drive) [NTFS] 12.9 GiB of 117.9 GiB free (11.0%) is \\?\Volume{01a1a160-fbb4-49c7-be19-6dd52882bcbc}\ and is mounted at C:\
  59. 本地固定磁盘 (G:) (Fixed drive) [NTFS] 303.4 MiB of 806.0 MiB free (37.6%) is \\?\Volume{9afc85a5-9f44-11e7-ab77-a5dc01376557}\ and is mounted at G:\
  60. 本地固定磁盘 (D:) (Fixed drive) [NTFS] 161.8 GiB of 443.2 GiB free (36.5%) is \\?\Volume{a287f045-a9ac-4669-ab44-bdbd74692600}\ and is mounted at D:\
  61. 本地固定磁盘 (E:) (Fixed drive) [NTFS] 246.0 GiB of 488.3 GiB free (50.4%) is \\?\Volume{84c6da35-38e7-457e-b528-c12da6ed2898}\ and is mounted at E:\
  62. Network interfaces:
  63. Name: wlan0 (Microsoft Wi-Fi Direct Virtual Adapter)
  64. MAC Address: 84:ef:18:36:4c:ab
  65. MTU: 1500, Speed: 0 bps
  66. IPv4: []
  67. IPv6: [fe80:0:0:0:55ed:790e:b70:ea43]
  68. Traffic: received ?/?; transmitted ?/?
  69. Name: net2 (Microsoft Teredo Tunneling Adapter)
  70. MAC Address: 00:00:00:00:00:00:00:e0
  71. MTU: 1280, Speed: 100 Kbps
  72. IPv4: []
  73. IPv6: [2001:0:9d38:6ab8:2446:2d3f:34a2:86f5, fe80:0:0:0:2446:2d3f:34a2:86f5]
  74. Traffic: received 15 packets/2.2 KiB (0 err); transmitted 1580 packets/209.9 KiB (0 err)
  75. Name: eth7 (Realtek PCIe GBE Family Controller)
  76. MAC Address: 54:ee:75:b0:ed:33
  77. MTU: 1500, Speed: 0 bps
  78. IPv4: []
  79. IPv6: [fe80:0:0:0:d0:cff0:250f:34d0]
  80. Traffic: received ?/?; transmitted ?/?
  81. Name: wlan2 (Intel(R) Dual Band Wireless-AC 3165)
  82. MAC Address: 84:ef:18:36:4c:aa
  83. MTU: 1500, Speed: 72.2 Mbps
  84. IPv4: [172.16.3.132]
  85. IPv6: []
  86. Traffic: received 99670 packets/87.7 MiB (0 err); transmitted 68049 packets/14.9 MiB (0 err)
  87. Network parameters:
  88. Host name: Sindrol-NTB
  89. Domain name: Sindrol-NTB
  90. DNS servers: [202.106.0.20, 114.114.114.114]
  91. IPv4 Gateway: 172.16.3.254
  92. IPv6 Gateway: ::
  93. Displays:
  94. Display 0:
  95. Manuf. ID=BOE, Product ID=65d, Digital, Serial=00000000, ManufDate=1/2015, EDID v1.4
  96. 34 x 19 cm (13.4 x 7.5 in)
  97. Preferred Timing: Clock 141MHz, Active Pixels 1920x1080
  98. Manufacturer Data: 000000000000000000000000000000000000
  99. Unspecified Text: BOE HF
  100. Unspecified Text: NV156FHM-N42
  101. Display 1:
  102. Manuf. ID=AOC, Product ID=2476, Digital, Serial=00000319, ManufDate=5/2016, EDID v1.3
  103. 52 x 29 cm (20.5 x 11.4 in)
  104. Preferred Timing: Clock 148MHz, Active Pixels 1920x1080
  105. Range Limits: Field Rate 50-76 Hz vertical, 30-83 Hz horizontal, Max clock: 170 MHz
  106. Monitor Name: 2476WM
  107. Serial Number: E71G5BA000793
  108. USB Devices:
  109. Intel(R) USB 3.0 可扩展主机控制器 - 1.0 (Microsoft) (通用 USB xHCI 主机控制器)
  110. |-- USB 根集线器(USB 3.0) ((标准 USB 集线器))
  111. |-- Apple Mobile Device USB Driver (Apple, Inc.)
  112. |-- Apple iPhone (Apple Inc.)
  113. |-- USB Composite Device ((标准 USB 主控制器))
  114. |-- Lenovo EasyCamera (Bison)
  115. |-- USB Composite Device ((标准 USB 主控制器))
  116. |-- USB 输入设备 ((标准系统设备))
  117. |-- HID Keyboard Device ((标准键盘))
  118. |-- USB 输入设备 ((标准系统设备))
  119. |-- HID-compliant mouse (Microsoft)
  120. |-- 符合 HID 标准的供应商定义设备 ((标准系统设备))
  121. |-- 符合 HID 标准的用户控制设备 (Microsoft)
  122. |-- 符合 HID 标准的系统控制器 ((标准系统设备))
  123. |-- USB 输入设备 ((标准系统设备))
  124. |-- 符合 HID 标准的供应商定义设备 ((标准系统设备))
  125. |-- USB 输入设备 ((标准系统设备))
  126. |-- HID-compliant mouse (Microsoft)
  127. |-- 英特尔(R) 无线 Bluetooth(R) (Intel Corporation)

JAVA通过oshi获取系统和硬件信息的更多相关文章

  1. PowerShell 获取系统的硬件信息

    1.获取系统的BIOS的信息: Get-WMIObject -Class Win32_BIOS 2.获取内存信息: Get-WMIObject -Class Win32_PhysicalMemory ...

  2. Inxi:获取Linux系统和硬件信息的神器

    导读 在这篇文章里,我们将看到如何使用inxi来获取这些详情信息.在论坛技术支持中,它可以作为调试工具,迅速确定用户的系统配置和硬件信息. Inxi是一个可以获取完整的系统和硬件详情信息的命令行工具, ...

  3. System.getProperty()获取系统的配置信息

    原文地址:http://www.jsjtt.com/java/Javajichu/105.html 此处记录备用. 1. 通过System.getProperty()可以获取系统的配置信息,Syste ...

  4. Java System.getProperty("java.io.tmpdir") 获取系统临时目录

    System.getProperty("java.io.tmpdir") 是获取操作系统的缓存临时目录 在windows7中的目录是: C:\Users\登录用户~1\AppDat ...

  5. System.getProperty()获取系统的配置信息(系统变量)

    原文地址:http://www.jsjtt.com/java/Javajichu/105.html 此处记录备用. 1. 通过System.getProperty()可以获取系统的配置信息,Syste ...

  6. linux查看系统的硬件信息

    linux查看系统的硬件信息,并不像windows那么直观,这里我罗列了查看系统信息的实用命令,并做了分类,实例解说. cpu lscpu命令,查看的是cpu的统计信息. blue@blue-pc:~ ...

  7. linux查看系统的硬件信息【转】

    linux查看系统的硬件信息,并不像windows那么直观,这里我罗列了查看系统信息的实用命令,并做了分类,实例解说. cpu lscpu命令,查看的是cpu的统计信息. blue@blue-pc:~ ...

  8. python获取系统内存占用信息的实例方法

    psutil是一个跨平台库(http://code.google.com/p/psutil/),能够轻松实现获取系统运行的进程和系统利用率(包括CPU.内存.磁盘.网络等)信息.它主要应用于系统监控, ...

  9. C#获取当前主机硬件信息

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

随机推荐

  1. poj12482 扫描线+lazy-tag

    采用扫描线的思想,其实是区间更新的题目 题解链接https://blog.csdn.net/shiqi_614/article/details/7819232 注意处理细节:1)因为边框上的点不算,所 ...

  2. 性能测试四十:Mysql存储过程造数据

    性能测试是基于大量数据的,而进行性能测试之前肯定没那么多数据,所以就要自己准备数据 数据构造方法: 1.业务接口 -- 适合数据表关系复杂 -- 优点:数据完整性比较好2.存储过程 -- 适合表数量少 ...

  3. Redis、RabbitMQ、Memcached

    知识目录: Memcached Redis RabbitMQ Memcached 回到顶部 Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中 ...

  4. 获取更新元素文本html()

    html() 方法,获取元素文本,包含元素标签,也可以设置元素的文本值(包含元素标签),还可以包含子元素标签.相当于JavaScript中的innerHTML. <!DOCTYPE html&g ...

  5. ERP商品类型管理相关业务处理(三十五)

    根据类型编号获取父类名称 -- ============================================= CREATE FUNCTION [dbo].[FN_getParentTyp ...

  6. C#对Windows文件/文件夹/目录的一些操作总结

    1.   在一个目录下创建一个文件夹 if (!System.IO.Directory.Exists(path)) System.IO.Directory.CreateDirectory(path); ...

  7. 项目的整体框架,以及Topology的设计

    一:说明 1.项目的整体框架 2.Topology的设计 3.记录 0. 89.201.10.122 - - [1528033390201] "GET /edit.php HTTP/1.1& ...

  8. 洛谷 P1141【BFS】+记忆化搜索+染色

    题目链接:https://www.luogu.org/problemnew/show/P1141 题目描述 有一个仅由数字 0 与 1 组成的n×n 格迷宫.若你位于一格0上,那么你可以移动到相邻 4 ...

  9. 002.AnyCast技术浅析

    一      常见通信方式 1.1  UniCastAnyCast UniCast,即单播,指网络中一个节点与另一个节点之间需要建立一个单独的数据通道,从一个节点发出的信息只被一个节点收到,这种传送方 ...

  10. Session丢失的解决方法

    1.修改配置文件 <sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:4 ...