Giter Club home page Giter Club logo

zenith's Introduction

Zenith

In terminal graphical metrics for your *nix system written in Rust

Running zenith on alacritty on MacOS

Features

  • Optional CPU, Memory, Network, and Disk usage charts
  • Quick glances at Disk free space, NIC IP addresses, CPU frequency
  • Highlight top users of CPU, Memory, & Disk
  • Battery percentage, time to charge or discharge, power used
  • A top-like filterable process table that includes per process disk usage
  • Change process priority
  • Zoomable chart views (with support to scroll back in time)
  • Managing processes with signals
  • Performance data saved between runs
  • GPU Utilization Metrics for NVIDIA GPUs (with --features nvidia), including per-process GPU usage
  • Disk free space charts
  • Delay accounting (on Linux when running zenith with root permissions)

zenith running on linux in iTerm2

Planned Features

  • CPU steal percentage and general virtualization awareness
  • Sensor Temperature charts
  • Per process network usage (Linux)
  • Messaging about adverse system events, like errors in kernel ring buffer (Linux)
  • Docker support
  • ZFS (pool status)
  • GPU utilization metrics for AMD GPUS
  • Disk metrics like IO ops / latency
  • Support Memory pressure

Current Platforms

  • Linux
  • MacOS

Planned Platforms

  • BSD (OpenBSD/FreeBSD)
  • Perhaps Redox OS.

Installation

Packaging status

Binary

Download one of the compiled releases.

Debian/Ubuntu based Linux distributions (64-bit)

The latest 64-bit deb packages are available here and require distributions based on Debian >= 9 or Ubuntu >= 16.04

You can also install and update the .deb packages we publish in our GitHub releases page using deb-get. First install deb-get using these commands in a terminal:

sudo apt install curl
curl -sL https://raw.githubusercontent.com/wimpysworld/deb-get/main/deb-get | sudo -E bash -s install deb-get

Then install zenith using the following command in terminal:

deb-get install zenith

Once zenith is installed it can be kept upto date using:

deb-get update
deb-get upgrade

Arch Linux

zenith is available in the extra repository and can be installed with pacman:

pacman -S zenith

There are also packages available in the AUR: zenith-git and zenith-bin

The zenith-bin package uses the deb package mentioned in previous section and can be used to avoid building the package from source. The first two depend on rust/cargo and it is recommended to install the rustup package from AUR instead of the rust package from official repositories. This allows for easy installation of rust components as per what rust officially documents. You will need to install a toolchain separately with rustup so use something like:

yay -S rustup
rustup toolchain install stable
rustup default stable

Change the 'stable' toolchain above to beta/nightly/... if you have some specific preference. After this install the preferred AUR package: yay -S zenith-git (will track the latest git revision)

Homebrew

brew install zenith

Cargo

cargo install --git https://github.com/bvaisvil/zenith.git

For NVIDIA GPU support, install with feature nvidia:

cargo install --features nvidia --git https://github.com/bvaisvil/zenith.git

Building

Prerequisites

Building requires rust version >= 1.40 and libclang development packages.

Rust:

Install from your preferred package manager or preferrably use rustup.rs

Clang development packages:

  • Ubuntu/Debian: sudo apt-get install libclang-dev
  • CentOS/RHL/Fedora sudo [yum/dnf] install clang

Zenith builds under rustc version >= 1.40.0.

cd zenith
cargo build --release

For NVIDIA GPU support, build with feature nvidia:

cargo build --release --features nvidia

The minimum supported NVIDIA driver version is 418.56

There is also a Makefile that detects the presence of NVIDIA driver on the current system and builds the appropriate flavor on Linux.

make && sudo make install

If for some reason the Makefile incorrectly detects NVIDIA driver installation or in case of a broken installation (e.g. libnvidia-ml.so.1 present but no libnvidia-ml.so) then explicitly skip it using the base target:

make base && sudo make install

The default installation path is /usr/local so make install requires root privileges above. To install in a custom location use PREFIX like below:

make && make install PREFIX=$HOME/zenith

There is also an 'all' target in the Makefile that will build both the flavors on Linux, if NVIDIA driver is detected, and 'make install' will then copy a wrapper 'zenith' script that chooses the appropriate binary at runtime.

Static build

The make file provides for building fully static versions on Linux against the musl C library. It requires musl-gcc to be installed on the system. Install "musl-tools" package on debian/ubuntu derivatives, "musl-gcc" on fedora and equivalent on other distributions from their standard repos.

