Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

htop with web interface

Is there any simple and lightweight monitoring tool like well-known htop, but with web interface? For Debian / Repberry Pi. All solutions I've seen was complicated and resource-intensive.

like image 335
ofstudio Avatar asked Dec 05 '13 19:12

ofstudio


2 Answers

I've found an interesting solution to run htop (and any other interactive console application) in browser — shellinabox

Install shellinabox

[sudo] apt-get install shellinabox

Stop shellinabox daemon

[sudo] service shellinaboxd stop

Disable shellinaboxd autostart (in default configuration shellinaboxd serves http-ssh session on 4200 port)

[sudo] update-rc.d -f shellinaboxd remove

Now start shellinaboxd with own parameters

[sudo] shellinaboxd -t -b -p 8888 --no-beep \
       -s '/htop_app/:nobody:nogroup:/:htop -d 10'

Options:
-t — disable ssl (if necessary, not recommended for public servers)
-b — run in background
-p — web server port number
--no-beep — disable annoying beeps
-s '…commands…' — session configurstion, where
/htop_app/ — URL
nobody:nogroup — user and group for session (nobody:no group chosen for security reasons)
htop -d 10 — command (actually session shell): run htop with -d 10 argument (means update every second)

Now go to browser and navigate to

http://you_server_address:8888/htop_app/

Should look something like this (screenshot)

like image 169
ofstudio Avatar answered Sep 21 '22 21:09

ofstudio


glances is great! Use that!

https://nicolargo.github.io/glances/

https://iotrant.com/2019/09/03/keep-tabs-on-your-raspberry-pi-with-glances/

Very light dependencies -- basically just Python, psustil, bottle if you want to see it as a webservice...

like image 41
Jonathan Avatar answered Sep 21 '22 21:09

Jonathan