GithubHelp home page GithubHelp logo

xxxserxxx / gotop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cjbassi/gotop

2.7K 29.0 137.0 5.01 MB

A terminal based graphical activity monitor inspired by gtop and vtop

License: Other

Go 95.04% Shell 4.29% Python 0.68%

gotop's Introduction



Another terminal based graphical activity monitor, inspired by gtop and vtop, this time written in Go!

Join us in #gotop:matrix.org (matrix clients).

Badges? We don't need no stinking badges!

See the change log for release updates.

Installation

Working and tested on Linux, FreeBSD and MacOS. Windows binaries are provided, but have limited testing. OpenBSD works with some caveats; cross-compiling is difficult and binaries are not provided.

If you install gotop by hand, or you download or create new layouts or colorschemes, you will need to put the layout files where gotop can find them. To see the list of directories gotop looks for files, run gotop -h. The first directory is always the directory from which gotop is run.

  • Arch: Install from AUR, e.g. yay -S gotop-bin. There is also gotop and gotop-git
  • Gentoo: gotop is available on guru overlay.
    sudo layman -a guru
    sudo emerge gotop
  • Nix: you can run gotop with nix-shell -p gotop --run gotop or add the package gotop to your environment
  • OSX: gotop is in homebrew-core. brew install gotop. Make sure to uninstall and untap any previous installations or taps.
  • Windows: gotop is in the Main bucket. scoop install gotop.
  • Prebuilt binaries: Binaries for most systems can be downloaded from the github releases page. RPM and DEB packages are also provided.
  • Source: This requires Go >= 1.16. go install github.com/xxxserxxx/gotop/v4/cmd/gotop@latest

Extensions update

Extensions have proven problematic; go plugins are not usable in real-world cases, and the solution I had running for a while was hacky, at best. Consequently, extensions have been moved into the main code base for now.

  • nvidia support: use the --nvidia flag to enable. You must have the nvidia-smi package installed, and gotop must be able to find the nvidia-smi executable, for this to work.
  • remote: allows gotop to pull sensor data from applications exporting Prometheus metrics, including remote gotop instances themselves.

Console Users

gotop requires a font that has braille and block character Unicode code points; some distributions do not provide this. In the gotop repository is a pcf font that has these points, and setting this font may improve how gotop renders in your console. To use this, run these commands:

curl -O -L https://raw.githubusercontent.com/xxxserxxx/gotop/master/fonts/Lat15-VGA16-braille.psf
setfont Lat15-VGA16-braille.psf

Platform-specific features

Sometimes libraries that gotop uses to introspect the hardware only support a subset of operating systems. Rather than cripple gotop to the LCD, I'm allowing features that may only work on some platforms. These will be listed here:

  • nvidia -- only available on systems with an nvidia GPU
  • SMART NVME hard drive temperatures -- Linux & Darwin

Building

This is the download & compile approach.

gotop requires Go 1.16 or later to build, as it relies on the embed feature released with 1.16; a library it uses, lingo, uses both embed and the io/fs package. For a version of gotop that builds with earlier versions, check out one of the tags prior to v4.2.0.

git clone https://github.com/xxxserxxx/gotop.git
cd gotop
# This ugly SOB gets a usable version from the git tag list
VERS="$(git tag -l --sort=-v:refname | sed 's/v\([^-].*\)/\1/g' | head -1 | tr -d '-' ).$(git describe --long --tags | sed 's/\([^-].*\)-\([0-9]*\)-\(g.*\)/r\2.\3/g' | tr -d '-')"
DAT=$(date +%Y%m%dT%H%M%S)
go build -o gotop \
	-ldflags "-X main.Version=v${VERS} -X main.BuildDate=${DAT}" \
	./cmd/gotop

If you want to compact the executable as much as possible on Linux, change the ldflags line to this:

-ldflags "-X main.Version=v${VERS} -X main.BuildDate=${DAT} -extldflags '-s -w'" \

Now move the gotop executable to somewhere in your $PATH.

If Go is not installed or is the wrong version, and you don't have root access or don't want to upgrade Go, a script is provided to download Go and the gotop sources, compile gotop, and then clean up. See scripts/install_without_root.sh.

go generate

With Go 1.16, it is no longer necessary to call go generate. Translations and Apple SMC tags are embedded with go:embed.

Usage

Run with -h to get an extensive list of command line arguments. Many of these can be configured by creating a configuration file; see the next section for more information. Key bindings can be viewed while gotop is running by pressing the ? key, or they can be printed out by using the --list keys command.

In addition to the key bindings, the mouse can be used to control the process list:

  • click to select process
  • mouse wheel to scroll through processes

For more information on other topics, see:

Monitoring remote machines

