You are not logged in.

#1 2017-05-20 10:10:54

o9000
tint2 developer
From: Network Neighborhood
Registered: 2015-10-24
Posts: 399
Website

Resource monitoring plots like conky, but in the terminal

Borrowing the idea from my other thread to plot ping output in the terminal, I hacked dstat, which is a pretty awesome resource monitor by the way, and modified it to plot all metrics in the terminal:

Demo

Bigger demo

Code


Why not use conky? Because it's not my computer I'm monitoring, I'm connecting over SSH to other machines. So I'm stuck with either using terminal tools, or installing more sophisticated monitoring systems, which I'd rather not bother with, since they have their quirks.

Last edited by o9000 (2017-05-20 10:35:28)

Offline

#2 2017-05-20 10:46:44

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Resource monitoring plots like conky, but in the terminal

What a lovely tool, thanks for sharing!

2017-05-20-112543_633x245_scrot.png


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#3 2017-05-20 12:07:44

o9000
tint2 developer
From: Network Neighborhood
Registered: 2015-10-24
Posts: 399
Website

Re: Resource monitoring plots like conky, but in the terminal

I increased contrast a bit on white terminals. Need to pass CLI option --bw or --black-on-white.

Offline

#4 2017-05-20 12:40:51

ector1935
Member
Registered: 2017-05-03
Posts: 150

Re: Resource monitoring plots like conky, but in the terminal

If you are interested in:
https://github.com/sysstat/sysstat

Offline

#5 2017-05-20 13:01:51

o9000
tint2 developer
From: Network Neighborhood
Registered: 2015-10-24
Posts: 399
Website

Re: Resource monitoring plots like conky, but in the terminal

Right, that would be one of the slightly more sophisticated tools. Another one, a bit in between, is atop.

dstat is more like htop than sysstat/sar: it's not made for continuous logging (it can, but it works poorly), but rather firing it up occasionally to check something in real time.

I found this page useful: 80 Linux Monitoring Tools

Offline

#6 2017-05-20 13:06:56

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Resource monitoring plots like conky, but in the terminal

o9000 wrote:

I increased contrast a bit on white terminals

Brilliant, thanks again!

Screenshot_2017-05-20_14-02-41.png

Much more readable glasses

My previous scrot shows a half-finished scheme so perhaps wasn't the best example to post  ops


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#7 2017-05-20 13:20:48

o9000
tint2 developer
From: Network Neighborhood
Registered: 2015-10-24
Posts: 399
Website

Re: Resource monitoring plots like conky, but in the terminal

Oh you are using st too? I thought it was a pretty obscure application.

I should post my patches, others might find them useful. But I've changed things in a hurry without trying to understand the code well, so I'm not sure what might break other setups.

In short:
* I patched it to show an icon in the WM and tint2;
* I changed keybindings for xterm compatibility and set TERM to xterm-256colors instead of st so that I can SSH into machines not having the st terminfo file without fscking up the shell and other programs;
* I added normal X11 copy/paste support in addition to select/middle-click;
* Ctrl+C copies when text is selected, interrupts when it isn't; Ctrl+V pastes; that's because I hate pressing 3 keys, I have RSI.

Most of these changes are rather intrusive so I doubt they'll make it upstream. Which is why I didn't bother making them public. But I think I might post them after all.

Last edited by o9000 (2017-05-20 13:21:27)

Offline

#8 2017-05-20 13:22:42

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Resource monitoring plots like conky, but in the terminal

o9000 wrote:

* I patched it to show an icon in the WM and tint2

This would be very useful to me smile

And yes, st rocks!


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#9 2017-05-20 17:46:17

o9000
tint2 developer
From: Network Neighborhood
Registered: 2015-10-24
Posts: 399
Website

Re: Resource monitoring plots like conky, but in the terminal

https://gitlab.com/o9000/st

Sadly I ran the code through clang-format and there is a huge diff due to whitespace changes. I can't break it into patches easily.

Last edited by o9000 (2017-05-20 17:47:40)

Offline

Board footer

Powered by FluxBB