BoxLang 🚀 A New JVM Dynamic Language Learn More...
|:------------------------------------------------------: |
| ⚡︎ B o x L a n g ⚡︎
| Dynamic : Modular : Productive
|:------------------------------------------------------: |
Copyright Since 2023 by Ortus Solutions, Corp
www.boxlang.io | www.ortussolutions.com
Â
This module is based on the great work of the oshi
library https://github.com/oshi/oshi?tab=readme-ov-file#documentation.
You can use this module to get information about the Operating System
and Hardware of the machine you are running on. This is a great way
to even get sensor information or embedded system information like
battery, raspberry pi, etc.
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.
Here are the contributed functions in this module:
getSystemInfo()
: Get's the main entry point for the
OSHI system: https://www.oshi.ooo/oshi-core-java11/apidocs/com.github.oshi/oshi/SystemInfo.htmlgetOperatingSystem()
: Get's the Operating System
information: https://www.oshi.ooo/oshi-core-java11/apidocs/com.github.oshi/oshi/software/os/OperatingSystem.htmlgetHardware()
: Get's the Hardware information: https://www.oshi.ooo/oshi-core-java11/apidocs/com.github.oshi/oshi/hardware/HardwareAbstractionLayer.htmlThe following are also contributed functions provided by convenience:
getCpuUsage( [interval] )
: Gets the CPU usage of the
system with a custom intervalgetFreeSpace( path )
: Gets the free space of a drivegetTotalSpace( path )
: Gets the total space of a drivegetSystemFreeMemory()
: Gets the free memory of the
operating systemgetSystemTotalMemory()
: Gets the total memory of the
operating systemgetJVMFreeMemory()
: Gets the free memory of the JVMgetJVMTotalMemory()
: Gets the total memory of the JVMIn order to leverage ini files, you can install the
bx-ini
module, which provides a fluent API to work with
ini files. The ini file format is a simple key-value pair format that
allows you to store configuration settings in a human-readable format.
BoxLang is a professional open-source project and it is completely funded by the community and Ortus Solutions, Corp. Ortus Patreons get many benefits like a cfcasts account, a FORGEBOX Pro account and so much more. If you are interested in becoming a sponsor, please visit our patronage page: https://patreon.com/ortussolutions
"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" Jn 14:1-12
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
enabled
flag in the config fileini
features from the module to the bx-ini
module
$
box install bx-oshi