gotop can monitor gotops running on remote machines and display (some of the) metrics within a single instance. gotop expects to be behind a proxy, or within a secure intranet, so while it's not exactly hard to set up, it's also not trivial. An example set-up is explained in the Remote Monitoring document.

More screen shots

'-l kitchensink' + colorscheme

"-l battery"

"-l minimal"

Custom (layouts/procs)

Contributors

Many people have contributed code to gotop. Most of the work was by the original author, Caleb Bassi, who was seduced by the dark side (Rust) and had to be thrown into a volcano. Thanks to everyone who's submitted a PR, or otherwise contributed to the project!

Built With

History

ca. 2020-01-25 The original author of gotop started a new tool in Rust, called ytop, and deprecated his Go version. This repository is a fork of original gotop project with a new maintainer to keep the project alive and growing. An objective of the fork is to maintain a small, focused core while providing a path to extend functionality for less universal use cases; examples of this is sensor support for NVidia graphics cards, and for aggregating data from remote gotop instances.

Alternatives

I obviously think gotop is the Bee's Knees, but there are many alternatives. Many of these have been around for years. All of them are terminal-based tools.

  • Grandpa top. Written 36 years ago, C, installed by default on almost every Unix descendant.
  • bashtop, in pure bash! Beautiful and space efficient, and deserves special comment.
  • bpytop, @aristocratos, the author of bashtop, rewrote it in Python in mid-2020; it's the same beautiful interface, and a very nice alternative.
  • htop. A prettier top. Similar functionality. 16 years old!
  • atop. Detailed process-focused inspection with a table-like view. Been around for 9 long years.
  • iftop, a top for network connections. More than just data transfer, iftop will show what interfaces are connecting to what IP addresses. Requires root access to run.
  • iotop, top for disk access. Tells you which processes are writing to and from disk space, and how much. Also requires root access to run.
  • nmon a dashboard style top; widgets can be dynamically enabled and disabled, pure ASCII rendering, so it doesn't rely on fancy character sets to draw bars.
  • ytop, a rewrite of gotop (ca. 3.0) in Rust. Same great UI, different programming language.
  • slabtop, part of procps-ng, looks like top but provides kernel slab cache information! Requires root.
  • systemd-cgtop, comes with systemd (odds are your system uses systemd, so this is already installed), provides a resource use view of control groups -- basically, which services are using what resources. Does not require root to run.
  • virt-top top for virtualized containers (VMs, like QEMU).
  • ctop top for containers (LXC, like docker)

A comment on clones

In a chat room I heard someone refer to gotop as "another one of those fancy language rewrites people do." I'm not the original author of gotop, so it's easy to not take offense, but I'm going on record as saying that I disagree with that sentiment: I think these rewrites are valuable, useful, and healthy to the community. They increase software diversity at very little cost to users, and are a sort of evolutionary mechanism: as people do rewrites, some are worse, but some are better, and users benefit. Rewrites provide options, which fight against monocultures. As importantly, most developers are really only fluent in a couple of programming languages. We all have familiarity with a dozen, and may even have extensive experience with a half-dozen, but if you don't constantly use a language, you tend to forget the extended library APIs, your development environment isn't tuned, you're rusty with using the tool sets, and you may have forgotten a lot of the language peculiarities and gotchas. The barrier to entry for contributing to a software project -- to simply finding and fixing a bug -- in a language you're not intimate with can be very high. It gets much worse if the project owner is a stickler for a particular style. So I believe that gotop's original author's decision to rewrite his project in Rust is a net positive. He probably made fewer design mistakes in ytop (we always do, on the second rewrite), and Rust developers -- who may have hesitated learning or brushing up on Go to submit an improvement -- have another project to which they can contribute.

Diversity is good. Don't knock the free stuff.

Star History

Star History Chart

gotop's People

Contributors

0mp avatar 999eagle avatar anatol avatar aofei avatar bbjubjub2494 avatar chiefy avatar cjbassi avatar f1337 avatar gardockt avatar kqzz avatar kraust avatar markuspeloquin avatar mattllvw avatar maxsem avatar mikaelurankar avatar nickcorin avatar omar-polo avatar panter-dsd avatar phpor avatar quantonganh avatar rapenne-s avatar rare-magma avatar reasonablytall avatar tie avatar tigerfyj avatar tormath1 avatar viraptor avatar whuang8 avatar xgdgsc avatar xxxserxxx 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  avatar  avatar  avatar  avatar

gotop's Issues

tmux rendering issues

Please give the following info:

  • The output of uname -a: Linux owl 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Jan 4 01:06:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Any relevenat hardware info: Intel(R) Xeon(R) CPU E7330 @ 2.40GHz
  • Terminal shell (like zsh or bash): bash
  • Terminal emulator (like iTerm or gnome terminal): gnome
  • tmux version if using tmux: tmux/2.2

