Crates.io | hegemon |
lib.rs | hegemon |
version | 0.1.0 |
source | src |
created_at | 2018-09-22 05:53:19.014644 |
updated_at | 2018-09-22 05:53:19.014644 |
description | A modular system monitor |
homepage | |
repository | https://github.com/p-e-w/hegemon |
max_upload_size | |
id | 85945 |
size | 99,630 |
Hegemon is a work-in-progress modular system monitor written in safe Rust.
Currently, it has the following features:
Planned features include:
Hegemon is built around the excellent chan, termion, systemstat, and sensors crates.
Hegemon is currently Linux only and requires Rust 1.26 or later and the
development files for libsensors.
The latter can be found in the package repository of every major Linux distribution,
e.g. lm_sensors-devel
in Fedora and libsensors4-dev
in Ubuntu.
Once these requirements are met, you can install Hegemon with
$ cargo install hegemon
Unlike traditional system monitors such as top
, which are tailor-made
to display specific metrics like CPU and memory usage only, Hegemon shows
the output of monitoring modules called data streams, whose behavior is
defined by the Stream
trait.
Streams only need to supply basic properties such as name and description, and a method for retrieving a numeric data value. Everything else is managed by Hegemon, including update scheduling, layout and rendering, adaptive scaling, and computation of statistics.
Stream
objects are in turn generated by StreamProvider
s.
This makes it possible to have streams whose exact nature and number can only
be determined at runtime, such as one stream per CPU core.
Adding new streams, then, involves the following steps:
StreamProvider
Stream
objects from its streams
methodproviders/mod.rs
The providers
directory contains several working provider
implementations that can be used as a reference. In particular, most providers
will want to use the Stream::new
helper function to create streams
instead of manually implementing the Stream
trait.
Ideas for, and implementations of, additional data streams are very welcome!
Copyright © 2018 Philipp Emanuel Weidmann (pew@worldwidemann.com)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
By contributing to this project, you agree to release your contributions under the same license.