Use the target "linux-static" to build it. This will create a tarball containing the executable accompanied with file containing sha256 sum.

NVIDIA drivers normally do not ship with static versions of the libraries, so the static build skips that configuration. However, if you somehow get hold of static NVIDIA libraries or are okay for dynamic linking for that executable, then you can explicitly set the BUILD_NVIDIA flag to true:

make linux-static BUILD_NVIDIA=true

Building with NVIDIA support in a virtual environment

If one needs to build with NVIDIA support in a virtual environment, then it requires some more setup since typically the VM software is unable to directly expose NVIDIA GPU. Unlike the runtime zenith script, the Makefile has been setup to detect only the presence of required NVIDIA libraries, so it is possible to build with NVIDIA support even when without NVIDIA GPU.

Install the nvidia driver package as per the distribution recommended way. For example in Ubuntu < 18.04 add the NVIDIA PPA (https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa) and install the nvidia-430 package. For newer versions install nvidia-driver-440/450 package.

After that disable the actual use of the driver using "sudo prime-select intel". Then while building with Makefile you will need to explicitly add the NVIDIA library path to LD_LIBRARY_PATH. For instance on Ubuntu and derivatives, something like:

  export LD_LIBRARY_PATH=/usr/lib/nvidia-430
  make && sudo make install

Building deb package

Debian package support is present in the source tree. Install devscripts package and use standard options like "debuild -b -uc -us" to build an unsigned deb package in the directory above. In a virtual environment build, LD_LIBRARY_PATH can be explicitly set like:

debuild -eLD_LIBRARY_PATH=/usr/lib/nvidia-430 -b -uc -us

Cargo can be installed from the repositories or the standard rustup way. Latter would be normally recommended if one needs to do anything more than just building in a virtual environment. For that case $HOME/.cargo/bin should be in PATH and mark PATH so that debuild does not sanitize it:

debuild -ePATH -eLD_LIBRARY_PATH=/usr/lib/nvidia-430 -b -uc -us

Clean up using "./debian/rules clean" rather than "make clean" to clear debian build files too.

Usage

Running with no arguments starts zenith with the default visualizations for CPU, Disk, and Network and a refresh rate of 2000 ms (2 seconds). These can be changed with command line parameters:

    zenith [FLAGS] [OPTIONS]

FLAGS:
        --disable-history    Disables history when flag is present
    -h, --help               Prints help information
    -V, --version            Prints version information

OPTIONS:
    -c, --cpu-height <INT>        Min Percent Height of CPU/Memory visualization. [default: 17]
        --db <STRING>             Database to use, if any. [default: ~/.zenith]
    -d, --disk-height <INT>       Min Percent Height of Disk visualization. [default: 17]
    -n, --net-height <INT>        Min Percent Height of Network visualization. [default: 17]
    -p, --process-height <INT>    Min Percent Height of Process Table. [default: 32]
    -r, --refresh-rate <INT>      Refresh rate in milliseconds. [default: 2000]
    -g, --graphics-height <INT>   Min Percent Height of Graphics Card visualization. [default: 17]

The graphics-height option only applies when NVIDIA GPU support has been enabled.

Don't want a section? Remove it by setting the height to 0.

For example: zenith -c 0 removes the CPU chart.