I'm trying to use gotop on a cluster computing centos 7 system, but the program can only detect a few CPUs. The right configuration shows like this htop image, 16 cores. The display in tmux is not right but outside tmux is fine.

  • Inside tmux
    screenshot from 2018-09-12 05-07-23

  • outside
    screenshot from 2018-09-12 05-27-36

  • Right config
    screenshot from 2018-09-12 05-08-10

Relicensing to MIT

See racket/racket#1570. I would like to relicense gotop to the more permissive MIT license and doing so would require having any past and future contributors relicense their changes under the MIT license. The AGPLv3 license was originally chosen due to the drawille-go dependency and also the smc.c and smc.h files for macOS temperatures, both of which are GPL and which we would also need to migrate off of.

If you have contributed commits to gotop and are willing to relicense your commits under MIT, please comment on this issue with the following:

I, <name>, license past and future contributions to gotop under the MIT license.

Thanks!

(You may wish to unsubscribe from this issue after leaving your comment)

edit: updated the relicensing wording for clarity.

Ignore loop and docker network interfaces?

Currently, virtual network interfaces are included in the total values calculated in the network widget (besides VPN interfaces which have been removed) but I feel like maybe we should just include physical network interfaces like ethernet and wifi.

Original cjbassi#33

iMac drive bay temperature shown as 249 º C.

gotop v3.0.0 displays hard_drive_bay temperature as 249 º C on two different 27'' iMacs (both have fusion drives), but displays correct information on 12'' Macbook and 15'' Macbook Pro.

Required information:

  • gotop version (gotop -V):
    3.0.0

  • The output of uname -a:
    Darwin Jupiter.local 19.0.0 Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64 x86_64

  • Terminal emulator (e.g. iTerm or gnome terminal):
    Apple Terminal.app or iTerm.

  • Any releveant hardware info:
    iMac (Retina 5K, 27-inch, 2017)
    3.4 GHz Quad-Core Intel Core i5
    40 GB 2400 MHz DDR4
    Radeon Pro 570 4 GB
    APPLE HDD ST1000DM003:
    Capacity: 1 TB (1,000,204,886,016 bytes)
    Model: APPLE HDD ST1000DM003
    Revision: AQ04
    Native Command Queuing: Yes
    Queue Depth: 32
    Removable Media: No
    Detachable Drive: No
    BSD Name: disk1
    Medium Type: Rotational
    Partition Map Type: GPT (GUID Partition Table)
    S.M.A.R.T. status: Verified
    Volumes:
    EFI:
    Capacity: 209.7 MB (209,715,200 bytes)
    File System: MS-DOS FAT32
    BSD Name: disk1s1
    Content: EFI
    Volume UUID: BDC1974F-6B8C-3DAE-9DB2-3AA3C17BF506
    disk1s2:
    Capacity: 1 TB (999,995,129,856 bytes)
    BSD Name: disk1s2
    Content: Apple_APFS

  • tmux version if using tmux:
    Not using tmux

Also please copy or attach ~/.local/state/gotop/errors.log if it exists and contains logs:
errors.log is empty

GPU Widget

It would be nice to see GPU usage widget, using intel_gpu_top or nvidia-smi. I know that both arent' supported on some devices but if it is supported it would be nice to see. Now I have to open a special tab for intel_gpu_top:

intel-gpu-top -  755/ 755 MHz;    0% RC6;  6.57 Watts;      229 irqs/s

      IMC reads:   ------ (null)/s
     IMC writes:   ------ (null)/s

          ENGINE      BUSY                                                                                MI_SEMA MI_WAIT
     Render/3D/0   54.49% |█████████████████████████████████████████▉                                   |      0%      0%
       Blitter/0    0.00% |                                                                             |      0%      0%
         Video/0    0.00% |                                                                             |      0%      0%
  VideoEnhance/0    0.00% |                                                                             |      0%      0%

intel_gpu_top source code | nvidia smi wrapper for golang

Full process name.

Once you tab you should be able to scroll the command instead of having ...

Processes widget fails with ps from BusyBox

Required information:

  • gotop version (gotop -v): 2.0.1
  • The output of uname -a: Linux 4.2.8 #1 SMP Fri Dec 28 00:59:23 CST 2018 x86_64 GNU/Linux
  • Terminal emulator (e.g. iTerm or gnome terminal):
  • Any relevenat hardware info: QNAP QTS 4.3.6
  • tmux version if using tmux:

Logs :
"11:19:36 proc_linux.go:14: failed to retrieve processes: failed to execute 'ps' command: exit status 1"

