Install and use collectd-ping under CentOS 8 to monitor latency

Tracking the network latency of the servers’ network is not an easy job. Most monitoring software is capable to monitor the state of the server, but how to monitor the state of the connectivity and the network latency and even the Internet connectivity with some respectful addresses like 1.1.1.1 or 8.8.8.8? It should be easy to do it with ICMP and ping command but using the collectd daemon and one of its plugins offers collectd-ping from https://collectd.org/wiki/index.php/Plugin:Ping to save all the history in a time series back-end and using grafanahttps://grafana.com/ (or other graphs/histograms and etc software) to make graphs.
Using the collectd-ping plugin in conjunction with grafana may reach the similar effect as using the old and gold smokeping.
CentOS 7 included the collectd-ping plugin in its official repository, but in CentOS 8 the plugin is missing! Under Cent OS 8 the CentOS SIG OpsTools https://wiki.centos.org/SpecialInterestGroup/OpsTools includes the collectd-ping plugin in their repository. More on SIG and OpsTools may be obtained in the later page. In general, it is safe to use this repository it would not break user’s system.
Here is how to install and configure it. Real grafana examples are also included at the end.

The example here assumes there is a grafana server installed with influxdb backend.

STEP 1) Add OpsTools repository and install the collectd and collectd-ping.

The OpsTools repository is installed with centos-release-opstools package.
Here is what is going to install:

dnf install -y centos-release-opstools
dnf install -y collectd collectd-ping

Keep on reading!

Upgrading Ubuntu 20 to Ubuntu 22 – software versions upgrade table – head-to-head

In the following article a comparison between two LTS versions of Ubuntu is presented – Ubuntu 20.04 LTS (Focal) versus Ubuntu 22.04 LTS (Jammy). The latest version of Ubuntu 20.04 and Ubuntu 22.04 (13.05.2022) is used to generate the software versions below.

In the Desktop world upgrading to the new and latest version of a Linux distribution is almost mandatory, but in the server world, upgrading is more complicated. The first step in updating a server is to check what software versions come with the new distribution version and then check whether the running custom (application) software supports the software versions. For example, updating to a new distribution version, which comes with PHP 8.1, but the current application supports only 7.4 is not very wise and in addition, the current version may have years of support in the future.

But as it may be seen below, the new Ubuntu server 22.04 LTS brings much newer versions compared to even the latest updates from Ubuntu server 20.04 LTS most of the latest server software.

There is a previous version of this article comparing the Ubuntu 18.04 LTS and Ubuntu 20.04 LTSUpgrading Ubuntu 18 to Ubuntu 20 – software versions upgrade table – head to head

SoftwareUbuntu 22.04Ubuntu 20.04
Linux kernel.
.
.
.
.
.
.
5.15.0
5.4.0
5.6.0
5.8.0
5.10.0
5.11.0
5.13.0
5.14.0
libc2.352.31
OpenSSL3.0.21.1.1f
GNU GCC.
.
9.4.0
10.3.0
11.2.0
12-20220302
8.4.0
7.5.0
9.4.0
10.3.0
PHP8.17.4
Python2.7.18
3.10.4
2.7.17
3.8.10
Perl5.34.05.30.0

6.d
Ruby3.02.7
OpenJDK8u312-b07
11.0.15
.
.
17.0.3
18~36ea-1
8u312-b07
11.0.15
13.0.7
16.0.1
17.0.3
Go lang1.13.8


1.17.3
1.18.1
1.13
1.14
1.16
Rust1.58.11.57.0
llvm.
.
.
.
.
11.1.0
12.0.1
13.0.1
14.0.0
6.0.1
7.0.1
8.0.1
9.0.1
10.0.0
11.0.0
12.0.0
nodejs12.22.910.19.0
Subversion1.14.11.13.0
Git2.34.12.25.1
Apache2.4.522.4.41
Nginx1.18.01.18.0
MySQL server8.0.298.0.29
MariaDB10.6.710.3.34
PostgreSQL14.212.10
SQLite2.8.17
3.37.2
2.8.17
3.31.1
Xorg X server1.22.1.11.20.13
Gnome Shell42.03.36.9
qemu6.24.2
docker20.10.1220.10.12
lxc5.0.04.0.6

Install Ubuntu Desktop 22.04 LTS on the entire disk