Up/down arrow keys move around the process table. Return (enter) will focus on a process. Tab switches the active section. Active sections can be expanded (e) and minimized (m). +/- (or =/-) will zoom in / out all of the charts. Arrow keys (←/→) move forward/backward in time. Back tick (`) resets the chart to current time and max zoom. Using these options you can create the layout you want.

In zenith 'h' key will show this help:

Running zenith on iTerm2 on MacOS

Built using these great crates

zenith's People

Contributors

alexmaco avatar bvaisvil avatar davidrusu avatar felixonmars avatar j2ghz avatar macmv avatar manithree avatar milescranmer avatar noyez avatar orhun avatar samoylovfp avatar sumwale avatar svenstaro avatar takov751 avatar tph5595 avatar vladimyr avatar vojtechstep avatar wezm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zenith's Issues

Zenith does not start

What happens

Zenith launches to a blank screen and appears to hang. No information is shown. No response to ^C or ^D.

I tried using --disable-history, but it didn't change anything.

System Info

Version: 0.7.7
Distro: Arch Linux 5.5.13-zen2-1-zen
Terminals: Kitty, Alacritty, Konsole

$ hwinfo --short
cpu:
                       AMD Ryzen 7 1700X Eight-Core Processor, 2770 MHz
graphics card:
                       ATI RX Vega64
storage:
                       Samsung Electronics NVMe SSD Controller SM961/PM961
                       ASRock In Fatal1ty X370 Professional Gaming
                       AMD FCH SATA Controller [AHCI mode]
network:
  enp37s0              Intel I211 Gigabit Network Connection
  wlp36s0              Intel Dual Band Wireless-AC 7265

Long startup times due to 12GB database

When using zenith like I use bottom and let it run 24/7, I noticed that every morning the program seems to have aborted (without removing the lock).

That alone I was willing to ignore, but recently zenith didn't seem to startup anymore while using a lot of CPU and disk input.

When looking at the ~/.zenith folder, I saw this:

Screenshot 2020-03-22 at 20 54 13

This looks very familiar to me - it's a sled database. It will take a long time to open big databases, and depending on the way data is accessed, this included quite a sizeable amount of RAM usage.

Starting it with zenith --disable-history resolved the startup problem

Meta

$ zenith --version
zenith 0.7.5

Tested on MacOS 10.15.3

PIDs can have more than 5 digits on Linux

On newer Linux kernels PIDs can have more than five digits:

$ ps ax -o pid | sort -n | tail -n 3
 671590
 671591
 671592
$ uname -sr
Linux 5.5.10-arch1-1

When they do, the PID and USER columns are no longer separated by a space in zenith.

ZFS pool is not shown in Disks section

My system has an NVMe system disk and a ZFS pool of 3 SSDs that is mounted as /home. Only the partitions from the NVMe drive appear:

┌Disks───────────────────────┐
│9.52%(!): /                 │
│84.71%: /boot               │
│                            │
│                            │
│                            │
│                            │
│                            │
│                            │
└────────────────────────────┘

Other tools detect it, for example ytop:

┌ Disk Usage ────────────────────────────┐
│Partiti Mount   Used  Free     R/s      │
│nvme0n1 /boot    15%  254 MiB  0 bytes  │
│nvme0n1 /        90%  43.3 GiB 2 bytes  │
│zhome   /home    66%  151 GiB  0 bytes  │
│                                        │
│                                        │
│                                        │
│                                        │
│                                        │
│                                        │
│                                        │
└────────────────────────────────────────┘

Remove sled as dependency

Sled was originally being used to store the chart data between zenith sessions. However, there were some issues with amount of space the database used. Right now it exists only to migrate existing databases. However, I want to remove it for 0.9.0 release.

Add grace period for process selection after input

htop has a very useful feature: when the process list is ordered by a column, the list is re-sorted at every tick. However, this can make selecting a process surprising, since in the small window between deciding to hit enter and the keypress coming thru, a list reorder may happen, and the process that is actually selected is not the one the user had highlighted with the intent to do so.

What htop does is add a grace period after any selection input in the process list (up/down arrow for zenith). For a period of time after the user has changed selection (a few seconds, but at least one or two ticks in wall-clock time), the values for processes are updated, but the list does not get reshuffled. This ensures that when a user hits enter shortly after selecting a process, the process actually selected is the one they expected.

I've started work on a PoC to add this feature. The actual grace period duration can be debated, but should be at minimum one tick in wall-clock time. I would propose to set it at at least 2 seconds, rounding up to the next interface tick.

Unable to parse PowerPC64LE CPU info

When I run zenith on PowerPC64LE-based Linux, I got following error:

Screenshot from 2020-10-25 01-49-48

From my understanding, the error belongs to heim lib. Because I am not 100% confident, I create this ticket to double-check if it might be zenith's issue or not before lodging a new ticket with heim project.

Many thanks

Invisible Sections

Sections are treated as invisible (described here) instead of non-existent. This leads to strange problems such as TABing between sections can lead you to an invisible section.

In addition, there should be a UI way to hide and restore previously hidden sections.

Bar charts do not render correctly with console font

Hi!
This is a project that I would like to get behind, however my first stumbling block is the barcharts do not render properly with a console font (font used by a non-windowing environment on a server)

Does this require patched fonts in order to work?

Behavior of .zenith.lock and usage as pidfile

.zenith.lock seems to work well for preventing 2 copies of zenith from clobbering the same copy of history.

However, I frequently spawn zenith from a remote connection, and when that connection is cut off due to unrelated issues, the running zenith is also killed.

This results in having to manually delete .zenith.lock almost on every login to the remote machine.

This does not have to be the case, as the lockfile can be used as a pidfile. That is, it can store identifying information about the running zenith instance, and at startup, zenith can check that indeed the previous instance has been killed without a chance for cleanup, and it can automatically rewrite the lockfile.

This will continue to prevent multiple copies clobbering the history file, while also addressing a common use case for remote work via ssh.

Add configuration file for default settings

When a user arranges the section sizes to what they want, it would be nice to be able to save this size in a configuration. In addition, perhaps we could add support for customizing the colors of various charts.

High memory use

zenith seems to use a lot of RAM compared to similar tools:

zenith -d0 -n0 is using 127.35Mb compared to 5.82Mb for ytop and 4Mb for top

It seems to be related to the history feature. If I pass --disable-history it uses ~18Mb.

Unable to build zenith on Windows

I'm unable to build zenith on Windows 10. Is this supported? I'm seeing these issues.

PS C:\Users\jimi\rust\zenith> cargo build --release
   Compiling socket2 v0.3.12
   Compiling ntapi v0.3.4
   Compiling atty v0.2.14
   Compiling time v0.1.43
   Compiling termion v1.5.5
error[E0433]: failed to resolve: maybe a missing crate `sys`?
  --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\lib.rs:24:9
   |
24 | pub use sys::size::terminal_size;
   |         ^^^ maybe a missing crate `sys`?

error[E0433]: failed to resolve: maybe a missing crate `sys`?
  --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\lib.rs:27:9
   |
27 | pub use sys::tty::{is_tty, get_tty};
   |         ^^^ maybe a missing crate `sys`?

error[E0433]: failed to resolve: maybe a missing crate `sys`?
 --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\async.rs:5:5
  |
5 | use sys::tty::get_tty;
  |     ^^^ maybe a missing crate `sys`?

error[E0433]: failed to resolve: maybe a missing crate `sys`?
  --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:29:5
   |
29 | use sys::attr::{get_terminal_attr, raw_terminal_attr, set_terminal_attr};
   |     ^^^ maybe a missing crate `sys`?

error[E0432]: unresolved import `sys`
  --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:28:5
   |
28 | use sys::Termios;
   |     ^^^ maybe a missing crate `sys`?

error[E0425]: cannot find function `get_tty` in this scope
  --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\async.rs:14:36
   |
14 |     thread::spawn(move || for i in get_tty().unwrap().bytes() {
   |                                    ^^^^^^^ not found in this scope

error[E0425]: cannot find function `get_tty` in this scope
  --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\async.rs:43:36
   |
43 |     thread::spawn(move || for i in get_tty().unwrap().bytes() {
   |                                    ^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
  --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:45:9
   |
45 |         set_terminal_attr(&self.prev_ios).unwrap();
   |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `get_terminal_attr` in this scope
  --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:90:23
   |
90 |         let mut ios = get_terminal_attr()?;
   |                       ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `raw_terminal_attr` in this scope
  --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:93:9
   |
93 |         raw_terminal_attr(&mut ios);
   |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
  --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:95:9
   |
95 |         set_terminal_attr(&ios)?;
   |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
   --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:107:9
    |
107 |         set_terminal_attr(&self.prev_ios)?;
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `get_terminal_attr` in this scope
   --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:113:23
    |
113 |         let mut ios = get_terminal_attr()?;
    |                       ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `raw_terminal_attr` in this scope
   --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:114:9
    |
114 |         raw_terminal_attr(&mut ios);
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
   --> C:\Users\jimi\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\raw.rs:115:9
    |
115 |         set_terminal_attr(&ios)?;
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

error: aborting due to 15 previous errors

Some errors have detailed explanations: E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `termion`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

FreeBSD support

The README notes, "Other BSD systems may work, I have not tested". I tried building on FreeBSD 12.1 and it failed as follows.

error: failed to run custom build command for `sys-info v0.5.10`

Caused by:
  process didn't exit successfully: `/usr/home/wmoore/zenith/target/debug/build/sys-info-19beb9d719b282f9/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'unsupported system: freebsd', /home/wmoore/.cargo/registry/src/github.com-1ecc6299db9ec823/sys-info-0.5.10/build.rs:17:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Cannot run Zenith under Proxmox/Debian

OS Info

uname -a
Linux pve1 5.4.44-2-pve #1 SMP PVE 5.4.44-2 (Wed, 01 Jul 2020 16:37:57 +0200) x86_64 GNU/Linux

cat debian_version
10.5

I installed zenith via:

curl -s https://api.github.com/repos/bvaisvil/zenith/releases/latest | grep browser_download_url | grep linux | cut -d '"' -f 4 | wget -qi -
tar xvf zenith.x86_64-unknown-linux-musl.tgz
chmod +x zenith
sudo mv zenith /usr/local/bin

When I try to start zenith it panics with

thread '<unnamed>' panicked at 'Couldn't Create DB dir.: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/main.rs:115:17

Aborted (core dump) on ARMv7 Linux

Hi @bvaisvil,

I've tried zenith 0.10.0 on the ARMv7 Linux board.
It is custom yocto-based Linux build:

# uname -a
Linux msm8909 3.18.71 #1 SMP PREEMPT Wed Aug 12 17:26:02 UTC 2020 armv7l armv7l armv7l GNU/Linux

I've cross-compiled zenith on Ubuntu 18.04 for the armv7-unknown-linux-gnueabihf target.
I always get crush at the startup.

# RUST_LOG=debug zenith --db=/tmp/zenith
[DEBUG zenith::render] Setup Constraints
[DEBUG zenith::render] Create Metrics App
[DEBUG zenith::metrics] Create Histogram Map
[DEBUG zenith::histogram] Opening DB
[DEBUG zenith::histogram] Starting a new database.

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)