On QNAP devices, ps command used Busybox version :

BusyBox v1.24.1 (2018-12-28 02:26:16 CST) multi-call binary.

Usage: ps [-o COL1,COL2=HEADER] [-T]

Show list of processes

        -o COL1,COL2=HEADER     Select columns for display
        -T                      Show threads

QNAP Options:
        --columns N

This version does not have "-axo" options so it fails. By default it shows processes of all users. Is it possible to have a version for BusyBox users ?
Thanks !

Original cjbassi#110
Submitter @Mikiya83

Release a new version

Hey! I'm aware this software is being rewritten in Rust, however the latest release is lagging behind master, and as I use Void Linux and this software directly from the repos, I can only used a tagged version.

Would you mind doing a minor release? Thanks!

Processes showing 0.0 for CPU% and Mem%

Required information:

  • gotop -v: 3.0.0
  • uname -a: Darwin Kernel Version 17.0.0: Thu Aug 24 21:48:19 PDT 2017; root:xnu 4570.1.46~2/RELEASE_X86_64 x86_64
  • Terminal emulator (e.g. iTerm or gnome terminal): iterm2 with Zsh
  • Any relevenat hardware info: Macbook Pro 15

zrzut ekranu 2019-03-07 o 09 48 45

Implement displaying processes hierarchically

One of my favorite features of ps/htop is the ability to display processes hierarchically. It's really nice to see the process tree. For example:

[root@machine ~]# ps aux -H
...snip...
root      1112  0.0  0.0  82468  1396 ?        Ss   Apr16   0:00   /usr/sbin/sshd
root     12834  1.0  0.2 142960  5144 ?        Ss   09:23   0:00     sshd: root@pts/0
root     12836  0.0  0.1 115384  2020 pts/0    Ss   09:23   0:00       -bash
root     12853  0.0  0.1 151192  1908 pts/0    R+   09:23   0:00         ps aux -H

htop has similar functionality.

I don't know how much of a pain this would be to implement, so please feel free to close this if it would be obnoxious to do. I really love this tool and I figured this feature might be useful to people.

Disk IO showing 0B for R/s and W/s

Required information:

  • gotop version (gotop -v): 2.0.2
  • The output of uname -a: Darwin Chads-MacBook-Pro.local 18.2.0 Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64 x86_64
  • Terminal emulator (e.g. iTerm or gnome terminal): Alacritty
  • Any relevenat hardware info: Macbook pro 15
  • tmux version if using tmux: 2.8

screenshot 2019-02-20 at 17 38 32

output snapshot as json

ask

CLI arg to output snapshot of system metrics (CPU, mem, disk, et al.) as JSON

why

Diffing. For example, let's say your machine feels laggy. You open gotop and things look pretty normal, but you don't remember the metrics from the last time you opened gotop, so unless something is very obviously wrong (machine is super hot, runaway process is hogging memory) you won't have any useful comparisons to make.

Whereas, with the JSON output option, you could just gotop --json > gotop-metrics-<date>.json to establish a baseline and then, when things get laggy, compare your current situation to the baseline.

No Temperatures shown with Raspberry Pi

Hi,
I'm testing gotop Version 1.4.0 on a pi zero w with the latest image of Raspian Strech Lite.
The only problem I have is that no Temperatures are shown.

  • The output of uname -a
    Linux adc 4.14.34+ #1110 Mon Apr 16 14:51:42 BST 2018 armv6l GNU/Linux

  • Terminal shell (like zsh or bash)
    bash

  • Terminal emulator (like iTerm or gnome terminal)
    mac terminal -> ssh > server

  • Using tmux?
    no

Regards

Original ticket: cjbassi#37
Original poster: @NuggTV
Additional input: @PrivateGER, @staranto, @pgaskin, @santosh, @TheWorms, @siduxdevil, @Jpund

No graphs displayed

Make sure gotop is updated and the issue still persists before creating an issue.
Check current version with gotop -v and check the latest version from the releases tab on GitHub.
$./gotop -v
1.4.1
Please give the following info when creating an issue:

  • The output of uname -a
    Linux neuro 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Terminal shell (like zsh or bash)
    zsh
  • Terminal emulator (like iTerm or gnome terminal)
    Xterm
  • Using tmux?
    Nope

I installed gotop as stated in the README.md file, however after running it I do not see the cpu/men usage or network graph.

screenshot_2018-07-24_09-11-11

Crash with Cpu Isolation

- Arch Linux 4.17.14
- Fish & Bash
- Termite
- Gotop 1.4.1

Behavior:
Isolating CPU cores via Cpuset (cset) results in Gotop crashing on initializing.
This does not happen if Gotop is already running and isolation is achieved afterwards.
Only after isolating cores before running Gotop, does Gotop crash

