https://github.com/sile/sysinfojson
Command-line tool that displays system information collected using `sysinfo` crate in JSON format
https://github.com/sile/sysinfojson
command-line json rust system-information
Last synced: 5 months ago
JSON representation
Command-line tool that displays system information collected using `sysinfo` crate in JSON format
- Host: GitHub
- URL: https://github.com/sile/sysinfojson
- Owner: sile
- License: mit
- Created: 2024-09-21T11:49:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-21T12:31:21.000Z (almost 2 years ago)
- Last Synced: 2025-08-18T23:14:59.402Z (11 months ago)
- Topics: command-line, json, rust, system-information
- Language: Rust
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
sysinfojson
===========
[](https://crates.io/crates/sysinfojson)
[](https://github.com/sile/sysinfojson/actions)

Command-line tool that displays system information collected using [sysinfo] crate in JSON format.
[sysinfo]: https://crates.io/crates/sysinfo
```console
// Install.
$ cargo install sysinfojson
// Print help.
$ sysinfojson -h
Command-line tool that displays system information collected using `sysinfo` crate in JSON format
Usage: sysinfojson
Commands:
system Displays system information
process Displays process information
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
// Display system information (all).
$ sysinfojson system | jq . | head -10
{
"cpu": {
"cpus": [
{
"brand": "Apple M1 Max",
"cpu_usage": 63.6363639831543,
"frequency": 3228,
"name": "1",
"vendor_id": "Apple"
},
// Display system information (memory only).
$ sysinfojson system memory | jq .
{
"memory": {
"available_memory": 38833061888,
"total_memory": 68719476736,
"total_swap": 0,
"used_memory": 33337425920,
"used_swap": 0
}
}
// Display process information (PID: 1).
$ sysinfojson process 1 | jq .
{
"cmd": [],
"cpu_usage": 0,
"cwd": null,
"disk_usage": {
"read_bytes": 0,
"total_read_bytes": 0,
"total_written_bytes": 0,
"written_bytes": 0
},
"effective_group_id": null,
"effective_user_id": null,
"environ": [],
"exe": "/sbin/launchd",
"group_id": null,
"memory": 0,
"name": "launchd",
"parent": null,
"root": null,
"run_time": 0,
"session_id": 1,
"start_time": 0,
"status": "Unknown",
"tasks": null,
"thread_kind": null,
"user_id": null,
"virtual_memory": 0
}
```