![OSHI](https://dl.dropboxusercontent.com/s/c82qboyvvudpvdp/oshilogo.png)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Maven Central](https://img.shields.io/maven-central/v/com.github.oshi/oshi-core.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.github.oshi%22%20AND%20a:%22oshi-core%22)
[![first-timers-only](https://img.shields.io/badge/first--timers--only-friendly-blue.svg?style=flat-square)](https://www.firsttimersonly.com/)
[![Openhub Stats](https://www.openhub.net/p/oshi/widgets/project_thin_badge.gif)](https://www.openhub.net/p/oshi?ref=github)
OSHI is a free JNA-based (native) Operating System and Hardware Information library for Java.
It does not require the installation of any additional native libraries and aims to provide a
cross-platform implementation to retrieve system information, such as OS version, processes,
memory and CPU usage, disks and partitions, devices, sensors, etc.
Supported platforms
---------------------------
Windows • Linux • macOS • Unix (AIX, FreeBSD, OpenBSD, Solaris)
Downloads and Dependency Management
-----------------------------------
Stable Release Version
* JDK8: [oshi-core-6.2.1](https://search.maven.org/artifact/com.github.oshi/oshi-core/6.2.1/jar)
* JPMS: [oshi-core-java11-6.2.1](https://search.maven.org/artifact/com.github.oshi/oshi-core-java11/6.2.1/jar)
* JDK6: [oshi-core-3.14.0](https://search.maven.org/artifact/com.github.oshi/oshi-core/3.14.0/jar)
Current Development (SNAPSHOT) downloads
* JDK8: [oshi-core-6.2.2-SNAPSHOT](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.github.oshi&a=oshi-core&v=6.2.2-SNAPSHOT&e=jar)
* JPMS: [oshi-core-java11-6.2.2-SNAPSHOT](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.github.oshi&a=oshi-core-java11&v=6.2.2-SNAPSHOT&e=jar)
Documentation
-------------
* [API](https://oshi.github.io/oshi/oshi-core/apidocs/) (javadocs)
* [FAQ](./FAQ.md)
* [Change Log](https://github.com/oshi/oshi/blob/master/CHANGELOG.md)
* [Performance Considerations](./Performance.md)
* [Major Version Breaking Changes](./Upgrading.md)
* [Sample Output](./SampleOutput.md)
* [Applications and Projects using OSHI](./Projects.md)
Usage
-----
1. Include OSHI and its dependencies on your classpath. We strongly recommend you add OSHI as a dependency to your project dependency manager such as Maven or Gradle.
2. Create a new instance of `SystemInfo`
3. Use the getters from `SystemInfo` to access hardware or operating system components, such as:
```java
SystemInfo si = new SystemInfo();
HardwareAbstractionLayer hal = si.getHardware();
CentralProcessor cpu = hal.getProcessor();
```
See [SystemInfoTest.java](https://github.com/oshi/oshi/blob/master/oshi-core/src/test/java/oshi/SystemInfoTest.java) for examples. To see sample output for your machine:
```sh
git clone https://github.com/oshi/oshi.git && cd oshi
./mvnw test-compile -pl oshi-core exec:java \
-Dexec.mainClass="oshi.SystemInfoTest" \
-Dexec.classpathScope="test"
```
Some settings are configurable in the [`oshi.properties`](https://github.com/oshi/oshi/blob/master/oshi-core/src/main/resources/oshi.properties) file, which may also be manipulated using the [`GlobalConfig`](https://oshi.github.io/oshi/oshi-core/apidocs/oshi/util/GlobalConfig.html) class. This should be done at startup, as configuration is not thread-safe and OSHI does not guarantee re-reading the configuration during operation.
The `oshi-demo` artifact includes [several proof-of-concept examples](https://github.com/oshi/oshi/blob/master/oshi-demo/src/main/java/oshi/demo/) of using OSHI to obtain information, including a basic Swing GUI.
Supported features
------------------
* Computer System and firmware, baseboard
* Operating System and Version/Build
* Physical (core) and Logical (hyperthreaded) CPUs, processor groups, NUMA nodes
* System and per-processor load, usage tick counters, interrupts, uptime
* Process uptime, CPU, memory usage, user/group, command line args, thread details
* Physical and virtual memory used/available
* Mounted filesystems (type, usable and total space, options, reads and writes)
* Disk drives (model, serial, size, reads and writes) and partitions
* Network interfaces (IPs, bandwidth in/out), network parameters, TCP/UDP statistics
* Battery state (% capacity, time remaining, power usage stats)
* USB Devices
* Connected displays (with EDID info), graphics and audio cards
* Sensors (temperature, fan speeds, voltage) on some hardware
Support
-------
* For bug reports, feature requests, or general questions about OSHI's longer term plans, please [create an issue](https://github.com/oshi/oshi/issues).
* For help integrating OSHI into your own project or maintainer code review of your PRs, tag `@dbwiddis` in issues or pull requests on your project site.
* For "how to" questions regarding use of the API, consult examples in the `oshi-demo` project, create an issue, or [search on Stack Overflow](https://stackoverflow.com/search?q=%5Boshi%5D+is%3Aquestion) using the `oshi` tag, asking a new question if it hasn't been answered before.
* To say thanks to OSHI's primary maintainer, you can [sponsor him](https://github.com/sponsors/dbwiddis) or [buy him a coffee](https://www.buymeacoffee.com/dbwiddis).
OSHI for enterprise
-------------------
Available as part of the Tidelift Subscription [![Tidelift](https://tidelift.com/badges/package/maven/com.github.oshi:oshi-core)](https://tidelift.com/subscription/pkg/maven-com-github-oshi-oshi-core?utm_source=maven-com-github-oshi-oshi-core&utm_medium=referral&utm_campaign=readme)
The maintainers of OSHI and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/maven-com-github-oshi-oshi-core?utm_source=maven-com-github-oshi-oshi-core&utm_medium=referral&utm_campaign=readme)
Security contact information
----------------------------
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security).
Tidelift will coordinate the fix and disclosure.
Continuous Integration Test Status
----------------------------------
[![Travis Build Status](https://api.travis-ci.com/oshi/oshi.svg?branch=master)](https://travis-ci.com/github/oshi/oshi)
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/v489i8xoyfspxx7s?svg=true)](https://ci.appveyor.com/project/dbwiddis/oshi)
[![Cirrus Build Status](https://api.cirrus-ci.com/github/oshi/oshi.svg)](https://cirrus-ci.com/github/oshi/oshi)
[![Windows CI](https://github.com/oshi/oshi/workflows/Windows%20CI/badge.svg)](https://github.com/oshi/oshi/actions?query=workflow%3A%22Windows+CI%22)
[![macOS CI](https://github.com/oshi/oshi/workflows/macOS%20CI/badge.svg)](https://github.com/oshi/oshi/actions?query=workflow%3A%22macOS+CI%22)
[![Linux CI](https://github.com/oshi/oshi/workflows/Linux%20CI/badge.svg)](https://github.com/oshi/oshi/actions?query=workflow%3A%22Linux+CI%22)
[![FreeBSD CI](https://github.com/oshi/oshi/workflows/FreeBSD%20CI/badge.svg)](https://github.com/oshi/oshi/actions?query=workflow%3A%22FreeBSD+CI%22)
[![OpenBSD CI](https://github.com/oshi/oshi/workflows/OpenBSD%20CI/badge.svg)](https://github.com/oshi/oshi/actions?query=workflow%3A%22OpenBSD+CI%22)
[![Solaris CI](https://github.com/oshi/oshi/workflows/Solaris%20CI/badge.svg)](https://github.com/oshi/oshi/actions?query=workflow%3A%22Solaris+CI%22)
[![AIX CI](https://github.com/oshi/oshi/workflows/AIX%20CI/badge.svg)](https://github.com/oshi/oshi/actions?query=workflow%3A%22AIX+CI%22)
[![SonarQube Bugs](https://sonarcloud.io/api/project_badges/measure?project=oshi_oshi&
没有合适的资源?快使用搜索试试~ 我知道了~
OSHI 是一个免费的基于 JNA(本机)的 Java 操作系统和硬件信息库_java_代码_下载
共614个文件
java:482个
png:56个
xml:17个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 14 浏览量
2022-07-04
15:02:23
上传
评论
收藏 2.67MB ZIP 举报
温馨提示
OSHI 是一个免费的基于 JNA(本机)的 Java 操作系统和硬件信息库。它不需要安装任何额外的本地库,旨在提供跨平台实现来检索系统信息,例如操作系统版本、进程、内存和 CPU 使用率、磁盘和分区、设备、传感器等。
资源推荐
资源详情
资源评论
收起资源包目录
OSHI 是一个免费的基于 JNA(本机)的 Java 操作系统和硬件信息库_java_代码_下载 (614个子文件)
mvnw.cmd 7KB
.editorconfig 667B
jppf.gif 4KB
hdl.gif 3KB
.gitattributes 483B
.gitignore 156B
ParseUtil.java 53KB
ParseUtilTest.java 34KB
CentralProcessor.java 31KB
LinuxOperatingSystem.java 26KB
WindowsOperatingSystem.java 23KB
WindowsCentralProcessor.java 23KB
WindowsPowerSource.java 23KB
OperatingSystemTest.java 22KB
WindowsOSProcess.java 22KB
LinuxCentralProcessor.java 21KB
MacHWDiskStore.java 20KB
ProcessStat.java 18KB
WindowsHWDiskStore.java 17KB
OperatingSystem.java 17KB
AbstractCentralProcessor.java 17KB
SystemInfoTest.java 17KB
OSProcess.java 16KB
SolarisLibc.java 16KB
HkeyPerformanceDataUtil.java 16KB
OpenBsdOSProcess.java 16KB
SolarisCentralProcessor.java 16KB
LinuxHWDiskStore.java 16KB
KstatUtil.java 16KB
FileUtil.java 16KB
MacOSProcess.java 15KB
InternetProtocolStats.java 15KB
FreeBsdCentralProcessor.java 15KB
MacUsbDevice.java 15KB
LinuxOSProcess.java 15KB
FreeBsdOSProcess.java 15KB
MacCentralProcessor.java 14KB
WmiUtil.java 14KB
MacInternetProtocolStats.java 14KB
WindowsFileSystem.java 13KB
MacFileSystem.java 13KB
OpenBsdCentralProcessor.java 13KB
NetworkIF.java 13KB
SolarisOSProcess.java 13KB
WindowsInternetProtocolStats.java 12KB
WmiQueryHandler.java 12KB
AixOSProcess.java 12KB
LinuxFileSystem.java 12KB
PerfCounterWildcardQuery.java 11KB
PerfmonDriversTest.java 11KB
LogicalProcessorInformation.java 11KB
ThreadPerformanceData.java 11KB
MacOperatingSystem.java 11KB
PsInfo.java 11KB
CLibrary.java 11KB
FileUtilTest.java 11KB
SolarisOperatingSystem.java 11KB
AbstractPowerSource.java 11KB
PsInfo.java 11KB
LinuxPowerSource.java 11KB
MacPowerSource.java 11KB
PerfCounterQuery.java 11KB
NetStat.java 11KB
MemoizerTest.java 11KB
WindowsSensors.java 11KB
AbstractNetworkIF.java 10KB
LinuxUsbDevice.java 10KB
SolarisComputerSystem.java 10KB
ProcessPerformanceData.java 10KB
PerfDataUtil.java 10KB
AixOperatingSystem.java 10KB
EdidUtil.java 10KB
CentralProcessorTest.java 10KB
SmcUtil.java 9KB
FreeBsdUsbDevice.java 9KB
LinuxNetworkIF.java 9KB
SolarisUsbDevice.java 9KB
InternetProtocolStatsTest.java 9KB
SolarisFileSystem.java 9KB
FreeBsdOperatingSystem.java 9KB
FormatUtil.java 9KB
WindowsGlobalMemory.java 9KB
AixCentralProcessor.java 9KB
LinuxSensors.java 9KB
AbstractOperatingSystem.java 9KB
AixFileSystem.java 9KB
ProcessPanel.java 9KB
OpenBsdHWDiskStore.java 9KB
OpenBsdOperatingSystem.java 9KB
OpenBsdUsbDevice.java 9KB
WindowsLogicalVolumeGroup.java 8KB
ProcessorInformation.java 8KB
FormatUtilTest.java 8KB
SessionWtsData.java 8KB
SolarisHWDiskStore.java 8KB
ProcessWtsData.java 8KB
OpenBsdFileSystem.java 8KB
DeviceTree.java 8KB
WindowsNetworkIF.java 8KB
WMIDriversTest.java 8KB
共 614 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Screenshot_20240522_084328_com.tencent.mm.jpg
- 附件计算机专业课选课说明-1.xlsx
- 基于TypeScript的ahousepet-admin-web管理系统设计源码
- 《广东开放大学学习指引》期末考核要求0522.zip
- mkl-2021.1.1-py2.py3-none-macosx-10-15-x86-64.whl
- mkl-2018.0.3-py2.py3-none-manylinux1-x86-64.whl
- halcon实现两幅图像相减
- mkl-2021.3.0-py2.py3-none-manylinux1-x86-64.whl
- IAR9.3主题配置,包含字体颜色等
- 才从简来.apk
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功