htop with web interface

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)


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...