It throws the following exception

~> Gotop
Error caught. Exiting program.

Issue with CPU percentages.

Diagnostics:
self.Count: 2
gopsutil.Counts(): 2
len(percents): 8
percents: [20.000000000004547 0 0 0 16.494845360824865 0 0 0]
self.interval: 1s

panic: 1

goroutine 6 [running]:
github.com/cjbassi/gotop/src/utils.Error(0x5845e0, 0xf, 0xc420202000, 0x83)
	/home/cjbassi/.local/src/github.com/cjbassi/gotop/src/utils/utils.go:49 +0x23f
github.com/cjbassi/gotop/src/widgets.(*CPU).update(0xc4201cada0)
	/home/cjbassi/.local/src/github.com/cjbassi/gotop/src/widgets/cpu.go:57 +0x646
created by github.com/cjbassi/gotop/src/widgets.NewCPU
	/home/cjbassi/.local/src/github.com/cjbassi/gotop/src/widgets/cpu.go:38 +0x2f4

To me, at least, this is very low priority, but I stumbled across it while messing around with Cset.
So I figured I'd report it anyways.
I have a feeling any CPU isolation would result in the same problem, since It doesn't like not being able to read/interact as nicely with the isolated cores.

Interestingly enough, Htop doesn't seem to have a problem with reporting the isolated cores.
Might be worth while checking out how they handle that.

Inconsistent CPU when compared to htop

Required information:

  • gotop -v: 2.0.0
  • uname -a: Linux rpi 4.14.92-1-ARCH #1 SMP Thu Jan 10 04:52:45 UTC 2019 armv7l GNU/Linux
  • Terminal shell: fish
  • Terminal emulator (e.g. iTerm or gnome terminal): iterm2
  • Error log file empty

I've seen inconsistent CPU usage from gotop and htop. For the gotop process, CPU usage ranges from 7 to 15% continuously on htop, but gotop reports around 3%, continuously.

I would guess this is because htop shows the total CPU usage in all CPUs and gotop is showing the CPU usage divided by the number of cores. Is this correct? Is this the intended behavior? Or should it follow htop style and go to 400% in a 4 core CPU?

screenshot 2019-02-05 15 11 24

Double-digit thread support

i don't believe there's an issue related to this, but definitely close and link if there is. 😅

i have a TR1920X, which has 24-threads. running gotop -p, will list all the threads, however, i typically can't see more than the first 12 or so unless i fully maximize the window.

*would it be possible to adaptively place the cpus? (meaning, if the window which lists the cpus is able to "detect" an overflow, it repaints as a column?)

i know that i would take a temporal update hit to have that – meaning if it reduces the update frequency, that's definitely an acceptable trade-off, imo. (or maybe we can pass a flag?)

Original ticket cjbassi#158
Original submitter @ionlights

errors.log is filling up hard drive

Required information:

  • gotop version (gotop -V): 3.0.0
  • The output of uname -a: Darwin MacBook-Pro 17.7.0 Darwin Kernel Version 17.7.0: Fri Oct 4 23:08:59 PDT 2019; root:xnu-4570.71.57~1/RELEASE_X86_64 x86_64
  • Terminal emulator (e.g. iTerm or gnome terminal):
  • Any relevenat hardware info:
  • tmux version if using tmux:

Also please copy or attach ~/.local/state/gotop/errors.log if it exists and contains logs:

Thats the issue. Gotop was running for 24 hours and was producing a 20GB errors.log.
This copy/paste is only 12 seconds of running gotop and it already produced 3,2 MB errors.log