This tutorial will show the simple steps of installing the latest version of UbuntuUbuntu Desktop 22.04 LTS. This is the simplest set up. One hard disk device in the system is installed, which is detected as sda and the entire disk will be used for the installation of Ubuntu Desktop 22.04 LTS. All disk information in sda disk device will be permanently deleted by the installation wizard!
Ubuntu Desktop 22.04 LTS comes with the following software:

  • Xorg X server – 1.22.1.1
  • GNOME (the GUI) – 42.0
  • linux kernel – 5.15.0
  • linux-firmware – 20220329.git681281e4
  • QT – 5.13.3 and 6.2.4
  • libc – 2.35
  • gnu gcc – 9.4.0, 10.3.0, 11.2.0 and 12-20220302
  • coreutils – 8.32
  • python2.7 (possible to install) – 2.7.18
  • python3 (default) – 3.10.4
  • perl – 5.34.0
  • apt – 2.4.5
  • cups – 2.4.1

A more complex installation with a dual boot set up could found here – Install Ubuntu Desktop 22.04 LTS on a PC with existing windows 10 – dual boot.

We used the following ISO for the installation process – Ubuntu 22.04 LTS (Jammy Jellyfish):

https://releases.ubuntu.com/22.04/ubuntu-22.04-desktop-amd64.iso

It is a LIVE image so you can try it before installing it. The easiest way is just to download the image and burn it to a DVD disk and then follow the installation below:

SCREENSHOT 1) Select to “Try or Install Ubuntu” and hit enter.

To install Ubuntu from your DVD or USB you must boot from it, so change your BIOS accordingly – first boot devide should be the DVD or USB drive with Ubuntu installation. If you do it successfully you would see the screenshot below.

main menu
Grub2 try install linux

Keep on reading!

Install Ubuntu Desktop 22.04 LTS on a PC with existing windows 10 – dual boot

This tutorial will show the simple steps of installing the latest version of UbuntuUbuntu Desktop 22.04 LTS. Here we present the more advanced setup installation when you have already had installed operating systems, so this installation will add Ubuntu 22.04 LTS to one existing operating system – Microsoft Windows 10 Professional. So there we have 2 hard disks in the system – one is NVME, the other one is an SSD. The installation uses the first disk – “sda” in this case. The SSD has two partitions, which are going to be removed, and a new disk layout will be used for the Ubuntu installation with three partitions – efi, swap and root parititions.
Ubuntu Desktop 22.04 LTS comes with the following software:

  • Xorg X server – 1.22.1.1
  • GNOME (the GUI) – 42.0
  • linux kernel – 5.15.0
  • linux-firmware – 20220329.git681281e4
  • QT – 5.13.3 and 6.2.4
  • libc – 2.35
  • gnu gcc – 9.4.0, 10.3.0, 11.2.0 and 12-20220302
  • coreutils – 8.32
  • python2.7 (possible to install) – 2.7.18
  • python3 (default) – 3.10.4
  • perl – 5.34.0
  • apt – 2.4.5
  • cups – 2.4.1

We used the following ISO for the installation process – Ubuntu 22.04 LTS (Jammy Jellyfish):

https://releases.ubuntu.com/22.04/ubuntu-22.04-desktop-amd64.iso

It is a LIVE image so you can try it before installing it. The easiest way is just to download the image and burn it to a DVD disk and then follow the installation below:

SCREENSHOT 1) Boot from the DVD or USB flash drive to install the Ubuntu 22.04 LTS.

main menu
UEFI DVD boot install

Keep on reading!

Installation of base Ubuntu server 22.04 LTS

This tutorial will show you the simple steps of installing a modern Linux DistributionUbuntu server 22.04 LTS edition. Following most of the default options during the setup configuration for simplicity. The installation wizard is very much the same as the Ubuntu server 20.04 LTS – Minimal installation of Ubuntu server 20.04 LTS

Here are some basic data from the default installation setup settings:

  1. Installed packages – ~610 occupying 2.9G of space.
  2. 3 partitions when using automatic patition layout – boot efi, boot and root.
  3. ext4 used for the root parition.

The Ubuntu Server 22.04 LTS comes and updates to the following Linux packages:

  • Linux kernel : 5.15.
  • Python : 3.10.4
  • GLibc : 2.35
  • OpenSSL : 3.0.2
  • systemd : 249.11

The most interesting is the version of OpenSSL 3.x in an LTS (Long Term Support) release, which should be pretty stable to be included.

We used the following ISO for the installation process – Ubuntu 22.04 LTS (jammy jellyfish):

http://releases.ubuntu.com/jammy/ubuntu-22.04-live-server-amd64.iso

SCREENSHOT 1) Boot from the disk or USB – whatever you made after downloading the ISO file from Ubuntu’s official source.

On the image here the DVD is used to boot in UEFI mode installation.

main menu
boot uefi dvd

Keep on reading!

Install newer version of python 3.10 under CentOS 8

