adamantite 0.1.4

Cli tool to provide system resource utilization for Hytale server owners
adamantite-0.1.4 is not a library.

Adamantite

Adamantite is a current work in progress.

What it will do

Adamantite is currently a command line tool similar to htop and top. It will provide a digestable overlook on how much system resources is being consumed by Hytale and its processes.

Why?

My reasoning for building this tool is because I wanted to learn rust. But also I host my own hytale server and at one point my server was lagging and attempting to use htop to figure out why was difficult.So I thought I wish there was a way that I could get a high level overview on how Hytale and its processes are performing on your system.

Usage Currently

If you are interested in cloning this repo and attempting to run this program I'll go over this now.

Installation methods

There is binary realeses for linux, you can clone this repo, or run

cargo install adamantite

If you clone this repo you can do the following

$ cargo run -- [OPTIONS] --system-resource <SYSTEM_RESOURCE>
Usage: adamantite [OPTIONS] --system-resource <SYSTEM_RESOURCE>

Options:
  -s, --system-resource <SYSTEM_RESOURCE>
  -t, --time-seconds <TIME_SECONDS>        [default: 1]
  -h, --help                               Print help
  -V, --version                            Print version

There are three system resources that you can monitor for x seconds:

  • cpu
  • mem
  • net

These are cpu, memory, or network(as in the traffic).

As of now, running the command where x is seconds

cargo run -- -s cpu -t x 

Output example:

Project Screenshot

This command will return to you the average number of cores being used by hytale. Adamantite will also provide the average cpu cores your system is using so you have a refrence on how hytale is performing compared to the rest of your system.

This command will lastly provide the average cpu load your entire system experineced over x seconds.

Example command:

$ cargo run -- -s mem -t 5

Output would look like this Project Screenshot

This command will provide the average memory usage in gigabytes over x seconds. It will also provide the average memory usage in gigabytes as well for the entire system over x seconds.

For the rest of the output, adamantite will provide average memory usage as a percentage for hytale, your entire system including hytale, and your entire system excluding hytale as well.

What is being worked and plans for future

Maybe might be possible to use previous runs of commands and compare them with other runs. Say you ran the adamantite to track hytale's memory usage over 5 seconds while the system was idle. Now say you want to compare that when you have three people in your server. I was thinking you provide two outputs from the command and compare them.Might be cool to see how hytale performance differs.

Say we track 5 seconds of cpu usage from Hytale and its processes. We need to follow Hytale's logs that it produces at that same time.

There are two possible routes and probably more to do this but these are what came to my mind first.

We can go the concurrency route where we instantiate two threads, one thread to get Hytales cpu usage and another thread to parse Hytale logs.

If not concurrency, I looked into using journalctl. So once we get the cpu usage for those 5 seconds we just pass arguments to journalctl to show me Hytale's logs for the last 5 seconds and parse it from there

AI ?

Currently no AI generated code.