https://github.com/kamilszewc/resourcewatcher
Simple to use JVM library for watching Linux/Windows/Mac resources like memory, disk space, etc.
https://github.com/kamilszewc/resourcewatcher
hardware java jvm linux macos resources windows
Last synced: 6 months ago
JSON representation
Simple to use JVM library for watching Linux/Windows/Mac resources like memory, disk space, etc.
- Host: GitHub
- URL: https://github.com/kamilszewc/resourcewatcher
- Owner: kamilszewc
- License: apache-2.0
- Created: 2021-02-05T17:04:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-15T20:51:29.000Z (over 1 year ago)
- Last Synced: 2025-03-15T21:34:21.028Z (over 1 year ago)
- Topics: hardware, java, jvm, linux, macos, resources, windows
- Language: Java
- Homepage:
- Size: 477 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Resource Watcher
## General
Simple to use JVM library for watching linux/windows/mac resources like cpu-usage, memory, disk space, etc.
The library is written in Java and tested with Spock framework.
It was tested with:
- Ubuntu 18.04, 20.04, 22.04, 22.10, 23.04, 23.10, 24.04
- Debian 12, 13
- OpenSUSE 15
- Fedora 37
- MacOS 12, 13, 14
- Windows 10, 11
## Installation
The compiled libraries are deployed to Maven Central.
Usage with maven:
```xml
io.github.kamilszewc
resourcewatcher
5.16
```
Usage with gradle:
```groovy
implementation 'io.github.kamilszewc:resourcewatcher:5.16'
```
## Usage
Example in Java:
```java
ResourceWatcher resourceWatcher = ResourceWatcherFactory.create();
DiskWatcher diskWatcher = resourceWatcher.getDiskWatcher();
Memory memory = diskWatcher.getFreePartitionSpace("/");
Long sizeInMB = memory.MB();
```