aksakalli / gtop Goto Github PK
View Code? Open in Web Editor NEWSystem monitoring dashboard for terminal
License: MIT License
System monitoring dashboard for terminal
License: MIT License
The CPU & Memory history graphs seem to be vertically offset by a couple of lines, leaving 2-3 empty rows below the 0
row, and missing the 100
row at the top. Here's a screenshot:
This happens consistently regardless of how large I make the terminal window.
I would love to see this as a brew package. https://brew.sh
I am not sure if this is planned, but think it could help a lot of people on the Mac side 👍
OS: Archlinux
Node version: ($ node --version
) v8.5.0
gtop version: ($ npm info gtop version
) 0.1.5
A description of the issue
It requires sudo to get it done...see the output below:
`bhaskar@ArchLinux_17:46:56_Tue Sep 26:~>npm install gtop -g
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! stack: 'Error: EACCES: permission denied, access '/usr/lib/node_modules'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/bhaskar/.npm/_logs/2017-09-26T12_17_18_921Z-debug.log
bhaskar@ArchLinux_17:47:19_Tue Sep 26:~>sudo npm install gtop -g
/usr/bin/gtop -> /usr/lib/node_modules/gtop/bin/gtop
Thanks for writing this, it's great!
One thing - disk fullness does not, typically, change quickly enough that realtime reporting of it is that useful.
I'd really appreciate the disk usage dial being replaced by graphs of IOPS and throughput, which are much more useful indicators of what the system is doing right now. With a L/R scale you can probably use the same graph area for both things.
For extra credit, an option to have separate lines per device (with deduping so things like devicemapper don't cause the same block device to show up twice) would be awesome.
(first of all, gtop is beautiful, absolutely stunning)
There are some vertical alignment issues with the green bounding boxes when drawn on a 4k monitor.
Specifically the lower portions of "Swap" and "Disk Usage".
$ node --version
)$ npm info gtop version
)A description of the issue
I installed npm with yum -y install npm
then I installed gtop with npm install gtop -g
and when I ran gtop I have this error:
/usr/lib/node_modules/gtop/lib/monitor/cpu.js:8
si.currentLoad(data => {
^
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/lib/node_modules/gtop/lib/monitor/index.js:2:8)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
Please tell me what other info do you need to have a better idea of the bug :)
The default font of Windows Command Prompt does not have some unicode characters unlike Linux and OSX. If you run with the default font Consolas
, you will get a result like this:
In this case, you need to change it to a Braille font:
01-iosevka-1.13.2.zip\ttf\iosevka-regular.ttf
Install
.Regedit
(Win+R
type regedit
)HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont
String value
named zeros (if there is already 00
, new one should be 000
), and Data Iosevka
:Properties
.Iosevka
No doubt abut that gtop is a handy tool. I think, to have an extension to keep old record and filtering would be value added for gtop
below is my work env:
~# nodejs -v
v0.10.25
~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
~# npm install gtip -g
when run gtop cli I got this error:
~#gtop
/usr/local/lib/node_modules/gtop/lib/monitor/cpu.js:8
si.currentLoad(data => {
^
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/local/lib/node_modules/gtop/lib/monitor/index.js:2:8)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
$ LANG=en_US.utf8 TERM=xterm-256color gtop
/usr/local/lib/node_modules/gtop/lib/monitor/cpu.js:8
si.currentLoad(data => {
^
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/local/lib/node_modules/gtop/lib/monitor/index.js:2:8)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
It would be usefull to be able to search for the names of commands associated with processes.
For example i was watching this dropbox process and wondered why it peeked at 24% CPU usage, and then it suddenly dropped (to some unknown %), it would then have been nice to be able to search for "dropbox" to instantly find it again.
Maybe using some sort of fuzzy search library? (like fuzzysort)
when pressing c,p or m for sorting cpu usage, process id and memory usage, the arrow is upside down.
After node upgrade (from 8.1.2 to 8.8.1) gtop does not automatically adapt to window resizes. Tried in the default OSX terminal app, iTerm, tmux. Same result. The reason I ran into this, was when I installed gtop on another machine with a recent node version. On the machine with the old node version, the app automatically adjusted to window resizes. After upgrading node also on this machine, it´s not working anymore.
Since I am not a node expert, I´m having a hard time figuring out which module might have caused this change.
v7.10.0
)0.1.5
)When I run gtop
I get this error:
RangeError: "size" argument must not be negative
at Function.Buffer.allocUnsafe (buffer.js:151:3)
at new Buffer (buffer.js:83:19)
at new Canvas (/usr/local/lib/node_modules/gtop/node_modules/drawille-blessed-contrib/index.js:17:18)
at new Context (/usr/local/lib/node_modules/gtop/node_modules/drawille-canvas-blessed-contrib/index.js:11:18)
at module.exports.Canvas.getContext (/usr/local/lib/node_modules/gtop/node_modules/drawille-canvas-blessed-contrib/index.js:274:24)
at Donut.<anonymous> (/usr/local/lib/node_modules/gtop/node_modules/blessed-contrib/lib/widget/canvas.js:22:29)
at Donut.EventEmitter._emit (/usr/local/lib/node_modules/gtop/node_modules/blessed/lib/events.js:98:20)
at Donut.EventEmitter.emit (/usr/local/lib/node_modules/gtop/node_modules/blessed/lib/events.js:117:12)
at emit (/usr/local/lib/node_modules/gtop/node_modules/blessed/lib/widgets/node.js:109:15)
at Screen.Node.insert (/usr/local/lib/node_modules/gtop/node_modules/blessed/lib/widgets/node.js:111:5)
I might be interested in using this in our research lab. But our systems are pretty delicately configured; to avoid risking any problems (among other reasons), I am not inclined to install Node/npm. But I would happily run a binary. Would you consider packaging up some Linux binaries for each release? Or is there a typical way of compiling JS apps to binary form for distribution?
When running gtop on the Windows Subsystem for Linux, there are improper characters being printed, despite the definition of environment variables LANG and TERM.
It would be nice to have some basic cli options.
Off the top of my head, it would be cool to have features like this included in the cli options.
Colorless flag option
Pick and choose widgets
I realize that this is ridiculous and most people will never encounter this, but on my 40 core, 80 thread server, the CPUs get cut off a little bit. It gets to CPU 27 and just stops. CPU 43 peaks through a little bit but that’s it.
Running in a bash environment on windows. Ran npm i -g gtop
, then gtop
and got the outline of what is supposed to appear, followed by:
TypeError: Cannot read property 'sort' of undefined
at Proc.updateData (C:\Users\ayost\AppData\Roaming\nvm\v6.10.0\node_modules\gtop\lib\monitor\proc.js:47:5)
at si.processes.data (C:\Users\ayost\AppData\Roaming\nvm\v6.10.0\node_modules\gtop\lib\monitor\proc.js:23:12)
at process.nextTick (C:\Users\ayost\AppData\Roaming\nvm\v6.10.0\node_modules\gtop\node_modules\systeminformation\lib\processes.js:300:25)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
Looks like the error is coming from data.list
being undefined here:
Line 46 in 8fbc3b1
For the docker folks, I'd like to do a PR but I need your help first.
FROM node:4
RUN apt-get update -y && apt-get upgrade -qy && \
npm install gtop -g
ENTRYPOINT ["gtop"]
docker run --rm -it \
--name gtop \
-e LANG=en_US.utf8 -e TERM=xterm-256color \
devmtl/gtop:stable
We can see in the screenshot that the processes are those running in the container and not those from the host.
My question is: Which folder(s) should we mount in the container ?
Many cheers!
$ node --version
)$ npm info gtop version
)node v4.2.1
npm v2.14.7
npm ERR! Linux 2.6.32-696.3.1.el6.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "gtop" "-g"
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! syscall connect
npm ERR! network connect ETIMEDOUT 151.101.0.162:443
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/gtop-master/npm-debug.log
ERROR LOG
==========>
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'gtop',
1 verbose cli '-g' ]
2 info using [email protected]
3 info using [email protected]
4 verbose install initial load of /usr/local/lib/package.json
5 verbose readDependencies loading dependencies from /usr/local/lib/package.json
6 silly cache add args [ 'gtop', null ]
7 verbose cache add spec gtop
8 silly cache add parsed spec Result {
8 silly cache add raw: 'gtop',
8 silly cache add scope: null,
8 silly cache add name: 'gtop',
8 silly cache add rawSpec: '',
8 silly cache add spec: '',
8 silly cache add type: 'range' }
9 silly addNamed gtop@
10 verbose addNamed "" is a valid semver range for gtop
11 silly addNameRange { name: 'gtop', range: '', hasData: false }
12 silly mapToRegistry name gtop
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry uri https://registry.npmjs.org/gtop
16 verbose addNameRange registry:https://registry.npmjs.org/gtop not in flight; fetching
17 verbose request uri https://registry.npmjs.org/gtop
18 verbose request no auth needed
19 info attempt registry request try #1 at 1:45:15 AM
20 verbose request id 75c0d36eb8f37d7b
21 http request GET https://registry.npmjs.org/gtop
22 info retry will retry, error on last attempt: Error: connect ETIMEDOUT 151.101.0.162:443
23 info attempt registry request try #2 at 1:46:28 AM
24 http request GET https://registry.npmjs.org/gtop
25 info retry will retry, error on last attempt: Error: connect ETIMEDOUT 151.101.52.162:443
26 info attempt registry request try #3 at 1:48:32 AM
27 http request GET https://registry.npmjs.org/gtop
28 verbose stack Error: connect ETIMEDOUT 151.101.0.162:443
28 verbose stack at Object.exports._errnoException (util.js:874:11)
28 verbose stack at exports._exceptionWithHostPort (util.js:897:20)
28 verbose stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)
29 verbose cwd /tmp/gtop-master
30 error Linux 2.6.32-696.3.1.el6.x86_64
31 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "gtop" "-g"
32 error node v4.2.1
33 error npm v2.14.7
34 error code ETIMEDOUT
35 error errno ETIMEDOUT
36 error syscall connect
37 error network connect ETIMEDOUT 151.101.0.162:443
37 error network This is most likely not a problem with npm itself
37 error network and is related to network connectivity.
37 error network In most cases you are behind a proxy or have bad network settings.
37 error network
37 error network If you are behind a proxy, please make sure that the
37 error network 'proxy' config is set properly. See: 'npm help config'
38 verbose exit [ 1, true ]
Hey Ali,
I am handling infrastructure operations and it would be really helpful for us ; Could you please suggest us full procedure to implement over RHEL 6 Servers having local yum repository and suggest me about Node.js installation ..
Will there be any amount of resources consumption installing this ? Any possible impact ( if any ) ?
Regards,
Dinesh Rathee
$ node --version
)$ npm info gtop version
)A description of the issue
If you have multiple disks, it would be nice to see separate usage charts for them. This includes removable disks such as USB drives.
If you use LVM, it would be good to have an option (a command line flag?) to also show the space left in each volume group.
too much cpu... suprisingly gtop work pretty good on synology. So I was wondering if we could test itwhich function of your app is eating so much cpu maybe? . it use around 80% of a dual core cpu on synology ds1512+
I noticed that the graphs in gtop would not plot values above ~80% (see attached picture). This can be fixed by changing the value of MaxY from 100 to 125 here, however I don't really know if that's the proper way to fix this bug.
Putting in a request for a feature to be added to the package. The ability to combine processes by name in the process list. Example: Google Chrome Helper on OS X. There are many processes that contain the same name and it'd be easier to see what is hogging CPU/Memory if combined.
Great package!
4.8.3
)0.1.5
)The colors in the README screenshot are different than the default. What colors are you using and where did you change it? Also for the network chart, mine are coming up as empty boxes instead of bars. I tried using LANG=en_US.utf8 TERM=xterm-256color gtop
.
$ node --version
) v8.0$ npm info gtop version
) 0.1.4I tried this command :
gtop LANG=en_US.utf8 TERM=xterm-256color
but it doesn't work. How can I solve the mark in windows 10 (Chinese)?
Thank you.
when I run 'gtop' in webstorm terminal:
RangeError: "size" argument must not be negative
at Function.Buffer.alloc (buffer.js:229:3)
at new Buffer (buffer.js:152:19)
at new Canvas (/usr/local/lib/node_modules/gtop/node_modules/drawille-blessed-contrib/index.js:17:18)
at new Context (/usr/local/lib/node_modules/gtop/node_modules/drawille-canvas-blessed-contrib/index.js:11:18)
at module.exports.Canvas.getContext (/usr/local/lib/node_modules/gtop/node_modules/drawille-canvas-blessed-contrib/index.js:274:24)
at Donut. (/usr/local/lib/node_modules/gtop/node_modules/blessed-contrib/lib/widget/canvas.js:22:29)
at Donut.EventEmitter._emit (/usr/local/lib/node_modules/gtop/node_modules/blessed/lib/events.js:98:20)
at Donut.EventEmitter.emit (/usr/local/lib/node_modules/gtop/node_modules/blessed/lib/events.js:117:12)
at emit (/usr/local/lib/node_modules/gtop/node_modules/blessed/lib/widgets/node.js:109:15)
at Screen.Node.insert (/usr/local/lib/node_modules/gtop/node_modules/blessed/lib/widgets/node.js:111:5)
But It's OK in the system terminal.
maybe hitting dd
while a process is highlighted does a kill -9
to it?
After slack/gitter/discord/whatever memory and cpu sucking electron "app" runs for 2-3 days w/out restart I need an easy way to kill all the renamed Google Chrome Helpers so I can have my 12gb of memory each one needs back. Because chat obviousely needs more ram than BF1
$ node --version
) 4.2.6$ npm info gtop version
) 0.1.5The system I am using (Packet's Type 2A, a 96-core ARMv8 system) has more cores in it than the gtop
display can easily show. A screen shot illustrates:
It looks like if the "CPU" window were floated to the top it could display things better.
Let me know:
https://github.com/LappleApple/feedmereadmes
(I work with your brother, btw :) — congrats on having the top-trending project on GH right now ...)
I want to use my desktop in my background. As a wallpaper.
*Can I use it with Conky?
I don't see processes in the processes window
$ node --version
) v7.10.0$ npm info gtop version
) 0.1.5When i run "gtop" and "top" command respectively (almostly run at the same time in two terminals) ,
i found that the value in "%CPU" column for mysql process is very different, below is the screenshot.
Could you explain this to me?
I frequently use htop
as part of a tilled terminal panel. I'll make that tile small, so it only shows the top graph. Rather than trying to display all the elements in a 100px high window, it might be better if gtop
behaved similarly, allowing the user to just display the top graph on a small tile.
Here's an example in htop
(top right):
Add this into package.json
and README.md
.
I installed gtop on OSX and Raspberry Pi and I noticed very high cpu usage comparable to other monitoring solutions (htop using 1% or less). Raspberry Pi was sitting at 100% CPU utilization just for gtop and OSX was anywhere between 5-15% CPU usage at any given time. Are performance improvements on the roadmap?
It would be nice to add a (optional) panel which would provide info about nvidia GPUs (e.g. workload memory, temperature etc).
The key functionality is already implemented in the nvidia-smi
tool. Maybe it would be sufficient to add a panel in which nvidia-smi -l 1
runs and provides the info?
I think the way vtop does it is pretty great: j
and k
for moving in the process list along with g
for going to the top and G
to the bottom.
There's also a few more keybinds for other features in vtop, like dd
for killing a process and h
and l
for zooming in and out of the graph timeline.
I also like how vtop shows a keybind help menu at the bottom of the screen. Would be nice to have that for the currect process sorting keybinds.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.