Db path need to be changed because home folder is read-only.

Add process tree view mode

It would be useful to see which worker processes belong to which parent ones for instance.
As a related idea, maybe there could be an option for displaying the parent's PID for each process.

I propose that the tree view be a togglable alternative to the current list view, independently of filter.

That is, the user could press, for example t to switch between tree and list view, and even enable filtering while the tree view is still in effect. Similarly, it should be possible to switch between list and tree after the user is done entering the filter text.

[Feature] Laptop Mode

If the machine zenith is running on has a battery, show additional information that is most vital to the users of portable computers, namely:

  1. charge status in percent
  2. time till full or empty, depending on whether the machine is connected to power
  3. current amount of power consumption watts

Right now I have to use battop for this usecase, which comes with a 'big' TUI with a lot of additional information that is not that useful in practice. It's more of a demo for the underlying library displaying all the information there is about batteries.

Here is the information I usually look at in battop:

Screenshot 2020-02-29 at 08 38 31

Technical Notes

  • it looks like on MacOS at least, the OS only provides new battery information every half a minute or so. I usually launch battop with -d 10, to refresh only every 10 seconds.
  • related to the same request in bottom

Increasing memory usage

Frequently, after using zenith for more than 24-28h memory usage follows a steady trend, reaching over 200MiB (used, not virtual) memory, as reported by zenith itself. This is not a sudden recent behavior, it has been there for at least one release.