At present, the default version of python under CentOS 8 is Python 3.6.8, which is 6 years old. More and more python software needs newer versions, so it is a vital for pretty stable Linux distro to have an easy way to install newer programming languages like python!
Using Conda it is really easy to manage different environments for different python versions!

Conda is an open source package management system and environment management system that runs on Windows, macOS and Linux.

More on CondaInstalling conda command line in various systems with miniconda and create a simple python environment and all Conda tags – https://ahelpme.com/category/software/anaconda/. This article is not intended to introduce the reader with Conda, but to show how easy is to install the newer version of python 3.10 under CentOS 8 and it is easy because of using the Conda package management system!

To summarize, the purpose is to have a user with python 3.10. The user can be an ordinary or administrative one or even root.
Using this method older or newer versions of python may be installed on the same machine (at the same time).

STEP 1) Install the latest Miniconda3

The installation is easy and for more details check out the first link above.
Keep on reading!

How to run QEMU full virtualization with MacVTap networking using NetworkManager under CentOS 8

In addition to the previously presented article on the subject Howto do QEMU full virtualization with MacVTap networking this one shows how to run a QEMU virtual machine with a MAcVTap device in bridge mode on the host server configured only by using the NetworkManager cli – nmcli.

It is worth mentioning the MacVTap is a virtual bridge, which will make the host and the guest device show up directly on the host switch. So when using QEMU, the guest virtualized system will be as if it is connected to the host switch with one limitation – the host and guest cannot communicate with each other. The IPs of the host won’t be reachable from the guest, so NAT (masquerade) between the host and guest is not possible with this setup. Still, if the NAT server is on another server or a real IP is planned for the guest, MacVTap is the right functionality to use with the QEMU guest system.

Summary

  1. Add MacVTap device in bridge mode with name macvtap0.
  2. Install QEMU.
  3. Create QEMU local disk.
  4. Run a QEMU virtual server.

STEP 1) Add MacVTap device in bridge mode with name macvtap0

[root@srv ~]# nmcli connection add type macvlan dev enp0s3 mode bridge tap yes ifname macvtap0 con-name macvtap0 ip4 0.0.0.0/24
Connection 'macvtap0' (7a5ef04c-ea98-4642-ac5d-4239f715f631) successfully added.
[root@srv ~]# nmcli con
NAME      UUID                                  TYPE      DEVICE   
enp0s3    09497bbf-da59-42b7-a72c-d69369760b36  ethernet  enp0s3   
macvtap0  7a5ef04c-ea98-4642-ac5d-4239f715f631  macvlan   macvtap0 

First, create a MacVTap device with the name macvtap0 in bridge mode with the network interface enp0s3 a and a connection with the name macvtap0. The IP is set to manual mode.
More detailed information on how to create and add MacVTap device with the NetworkManager here – Create MacVTap device using NetworkManager nmcli under CentOS 8

STEP 2) Install QEMU.

Install the QEMU virtual tools under CentOS 8 Stream. At present, the QEMU version is 6.2, which is pretty new.
Keep on reading!

Create MacVTap device using NetworkManager nmcli under CentOS 8

In continuation of NetworkManager management with nmcli, here is a quick Linux console tip for users like CentOS 8 (or all distributions, which use the NetworkManager for managing the networking). How to create a virtualized bridge device MacVTap device with the NetworkManager nmcli command utility, which will preserve all the configuration over reboots.

nmcli connection add type macvlan dev enp0s3 mode bridge tap yes ifname macvtap0 con-name macvtap0 ip4 0.0.0.0/24

The line above creates a virtualized bridged interface and a connection with the name macvtap0. The MAcVTap device with the name macvtap0 is in bridge mode with the physical network interface enp0s3 with manual IP setting. If the IP is not included a DHCP option will be used as default.

There is one big limitation – there is no link between the enp0s3 and macvtap0. When used macvtap0 could receive packets from the network through the enp0s3, but there is no direct link between the two network devices. In simple words, when used in a virtualized environment in a virtual machine the virtual machine may have access to the network shared with the enp0s3, but the virtual machine cannot communicate with the IPs of the enp0s3!

Typically, this is used to make both the guest and the host show up directly on the switch that the host is connected to.

Linux Virtualization, https://virt.kernelnewbies.org/MacVTap

Initial state, only one connection in NetworkManager.

The main server connection with name enp0s3 using the same name network interface enp0s3:

