Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux_router:misc [2023-12-03 Sun wk48 12:47] – [ntopng] baumkplinux_router:misc [2025-03-03 Mon wk10 11:49] (current) – [glances] baumkp
Line 19: Line 19:
  
 The darkstat output can then be seen on a web browser at ''192.168.1.1:667'' The darkstat output can then be seen on a web browser at ''192.168.1.1:667''
 +
 +The darkstat systemd intergration suck, it is a legacy setup.  As darkstat can simply be driven from command link I made a direct systemctl service file to operate.
 +
 +
 ---- ----
 ====glances==== ====glances====
 +See [[https://wiki.kptree.net/doku.php?id=tech_notes:programs#python|KPTree Pyton/pipx]] for more information
   * ''sudo apt install pipx''  ([[https://pypa.github.io/pipx/|pipx]] — Install and Run Python Applications in Isolated Environments)   * ''sudo apt install pipx''  ([[https://pypa.github.io/pipx/|pipx]] — Install and Run Python Applications in Isolated Environments)
   * ''pipx ensurepath''    * ''pipx ensurepath'' 
Line 30: Line 34:
   * [[https://www.tecmint.com/glances-an-advanced-real-time-system-monitoring-tool-for-linux/|Glances – An Advanced Real Time System Monitoring Tool for Linux]]   * [[https://www.tecmint.com/glances-an-advanced-real-time-system-monitoring-tool-for-linux/|Glances – An Advanced Real Time System Monitoring Tool for Linux]]
   * [[https://wiki.crowncloud.net/?How_to_install_Glances_on_Debian_11|How to Install Glances System Monitor on Debian 11]]   * [[https://wiki.crowncloud.net/?How_to_install_Glances_on_Debian_11|How to Install Glances System Monitor on Debian 11]]
-  * [[https://www.linuxcapable.com/how-to-install-glances-system-monitor-on-debian-11/|How to Install Glances on Debian 11]] 
   * [[https://www.linuxcapable.com/how-to-install-glances-on-debian-linux/|How to Install Glances on Debian 12, 11 or 10]]   * [[https://www.linuxcapable.com/how-to-install-glances-on-debian-linux/|How to Install Glances on Debian 12, 11 or 10]]
   * [[https://github.com/nicolargo/glances|nicolargo glances]]   * [[https://github.com/nicolargo/glances|nicolargo glances]]
 +  * [[https://fossguides.com/glances-the-best-modern-monitoring-tool-for-linux/|Glances – the Best Modern Monitoring Tool for Linux]]
  
 +
 +
 +As can be seen glances uses ''pipx'' this is a good reference that explains some use of ''pipx'' commands, [[https://www.marsja.se/pipx-installing-uninstalling-upgrading-python-packages-in-virtual-envs/|Pipx: Installing, Uninstalling, & Upgrading Python Packages in Virtual Envs]].  Some key ones are:
 +  *''pipx list'' to list the installed python packages under pipx
 +  *''pipx upgrade package'' to upgrade a python package under pipx
 +  *''pipx uninstall package'' to uninstall a pipx package
 ===Glances Options=== ===Glances Options===
  
 //**__The best hot key is 'h' which displays/hides the help screen__**// //**__The best hot key is 'h' which displays/hides the help screen__**//
  
-Below are the list of several hot keys+++++Below are the list of several hot keys:|
   * a – Sort processes automatically   * a – Sort processes automatically
   * c – Sort processes by CPU%   * c – Sort processes by CPU%
Line 60: Line 69:
   * q – Quit (Esc and Ctrl-C also work)   * q – Quit (Esc and Ctrl-C also work)
  
 +++++
 +
 +See Glances docs [[https://glances.readthedocs.io/en/develop/config.html#location|Configuration Location]] where the configuration file may be stored and the format and examples.  I choose to place at ''./config/glances/glances.config''
 +
 +.
 ===glances as a service=== ===glances as a service===
-Setup a systemd file for glances as a local web service ''sudo vim /lib/systemd/system/glances.service''+++++Setup a systemd file for glances as a local web service ''sudo vim /lib/systemd/system/glances.service''|
 <code> <code>
 [Unit] [Unit]
Line 75: Line 89:
  
 [Install] [Install]
-WantedBy=multi-user.target +WantedBy=multi-user.target </code> 
- +++++ 
-</code> +After modifying a systemd file update systemd: ''sudo systemctl daemon-reload''
-After modifying a systemd file update systemd: ''systemctl daemon-reload''+
  
-The glances output can then be seen on a web browser at ''192.168.1.1:61208''+The glances output can then be seen on a web browser at ''192.168.1.1:61208'' and will autostart with ''sudo systemctl enable glances.service''.
  
 ---- ----
Line 87: Line 100:
  
 I tried ntopng again in December 2023.  I ran in a Docker container on my Router, although markedly improved since trying a few years ago this this program suite still uses uses a lot of resources on my router which loads it up close to 50%.  There are occasional reports of dropped packet and such, further indicating overload.\\  I noted a problem with installing the Docker version.  The Docker package documentation and defaults are to the ''latest'', yet the available package is listed as ''stable'', e.g. ''docker run -it -p 3000:3000 --net=host ntop/ntopng:stable -i br0'' versus the instructed ''docker run -it -p 3000:3000 -v $(pwd)/ntopng.license:/etc/ntopng.license:ro --net=host ntop/ntopng:latest -i br0'' \\ I tried ntopng again in December 2023.  I ran in a Docker container on my Router, although markedly improved since trying a few years ago this this program suite still uses uses a lot of resources on my router which loads it up close to 50%.  There are occasional reports of dropped packet and such, further indicating overload.\\  I noted a problem with installing the Docker version.  The Docker package documentation and defaults are to the ''latest'', yet the available package is listed as ''stable'', e.g. ''docker run -it -p 3000:3000 --net=host ntop/ntopng:stable -i br0'' versus the instructed ''docker run -it -p 3000:3000 -v $(pwd)/ntopng.license:/etc/ntopng.license:ro --net=host ntop/ntopng:latest -i br0'' \\
-Another thing I do not like about this package is that the free community version is a significantly cut down of the full paid version.  The cost on the paid versions are substaincial and I can simply not justify for non-comerical home use.  There is no general individual personal free full use version available.\\+Another thing I do not like about this package is that the free community version is a significantly cut down of the full paid version.  The cost on the paid versions are substantial and I can simply not justify for non-commercial home use.  There is no general individual personal free full use version available.  The Docker container image is 2GB in size, the biggest image I have seen to date. Seems a bit bloated....\\
 **Hence I have decided not to use this software.**  **Hence I have decided not to use this software.** 
  
Line 108: Line 121:
 The Docker installation instructions for Ubuntu from Docker [[https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#uninstall-old-versions|Get Docker CE for Ubuntu]]. The Docker installation instructions for Ubuntu from Docker [[https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#uninstall-old-versions|Get Docker CE for Ubuntu]].
  
-__**This is pretty old, I played with it circa 2017, and have not used Docker since. have successfully been using full KVM based VMs for my main machines and so have not had much need for Docker**__ \\ +__**This is pretty old, I played with it circa 2017, and have not used Docker since. was successfully been using full KVM based VMs for my main machines and so did not have much need for Docker**__ \\ 
 That being said, I can see the benefits of containerisation, such as Docker, versus full virtual machines, such as KVM. Of course there are also benefits with full VMs!. That being said, I can see the benefits of containerisation, such as Docker, versus full virtual machines, such as KVM. Of course there are also benefits with full VMs!.
 +
 +In 2022 I revisited Docker and basically have move my various VM applications to Docker containers/ stacks.  I run my Docker instance in a VM to isolate Docker from bare metal.  This is primarily as Docker plays around with iptables. I do not like this, particularly on my main router machine that I use on bare metal nftables as the router/fire software.
 ====Docker Host Security==== ====Docker Host Security====