Even when loading history, zenith starts at a much more reasonable ~18MiB.

Here are 2 memory profiles, that have run for over 24h. They were taken using valgrind's massif, with zenith built locally at d66adc5

For viewing, massif-visualizer is a pretty good tool to explore the profiles.

Out of disk space when left to run overnight.

If you leave zenith running long enough, files in ~/zenith/blobs will continue to multiply until basically you run out of space on the partition (150 gig in this case)

This was with zenith 0.7.5 on ubuntu server.

I am presuming from other issues that this can be worked around with --disable-history.

could not compile `heim-cpu`

Hi,
I am trying to build zenith-0.9.0 using copr (https://copr.fedorainfracloud.org/coprs/yellowhat/HPC/build/1401683/) but I get the following error:

   Compiling heim-cpu v0.1.0-alpha.1 (https://github.com/heim-rs/heim#2629efda)
error: expected `,`
   --> /builddir/.cargo/git/checkouts/heim-d134154c5d7f3f0c/2629efd/heim-cpu/src/sys/linux/freq.rs:135:37
    |
135 |     let frequencies = rt::try_join!(current_freq(&root), max_freq(&root), min_freq(&root));
    |                                     ^^^^^^^^^^^^
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

error: could not compile `heim-cpu`.

Any ideas?

Thanks

Download meter shows '18.45 EB` for the max value

I don't know how to reproduce it, but it looks like the maximum 64 bit value to me.

Screenshot 2020-07-05 at 17 46 44

To me this absolutely non-critical, but maybe it's something that's easy to fix.

Meta

  • zenith 0.9.2
  • MacOS 10.15.5

Running in WSL2: panic about "Not a directory"

I'm getting this error when I try to start Zenith 0.7.4:

❯ zenith
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 20, kind: Other, message: "Not a directory" }', src/libcore/result.rs:1188:5

BTW you may want to start compiling with the latest release of Rust, which will include better source locations for errors thrown by unwrap().

Network and disk speeds are scaled up by the refresh rate

The network and disk speeds shown are scaled by the refresh rate (i.e. 2X for the default of 2000ms). This can be seen easily by starting a large download or disk copy, then starting zenith with refresh rate of 1000, then stopping and restarting with a larger one of say 5000. Both the histogram and the numbers will be seen to be scaled up by 5X.

Briefly looked at the code in CPUTimeApp.update_networks which uses data.get_received() and data.get_transmitted() to update the histogram but these are not rates rather the diff in total bytes since the last call to sysinfo's refresh_all. Similar issue must exist in disk rate updates.

Have not looked at the code very closely but from my quick reading so far, one clean solution to this might be to take care of this in HistogramMap which needs to take note of the metrics passed as rate per sec, and those that are raw values since the last update and need to be converted to rate. This looks a better approach since the histogram abstraction should understand the difference between the two kinds of values and may have its own policies (e.g. simple average for the duration or more elaborate ones in future). Alternatively it can always assume the passed value is rate per sec (like currently) and the callers need to take care of conversions.

Highlight the orignal process when go back.

I noticed after selecting a process with Enter/Return to view its infos, if I go back to the process list with Esc/b the first process in the list is highlighted instead of the one selected .

This is pretty inconvenient in the case I want to check the information for a list of processes. Thus I suggest to highlight the original selected process.

Arch Linux -- . zenith.lock

Anytime I restart zenith I get an error advising me that the dot zenith dot lock file is still active even though I quit zenith or closed window.

And this happens even after reboot. It's not a huge problem rm .zenith.lock But it is a major annoyance and inconvenience.

Thanks. Really like this program.

Crates.io and `cargo install zenith`

This is really slick! I spend way too much of my time administering and monitoring machines. I like the UX of this, it gives me the numbers I care about in an intuitive way.

I would like to be able just cargo install zenith on machines.

This means you'll need to work something out with the owner of https://crates.io/crates/zenith or rename this.

Scale CPU usage by CPU frequency

20% CPU usage at 800MHz is obviously a somewhat different workload to 20% CPU usage at 4300MHz. It would be nice if the CPU utilisation was scaled so that 20% CPU meant the CPU was working at 20% capacity¹, rather than 20% of whatever the current frequency is.

The existence of boost clocks would mean that this could give numbers in excess of 100%, but that's probably ok?

¹: A really accurate measure of capacity is hard to do (and almost certainly processor-specific), but just scaling based on CPU frequency is probably good enough.

Can only run one instance at a time

If I try to run two instances of Zenith at once, I get the message:

/home/jbabcock/.cache/zenith/.zenith.lock exists and history recording is on. Is another copy of zenith open? If not remove the path and open zenith again.

It would be nice to have concurrent instances, so that leaving a long-running instance on some other virtual desktop/tab won't interfere with opening it quickly to check something.

how to search for a process in Zenith?

As the title states, how can one search for a specific process in the processes pane? Essentially the equivalent of htop search with / + F3.

Or, to rephrase, is it possible to search for a process at all?

Panic on WSL writing db

thread '<unnamed>' panicked at 'Couldn't open database.: Io(Custom { kind: Other, error: "Os { code: 38, kind: Other, message: \"Function not implemented\" }" })', src/metrics.rs:248:17 thread '<unnamed>' panicked at 'Couldn't open database.: Io(Custom { kind: Other, error: "Os { code: 38, kind: Other, message: \"Function not implemented\" }" })', src/metrics.rs:248:17 thread panicked while panicking. aborting. Illegal instruction (core dumped)

Seems to happen at the right write in the sled db.

Core usage unreadable

I have a 32-core 64-thread processor and the core count is unreadable no matter how I resize the window.

image

Perhaps at some core count you should do what the windows task manager start doing: Stop displaying individual bars and start having just a number per core with a differently colored background according to load.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.