(It's just en excerpt:)

17:30:02 proc_other.go:56: failed to convert third field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:          1 launchd                                              0,0   0,1 launchd
17:30:02 proc_other.go:60: failed to convert fourth field to float: strconv.ParseFloat: parsing "0,1": invalid syntax. split:          1 launchd                                              0,0   0,1 launchd
17:30:02 proc_other.go:56: failed to convert third field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         57 syslogd                                              0,0   0,0 syslogd
17:30:02 proc_other.go:60: failed to convert fourth field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         57 syslogd                                              0,0   0,0 syslogd
17:30:02 proc_other.go:56: failed to convert third field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         58 UserEventAgent                                       0,0   0,1 UserEventAgent (System)
17:30:02 proc_other.go:60: failed to convert fourth field to float: strconv.ParseFloat: parsing "0,1": invalid syntax. split:         58 UserEventAgent                                       0,0   0,1 UserEventAgent (System)
17:30:02 proc_other.go:56: failed to convert third field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         60 com.crystalidea.macsfancontrol.smcwrite              0,0   0,0 com.crystalidea.macsfancontrol.smcwrite
17:30:02 proc_other.go:60: failed to convert fourth field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         60 com.crystalidea.macsfancontrol.smcwrite              0,0   0,0 com.crystalidea.macsfancontrol.smcwrite
17:30:02 proc_other.go:56: failed to convert third field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         62 uninstalld                                           0,0   0,0 uninstalld
17:30:02 proc_other.go:60: failed to convert fourth field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         62 uninstalld                                           0,0   0,0 uninstalld
17:30:02 proc_other.go:56: failed to convert third field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         63 kextd                                                0,0   0,1 kextd
17:30:02 proc_other.go:60: failed to convert fourth field to float: strconv.ParseFloat: parsing "0,1": invalid syntax. split:         63 kextd                                                0,0   0,1 kextd
17:30:02 proc_other.go:56: failed to convert third field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         64 fseventsd                                            0,0   0,0 fseventsd
17:30:02 proc_other.go:60: failed to convert fourth field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         64 fseventsd                                            0,0   0,0 fseventsd
17:30:02 proc_other.go:56: failed to convert third field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         66 mediaremoted                                         0,0   0,1 mediaremoted
17:30:02 proc_other.go:60: failed to convert fourth field to float: strconv.ParseFloat: parsing "0,1": invalid syntax. split:         66 mediaremoted                                         0,0   0,1 mediaremoted
17:30:02 proc_other.go:56: failed to convert third field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         68 appleeventsd                                         0,0   0,0 appleeventsd --server
17:30:02 proc_other.go:60: failed to convert fourth field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         68 appleeventsd                                         0,0   0,0 appleeventsd --server
17:30:02 proc_other.go:56: failed to convert third field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         69 systemstats                                          0,0   0,0 systemstats --daemon
17:30:02 proc_other.go:60: failed to convert fourth field to float: strconv.ParseFloat: parsing "0,0": invalid syntax. split:         69 systemstats                                          0,0   0,0 systemstats --daemon

I attached the whole file here...
errors.log

Enhancement Request: Configuration file

It would be great if gotop supported loading configuration from a file for the command line options. I would love to be able to set my color scheme once and then just run gotop directly. It looks like gotop is already pulling in ProtonMail/go-appdir for loading custom color schemes so it seems like it wouldn't be too much more to add support for a config file.

Allow scaling of network traffic

Currently my Network Usage graph does not correspond to actual maximum bandwidth. When traffic is at 100% the graph only shows about 10%. I see no setting to inform gotop of the maximum so that it can scale properly. It would be nice to have that option.

Rust rewrite

edit: Rust port being worked on over at https://github.com/cjbassi/rtop. I plan to merge gotop PRs at least until rtop is feature equivalent, at which point I'll probably archive gotop.

Why rewrite in Rust?:

  • I personally prefer working in Rust
  • Rust is more difficult to learn but solves many of Go's shortcoming that I've encountered with gotop:
    • proper dependency management
    • generics
    • enforced thread safety
    • ability to embed files in the binary (colorschemes)
    • functional programming ergonomics
    • proper enums (enumerating keybinds, events, etc)
    • granular conditional compilation (not per file)
  • there's a lot of awesome Rust packages gaining in maturity: tui-rs, crossterm, etc
    • will get truecolor colorschemes

Panic on Windows

Have the same issue in Windows:


Issue with CPU percentages.

Diagnostics:
self.Count: 8
gopsutil.Counts(): 8
len(percents): 0
percents: []
self.interval: 1s

panic: 1

goroutine 17 [running]:
github.com/cjbassi/gotop/utils.Error(0x5a120a, 0xf, 0xc0421720c0, 0x52)
        d:/WLCR/GoProjects/src/github.com/cjbassi/gotop/utils/utils.go:30 +0x246
github.com/cjbassi/gotop/widgets.(*CPU).update(0xc042140000)
        d:/WLCR/GoProjects/src/github.com/cjbassi/gotop/widgets/cpu.go:57 +0x539
created by github.com/cjbassi/gotop/widgets.NewCPU
        d:/WLCR/GoProjects/src/github.com/cjbassi/gotop/widgets/cpu.go:38 +0x2da

Did by

$ go get -u -v github.com/cjbassi/gotop
$ gotop

Intent to package: Snaps are universal Linux packages

Dear maintainer(s),

Snaps are universal Linux packages that can be installed and run on many GNU+Linux distributions with ease. I've been following the Snapcrafters instructions and have built a working snap on the Snap Store, you may try it by running the following commands after installing snapd:

# Install the snap
sudo snap install --channel=edge gotop-brlin

# Connect to the required confinement interfaces
## Required by "Temperatures" widget
sudo snap connect gotop-brlin:hardware-observe

## Required by "Disk Usage" widget
sudo snap connect gotop-brlin:mount-observe

## Required by "Processes" widget
sudo snap connect gotop-brlin:system-observe

# Launch the application
gotop-brlin

I'm also looking forward to working with you to make the packaging work upstream (if you're interested). You may want to check out the current packaging recipe, the documentation, registering a developer account on the Snap Store, and get in touch with us to transfer the work under your control.