[root@srv ~]# nmcli con
NAME    UUID                                  TYPE      DEVICE 
enp0s3  09497bbf-da59-42b7-a72c-d69369760b36  ethernet  enp0s3
[root@srv ~]# nmcli 
enp0s3: connected to enp0s3
        "Intel 82540EM"
        ethernet (e1000), 08:00:27:03:C9:2E, hw, mtu 1500
        ip4 default
        inet4 192.168.0.20/24
        route4 192.168.0.0/24 metric 100
        route4 0.0.0.0/0 via 192.168.0.1 metric 100
        inet6 fe80::a00:27ff:fe03:c92e/64
        route6 fe80::/64 metric 100

lo: unmanaged
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

DNS configuration:
        servers: 8.8.8.8 1.1.1.1
        interface: enp0s3

Use "nmcli device show" to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.

Consult nmcli(1) and nmcli-examples(7) manual pages for complete usage details.

Add the MacVTap device with the name macvlan0

[root@srv ~]# nmcli connection add type macvlan dev enp0s3 mode bridge tap yes ifname macvtap0 con-name macvtap0 ip4 0.0.0.0/24
Connection 'macvtap0' (7a5ef04c-ea98-4642-ac5d-4239f715f631) successfully added.

A MacVTap device, a network connection, and a link are established. The name of the MacVTap device and the network connection is macvtap0.

Keep on reading!

Software and technical details of Fedora Server 35 including cockpit screenshots

This article is for those of you who do not want to install a whole new operating system only to discover some technical details about the default installation like disk layout, packages included, software versions, and so on. Here we are going to review in several sections what is like to have a default installation of Fedora Server 35 using a real not virtual machine!
The kernel is 5.14.10 it detects successfully the Threadripper 1950X AMD and the system is stable (we booted in UEFI mode).
The installation procedure uses default options for all installation setups – Minimal network installation of Fedora 35 Server.
Installed packages are 604 occupying 1.7G space:. Note, this is Fedora Server Install, not minimal install. The server install includes the web console – cockpit version 254.

[root@srv ~]# dnf list installed|wc -l
604
[root@srv ~]# df -h /
Filesystem                      Size  Used Avail Use% Mounted on
/dev/mapper/fedora_fedora-root   15G  1.4G   14G  10% /

Keep on reading!

How to run QEMU full virtualization with bridged networking using NetworkManager under CentOS 8

In addition to the previously presented article on the subject Howto do QEMU full virtualization with bridged networking this one shows how to run a QEMU virtual machine with a bridge networking on the host server configured only by using the NetworkManager cli – nmcli.

It is worth mentioning the bridge interface presented in this article is a local bridge device for the server and no Internet addresses or real (or main or Internet-connected) network cards are bound to it. So no MAC addresses of slaved bridged devices will leave the server.
If a network bridge, which includes the Internet (main) server network device is needed, for example, to set real IPs in a virtual machine, there is another article on the bridge networking subject – Replace current interface configuration with a bridge device using nmcli (NetworkManager)

Summary

  1. Add bridge and TUN/TAP device.
  2. Install QEMU.
  3. Create QEMU local disk.
  4. Run a QEMU virtual server.

STEP 1) Add bridge and TUN/TAP device.

[root@srv ~]# nmcli connection add type bridge ifname br0 con-name br0 ipv4.method manual ipv4.addresses "192.168.0.1/24"
Connection 'br0' (ad6878c8-1e06-4af8-a81f-1eb39e761df8) successfully added.
[root@srv ~]# nmcli connection up br0
Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/3)
[root@srv ~]# nmcli connection add type tun ifname tap0 con-name tap0 mode tap owner 0 ip4 0.0.0.0/24
Connection 'tap0' (dacee2be-a14b-4cf5-83d4-96d072a96725) successfully added.
[root@srv ~]# nmcli con add type bridge-slave ifname tap0 master br0
Connection 'bridge-slave-tap0' (66490382-b239-4eb2-ae1d-ee811e39596c) successfully added.
[root@srv ~]# nmcli con
NAME               UUID                                  TYPE      DEVICE 
System eno1        abf4c85b-57cc-4484-4fa9-b4a71689c359  ethernet  eno1   
br0                ad6878c8-1e06-4af8-a81f-1eb39e761df8  bridge    br0    
tap0               dacee2be-a14b-4cf5-83d4-96d072a96725  tun       tap0   
bridge-slave-tap0  66490382-b239-4eb2-ae1d-ee811e39596c  ethernet  -- 

First, a bridge device is added with manual IP. If the IP is skipped the bridge interface br0 would have DHCP enabled by default, which may not be the desired.
More detailed information on how to create and add TUN/TAP device with the NetworkManager here – Create bridge and add TUN/TAP device using NetworkManager nmcli under CentOS 8

STEP 2) Install QEMU.

Install the QEMU virtual tools under CentOS 8 Stream. At present, the QEMU version is 6.2, which is pretty new.
Keep on reading!