Docker Graphical Management Tool Portainer

Open Source lightweight management UI tool Portainer for Docker hosts and Swarm clusters. Docker Graphical Management Tool Portainer can supercharger your development and be a relief for cli allergies. Portainer provides a detailed overview of Docker and allows you to manage containers, images, networks and volumes.

Docker Graphical Managing Tool

Docker Graphical Managing Tool Portainer

 

How to deploy Docker UI Tool on Linux

Create docker volume for portainer.io data

# docker volume create portainer_data
# docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

Once deployed the container enable port 9000 on your firewall.

# firewall-cmd --add-port 9000/tcp --permanent
# firewall-cmd --add-port 9000/tcp

Access the port 9000 where portainer is running using your browser.

http://<host>:9000

Deploy Docker Graphical Tool using Docker-Compose

 

# vi docker-compose.yml

 

version: '2'

services:
portainer:
image: portainer/portainer
ports:
- "9000:9000"
command: -H unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data

volumes:
portainer_data:

Save and exit.

# docker-compose up

Using Swarm Cluster

You can directly deploy Portainer as a service in your Docker cluster.

# docker volume create portainer_data
# docker service create \
--name portainer \
--publish 9000:9000 \
--replicas=1 \
--constraint 'node.role == manager' \
--mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock \
--mount type=volume,src=portainer_data,dst=/data \
portainer/portainer \
-H unix:///var/run/docker.sock

 

 

 

Monitor Bandwidth Usage per Process – NetHogs

nethogs is a very helpful tool to find out which PID is taking high bandwidth and the trouble with your network traffic as it groups bandwidth by process instead of breaking the traffic down per protocol or per subnet, like most tools, do. Monitor Bandwidth Usage per Process using Nethogs depends on ncurses for the text-based interface and libpcap for user-level packet capture.

If there’s suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this. This is very helpful for a system administrator to troubleshoot.

Features,

  • Shows TCP download- and upload-speed per process
  • Supports both Ethernet and PPP
  • Supports both IPv4 and IPv6

 

Install Nethogs Tool on a RHEL or CentOS or Fedora Linux

First, update EPEL repo and type the following yum command to install nethogs package:

yum install epel-release -y

Install NetHogs

yum install nethogs -y
Loaded plugins: fastestmirror, remove-with-leaves
apporbit-base | 2.9 kB 00:00:00
apporbit-c3 | 2.9 kB 00:00:00
base | 3.6 kB 00:00:00
epel/x86_64/metalink | 14 kB 00:00:00
epel | 4.7 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/3): apporbit-c3/primary_db | 112 kB 00:00:00
(2/3): epel/x86_64/updateinfo | 847 kB 00:00:00
(3/3): epel/x86_64/primary_db | 6.1 MB 00:00:00
Loading mirror speeds from cached hostfile
 * base: centos.aol.com
 * epel: mirror.solarvps.com
 * updates: ftp.osuosl.org
Resolving Dependencies
--> Running transaction check
---> Package nethogs.x86_64 0:0.8.5-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
 nethogs x86_64 0.8.5-1.el7 epel 38 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package

Total download size: 38 k
Installed size: 71 k
Is this ok [y/d/N]: y
Downloading packages:
nethogs-0.8.5-1.el7.x86_64.rpm | 38 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
 Installing : nethogs-0.8.5-1.el7.x86_64 1/1
 Verifying : nethogs-0.8.5-1.el7.x86_64 1/1

Installed:
 nethogs.x86_64 0:0.8.5-1.el7

Complete!

Install Nethogs Tool n a Debian or Ubuntu Linux

Type the following apt-get command/apt-get command

sudo apt-get install nethogs

 

Once you successfully installed, Run the following command to see the bandwidth results.

# nethogs

bandwidth usage checker

For more details.

 

[root@test]# nethogs -h

usage: nethogs [-V] [-h] [-b] [-d seconds] [-v mode] [-c count] [-t] [-p] [-s] [device [device [device …]]]
-V : prints version.
-h : prints this help.
-b : bughunt mode – implies tracemode.
-d : delay for update refresh rate in seconds. default is 1.
-v : view mode (0 = KB/s, 1 = total KB, 2 = total B, 3 = total MB). default is 0.
-c : number of updates. default is 0 (unlimited).
-t : tracemode.
-p : sniff in promiscious mode (not recommended).
-s : sort output by sent column.
-a : monitor all devices, even loopback/stopped ones.
device : device(s) to monitor. default is all interfaces up and running excluding loopback

nethogs running, press:
q: quit
s: sort by SENT traffic
r: sort by RECEIVE traffic
m: switch between total (KB, B, MB) and KB/s mode