Thanks for your time and attention.

Todo:

  • fix the mountpoints being incorrectly reported
  • attempt to acquire the gotop namespace
  • figure out which permissions gotop needs exactly
  • update the snap information on the website

Incorrect memory usage reported

On FreeBSD, it shows 10.9 GB / 24 GB when the top utility shows

Mem: 3379M Active, 2029M Inact, 8809M Laundry, 7180M Wired, 1561M Buf, 2474M Free
ARC: 4001M Total, 3809M MFU, 168M MRU, 64K Anon, 12M Header, 13M Other
     3830M Compressed, 4002M Uncompressed, 1.04:1 Ratio
Swap: 4096M Total, 3073M Used, 1023M Free, 75% Inuse

Only 2.4 GB is free, but it shows that 24-10.9=13.1 GB is free.

You might also want to show all numbers, since you have space there.

Disk usage not showing up at all

Required information:

  • gotop version (gotop -V):
  • The output of uname -a:
  • Terminal emulator (e.g. iTerm or gnome terminal):
  • Any relevenat hardware info:
  • tmux version if using tmux:

Also please copy or attach ~/.local/state/gotop/errors.log if it exists and contains logs:
gotop -V - 3.0.0
uname -a - Linux TheSite52 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux
iTerm 2 mac os
Dell insperon 525s 00
intel 2 quad q8400 @ 2.3ghz
6gb of ram
1 4tb hard drive sda with 2 partitions
1 160gb hard drive sdb
running over ssh
Screen Shot 2019-03-24 at 11 56 50 PM

no errors in the log the disk usage widget just shows nothing

Original issue cjbassi#131
Original submitter @mrr3n3w

Suggestion: List Package Temp before Core Temps

Check current version with `gotop -v` and check the latest version from the releases tab on GitHub. ✔️

On Linux:
Current temp sensors are sorted alphabetically: acpitz, coretemp_core0, ..., coretemp_core5, coretemp_packageid0

acpitz is mostly irrelevant, while package is usually a pretty informative temp if individual core temps are unavailable.

Currently, resizing the gotop window to a smaller window means that acpitz will remain visible the longest, while the more relevant info of packageid0 will become invisible first.

I want to suggest moving coretemp to the first position.

Original ticket submitted by @insunaa

Temperature widget is not working ( not showing anything) !!!

Required information:

  • gotop version (gotop -v): 2.0.0

  • The output of uname -a: Linux XXX-X542UN 4.18.0-14-generic #15~18.04.1-Ubuntu SMP Mon Jan 14 11:09:26 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

  • Terminal shell (e.g. zsh or bash): bash

  • Terminal emulator (e.g. iTerm or gnome terminal): gnome terminal

  • Any relevenat hardware info: CPU: Intel i5-7200U, GPU: Intel HD Graphics 620, GPU: NVIDIA GeForce MX150

  • tmux version if using tmux:

Also please copy or attach the following file if it exists and contains logs:

  • Linux: ~/.local/state/gotop/errors.log
  • OSX: ~/Library/Logs/gotop/errors.log

~/.local/state/gotop/errors.log is EMPTY !!
Installlation method: Prebuilt binaries

Not all Logical Cores showing up

Hi.

Is there a way to force show all Logical cores on the left side?

I just upgraded from Ryzen 5 1600 to Ryzen 7 3700x today and noticed it only showed 12 cores instead of 16. Dragging the window bigger, or zooming out "fixes" the issue.

exit (crash) immediately to shell if -b is passed

Starting gotop -b exits to shell immediately (see error log below).
It seems to try to read files in /sys/class/power_supply/hidpp_battery_0 that do not exist (although that directory exists).

Required information:

  • gotop version (gotop -v):
    2.0.0

  • The output of uname -a:
    Linux p72 4.20.2-1-default #1 SMP PREEMPT Sun Jan 13 12:37:46 UTC 2019 (036c5c2) x86_64 x86_64 x86_64 GNU/Linux

  • Terminal shell (e.g. zsh or bash):
    bash

  • Terminal emulator (e.g. iTerm or gnome terminal):
    urxvt

  • Any relevant hardware info:
    Lenovo ThinkPad P72

Also please copy or attach the following file if it exists and contains logs:

22:20:11 battery.go:30: failed to get battery info from system: [{Current:open /sys/class/power_supply/hidpp_battery_0/voltage_now: no such file or directory Full:open /sys/class/power_supply/hidpp_battery_0/voltage_now: no such file or directory Design:open /sys/class/power_supply/hidpp_battery_0/voltage_min_design: no such file or directory ChargeRate:open /sys/class/power_supply/hidpp_battery_0/voltage_now: no such file or directory Voltage:open /sys/class/power_supply/hidpp_battery_0/voltage_now: no such file or directory DesignVoltage:open /sys/class/power_supply/hidpp_battery_0/voltage_min_design: no such file or directory}]
22:20:11 battery.go:56: failed to get battery info from system: [{Current:open /sys/class/power_supply/hidpp_battery_0/voltage_now: no such file or directory Full:open /sys/class/power_supply/hidpp_battery_0/voltage_now: no such file or directory Design:open /sys/class/power_supply/hidpp_battery_0/voltage_min_design: no such file or directory ChargeRate:open /sys/class/power_supply/hidpp_battery_0/voltage_now: no such file or directory Voltage:open /sys/class/power_supply/hidpp_battery_0/voltage_now: no such file or directory DesignVoltage:open /sys/class/power_supply/hidpp_battery_0/voltage_min_design: no such file or directory}]
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/cjbassi/gotop/src/termui.(*LineGraph).Draw(0xc000090540, 0xc000104150)
	/home/cjbassi/playground/gotop/src/termui/linegraph.go:82 +0xdfe
github.com/gizak/termui.(*Grid).Draw(0xc000464000, 0xc000104150)
	/home/cjbassi/.local/share/go/pkg/mod/github.com/gizak/[email protected]/grid.go:154 +0x1a3
github.com/gizak/termui.Render(0xc0004efec8, 0x1, 0x1)
	/home/cjbassi/.local/share/go/pkg/mod/github.com/gizak/[email protected]/render.go:22 +0x1c0
main.main()
	/home/cjbassi/playground/gotop/main.go:468 +0x3a5

Original cjbassi#100
Submitter @bubbleguuum

Help screen and statusbar font color does not obey theme

Required information:

  • gotop version (gotop -V): 3.0.0
  • The output of uname -a: Linux vagrant 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Terminal emulator (e.g. iTerm or gnome terminal):
  • Any relevenat hardware info:
  • tmux version if using tmux:

Also please copy or attach ~/.local/state/gotop/errors.log if it exists and contains logs:

Issue:

The help text does not obey color theme.

Reproduction steps:

  1. Use a terminal with white background
  2. Run gotop --color default-dark --statusbar
  3. Notice the status bar time is white over white
  4. Press ?
  5. Notice the help text is white over white

Actual behavior:

When using gotop --color default-dark the help text is still white over white as shown in this screenshot:
image

Expected behavior:

Expecting the text to be readable - black over white.

[macOS] kernel_task and gotop

Required information:

  • gotop version (gotop -V):
    3.0.0
  • The output of uname -a:
    Darwin catfromhell-pro.local 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64
  • Terminal emulator (e.g. iTerm or gnome terminal):
    iTerm
  • Any relevenat hardware info:
    image

image

Gotop was overload kernel_task on macOS(default gotop settings)

Original task cjbassi#142
Original submitter @barbariska108

Enhancement Request: Add disk io graph

It would be great if gotop supported displaying a history graph for disk io as the current widget shows only live R/s.
This graph would be quite useful on machines where the disks are the performance bottlenecks.

Original ticket cjbassi#153
Original submitter @whooperr

colorscheme - choose "more" different default colors for the CPU labels

Required information:

  • gotop version (gotop -V): 3.0.0
  • The output of uname -a: Linux 4.15.0-47-generic #50~16.04.1-Ubuntu x86_64 GNU/Linux
  • Terminal emulator (e.g. iTerm or gnome terminal): gnome terminal
  • Any relevenat hardware info: none
  • tmux version if using tmux: none

Also please copy or attach ~/.local/state/gotop/errors.log if it exists and contains logs: not relevant

Note, that CPU6 and CPU7 have identical colors. No issue in general, just for the default colorscheme. Same for the default dark colorscheme. Solarized and Monkai don't show the same behaviour due to "more" different colors.

image

Original ticket cjbassi#137
Original submitter @0x1daniel

Feature Request: Add option to show only widget passed through commandline argument

Sometimes, The usecase is such that we only need to monitor one thing. For example, We may need to only see the network widget or memory widget.

Hence, Add a command-line option that takes the name of the widget and displays only that widget.

This will be helpful in case of tiled terminals with small terminal area.

A sample Command line interface could look like:

gotop --widget=network

gotop -w network

Original ticket cjbassi#155
Original submitter @xypnox

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.