run Grafana in a docker/podman container

This article is a follow up after the Run podman/docker InfluxDB 1.8 container to collect statistics from collectd, where the time series database InfluxDB stores data and by using Grafana in another container it is easy and lightweight enough to visualize the collected data.
Containerizing the Grafana service is simple enough with docker/podman, but there are several tips and steps to consider before doing it. These steps will significantly ease the maintainer’s life, making upgrading, moving to another server, or backup important data really easy – just stop and start another container with the same options except name and container version.

main menu
podman run command grafana container

Here are the important points to mind when running Grafana 9 in a docker/podman container:
Keep on reading!

Create graph for CPU frequency grouped by processors/cores using Grafana, InfluxDB and collectd

This article shows how to make a graph showing a Linux machine’s CPU frequency changes. This plugin gathers CPU Frequency of all the virtual processors aka cores. In general, this module collects simple data for the processors’ frequencies like the Linux command of showing the number in /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq. The purpose of this article is to make a graph showing CPU frequency changes, which may be a hit for CPU load on the system.

main menu
example cpu cores frequency chart

The Linux machine is using collectd to gather CPU frequency statistics and send them to the time series back-end – InfluxDB. Grafana is used to visualize the data stored in the time series back-end InfluxDB and organize the graphs in panels and dashboards. Check out the previous articles on the subject to install and configure such software to collect, store and visualize data – Monitor and analyze with Grafana, influxdb 1.8 and collectd under CentOS Stream 9, Monitor and analyze with Grafana, influxdb 1.8 and collectd under Ubuntu 22.04 LTS and Create graph for Linux CPU usage using Grafana, InfluxDB and collectd
The collectd daemon is used to gather data on the Linux system and to send it to the back-end InfluxDB.

Key knowledge for the cpufreq collectd plugin

  • The collectd plugin cpufreq official page – https://collectd.org/wiki/index.php/Plugin:CPUFreq
  • The CPUFreq plugin options – https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_cpufreq There are no options for this plugin, at present.
  • to enable the CPUFreq plugin, load the plugin with the load directive in /etc/collectd.conf
    LoadPlugin cpufreq
    
  • The CPUFreq plugin collects data every 10 seconds.
  • cpufreq_value – a single Gauge value – a metric, which value that can go up and down. It is used to store the current CPU (or core)frequency. So there are multiple gauge values with different tags for the different cores (processors).
    tag key tag value description
    host server hostname The name of the source this measurement was recorded.
    type cpufreq The current frequency of the current processor or the current core.
    instance processors/cores ids The processors (or cores) starting from 0 to N.
  • A Gauge value – a metric, which value that can go up and down. More on the topic – Data sources.

    A GAUGE value is simply stored as-is. This is the right choice for values which may increase as well as decrease, such as temperatures or the amount of memory used, frequencies, etc.

  • To cross-check the value, the user can use the /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq and replacing the * with integer number like 0, 1, 2, etc.
    [root@srv ~]# cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
    4161945
    4184149
    4062907
    4044231
    4183620
    4107467
    4187644
    4167952
    

    The values are in Hz for the each virtual processor shown in /proc/cpuinfo under a Linux system.

Keep on reading!

Create graph for swap usage using Grafana, InfluxDB and collectd

This article shows how to make a graph showing a Linux machine’s swap memory. This plugin gathers physical swap memory utilization – cached, free, and used. In general, this module collects simple data for the swap memory like the Linux command free. The purpose of this article is to make a graph showing swap memory usage and consumption.

main menu
example usage of swap usage

The Linux machine is using collectd to gather the swap memory statistics and send them to the time series back-end – InfluxDB. Grafana is used to visualize the data stored in the time series back-end InfluxDB and organize the graphs in panels and dashboards. Check out the previous articles on the subject to install and configure such software to collect, store and visualize data – Monitor and analyze with Grafana, influxdb 1.8 and collectd under CentOS Stream 9, Monitor and analyze with Grafana, influxdb 1.8 and collectd under Ubuntu 22.04 LTS and Create graph for Linux CPU usage using Grafana, InfluxDB and collectd
The collectd daemon is used to gather data on the Linux system and to send it to the back-end InfluxDB.

Key knowledge for the Swap collectd plugin

  • The collectd plugin Swap official page – https://collectd.org/wiki/index.php/Plugin:Swap
  • The Swap plugin options – https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_swap This article relies on the default plugin’s options
    <Plugin swap>
    #       ReportByDevice false
    #       ReportBytes true
    #       ValuesAbsolute true
    #       ValuesPercentage false
    #       ReportIO true
    </Plugin>
    

    All the devices are reported as a single device not per device and bytes and absolute values are used not percentages.

  • to enable the Swap plugin, load the plugin with the load directive in /etc/collectd.conf
    LoadPlugin swap
    
  • The Swap plugin collects data every 10 seconds.
  • swap_value – includes a single Gauge value under swap type – a metric, which value that can go up and down. It is used to count the swap occupancy for the different categories (the category is saved in a tag value of one record, and the categories are free, used and etc.). So there are multiple gauge values with different tags for the different swap categories at a given time. And a second counter under swap_io type
    tag key tag value description
    host server hostname The name of the source this measurement was recorded.
    type swap | swap_io swap is the type, which will group the swap usage categories (cached, free, used). The swap_io groups the swap IO usage – how many IO operations are executed (in, out).
    type_instance swap categories The categories are cached, free, used.
  • A Gauge value – a metric, which value that can go up and down. More on the topic – Data sources.

    A GAUGE value is simply stored as-is. This is the right choice for values which may increase as well as decrease, such as temperatures or the amount of memory used.

  • A DERIVE value – a metric, in which the change of the value is interesting. For example, it can go up indefinitely and it is important how fast it goes up, there are functions and queries, which will give the user the derivative value.

    These data sources assume that the change of the value is interesting, i.e. the derivative. Such data sources are very common with events that can be counted, for example, the number of emails that have been received per second by an MTA since it was started. The total number of emails is not interesting.

  • To cross-check the value, the user can use the /proc/swap, /proc/meminfo and /proc/vmstat
    [root@srv ~]# cat /proc/swaps
    Filename                                Type            Size    Used    Priority
    /dev/zram0                              partition       16777212        2533856 -1
    [root@srv ~]# cat /proc/meminfo |egrep -e "^(SwapTotal:|SwapFree:|SwapCached:)"
    SwapCached:       175416 kB
    SwapTotal:      16777212 kB
    SwapFree:       14202396 kB
    [root@srv ~]# cat /proc/vmstat |egrep -e "^(pswpout|pswpin)"
    pswpin 877611681
    pswpout 376878365
    

    The swap_io values are multiplied by the page size of the current system. For Linux, it is 4K. Note, by default, the ReportBytes collectd option is not enabled, so the swap_io measurement is in pages since the last reboot. The swap_io counter is read from the pswpout and pswpin (i.e. they also represent the pages since the last reboot). In fact, these two values are really important to track down because they tell how much the system touches swap device(s) and it could point out a problem with the physical memory shortages.

Keep on reading!

Run podman/docker InfluxDB 1.8 container to collect statistics from collectd

Yet another article on the topic of the InfluxDB 1.8 and collectd gathering statistics, in continuation of the articles Monitor and analyze with Grafana, influxdb 1.8 and collectd under Ubuntu 22.04 LTS and Monitor and analyze with Grafana, influxdb 1.8 and collectd under CentOS Stream 9. This time, the InfluxDB runs in a container created with podman or docker software.

main menu
podman run and show databases

Here are the important points to mind when running InfluxDB 1.8 in a docker/podman container:
Keep on reading!

Create graph for Physical Memory grouped by states using Grafana, InfluxDB and collectd

This article shows how to make a graph showing a Linux machine’s memory. This plugin gathers physical memory utilization – used, buffered, cached, and free. In general, this module collects simple data for the physical memory like the Linux command free or top command. The purpose of this article is to make a graph showing memory usage and consumption.

main menu
example usage of physical memory

The Linux machine is using collectd to gather the memory statistics and send them to the time series back-end – InfluxDB. Grafana is used to visualize the data stored in the time series back-end InfluxDB and organize the graphs in panels and dashboards. Check out the previous articles on the subject to install and configure such software to collect, store and visualize data – Monitor and analyze with Grafana, influxdb 1.8 and collectd under CentOS Stream 9, Monitor and analyze with Grafana, influxdb 1.8 and collectd under Ubuntu 22.04 LTS and Create graph for Linux CPU usage using Grafana, InfluxDB and collectd
The collectd daemon is used to gather data on the Linux system and to send it to the back-end InfluxDB.

Key knowledge for the Memory collectd plugin

  • The collectd plugin Memory official page – https://collectd.org/wiki/index.php/Plugin:Memory
  • The Memory plugin options – https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_memory
  • to enable the Memory plugin, load the plugin with the load directive in /etc/collectd.conf
    LoadPlugin memory
    
  • The Memory plugin collects data every 10 seconds.
  • memory_value – a single Gauge value – a metric, which value that can go up and down. It is used to count the memory occupancy for the different categories (the category is saved in a tag value of one record, and the categories are Used, Free and etc.). So there are multiple gauge values with different tags for the different memory categories at a given time.
    tag key tag value description
    host server hostname The name of the source this measurement was recorded.
    type memory memory is the type, which will group the memory categories.
    type_instance memory categories The categories are buffered, cached, free, slab_recl, slab_unrecl, used.
  • A Gauge value – a metric, which value that can go up and down. More on the topic – Data sources.

    A GAUGE value is simply stored as-is. This is the right choice for values which may increase as well as decrease, such as temperatures or the amount of memory used.

  • To cross-check the value, the user can use the /proc/meminfo
    [root@srv ~]# cat /proc/meminfo |egrep -e "^(MemTotal|MemFree|Buffers|Cached|Slab|SReclaimable|SUnreclaim)"
    MemTotal:        3726476 kB
    MemFree:         2869736 kB
    Buffers:            5248 kB
    Cached:           400740 kB
    Slab:              67700 kB
    SReclaimable:      29200 kB
    SUnreclaim:        38500 kB
    

    Some of the lines are pretty clear about what they mean by “MemTotal“, “MemFree“, “Buffers” and so on.

Keep on reading!

Review of freshly installed Fedora 38 Xfce Desktop

After the tutorial on how to install Fedora 38 Xfce Desktop this tutorial is mainly to see what to expect from a freshly installed Fedora 36 Xfce Desktop – the look and feel of the new Xfce GUI (Xfce version – 4.18). The Fedora 38 Xfce Desktop is part of Fedora spins – https://spins.fedoraproject.org/xfce/
Here you can find out how to install it – Install Fedora 38 Xfce Desktop.
The idea of this article is to see what to expect from Fedora 38 Xfce – the look and feel of the GUI, the default installed programs, and their look and how to do some basic steps with them. Here you’ll find more than 170 screenshots and not so many texts we do not want to turn this review of many texts and version information and 3 meaningless screenshots, which you could not see anything for the user interface because these days it is the primary goal of a Desktop system. You can expect more of this kind of review in the future.
This article is the first part of reviewing the Fedora 36 Xfce Desktop. The second article contains Xfce Settings screenshots that are coming soon.

Xfce is a collection of programs that provides a features-rich desktop environment.

Here are some core elements:

  • Window Manager (xfwm4) – Handles the placement of windows on the screen.
  • Panel (xfce4-panel) – Provides a home for window buttons, launchers, app menu and more.
  • Desktop Manager (xfdesktop) – Sets desktop backgrounds, handles icons and more.
  • File Manager (thunar) – Manages your files in a modern, easy-to-use and fast way.
  • Volume Manager (thunar-volman) – Manages removable drives and media for Thunar.
  • Session Manager (xfce4-session) – Saves and restores your session, handles startup, autostart and shutdown.
  • Setting System (xfce4-settings) – Configures appearance, display, keyboard, and mouse settings.
  • Application Finder (xfce4-appfinder) – Quickly finds and launches applications installed on your system
  • Settings Daemon (xfconf) – Stores your settings in a D-Bus-based configuration system.
  • A Menu Library (garcon) – Implements a freedesktp.org compliant menu based on GLib and GIO.
  • Thumbnails Services (tumbler) – Implements the thumbnails management D-Bus specification.

Fedora 38 Xfce screenshots

SCREENSHOT 1) Fedora (6.2.9-300.fc38.x86_64) 38 (Xfce)

main menu
grub 2 entry boot

Keep on reading!

Install Fedora 38 Xfce Desktop

This article will show the simple steps of installing a modern Linux DistributionFedora 38 Xfce Desktop with Xfce for the graphical user interface – one of the alternatives, which tries to break the domination of GNOME and partly KDE Plasma. First, it is offered the basic steps for installing the Operating system and then there are some screenshots of the installed system and its look and feel. Here is another article available with more screenshots of the installed and working Fedora 38 Xfce DesktopReview of freshly installed Fedora 38 Xfce Desktop.
Xfce offers a fast, easy, and lightweight graphical environment for Linux systems and Fedora teams bring it out-of-the-box with their spins projects – Fedora Xfce Spin
This is the simplest setup. 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 Fedora 38 Xfce Desktop. All disk information in sda disk device will be permanently deleted by the installation wizard!

The Fedora 38 Xfce Desktop comes with:

  • linux kernel – 6.2.9
  • Xorg X11 server – 1.20.14 and Xorg X11 server XWayland 22.1.9 is used by default
  • Xfce: 4.18, which is the latest stable as of the official Xfce site.

For more packages and versions information the user may check out the Fedora 38 server articles – Software and technical details of Fedora Server 38 including cockpit screenshots.

We used the following ISO for the installation process:
https://download.fedoraproject.org/pub/fedora/linux/releases/38/Spins/x86_64/iso/Fedora-Xfce-Live-x86_64-38-1.6.iso
The ISO may be burnt on a disk or written on a USB stick. Just boot up from it.

The simplest way to make a bootable USB drive is to just use the Linux command dd. First, download the ISO file above and then plug the USB drive into the computer and find out the device name, it should be something of /dev/sda or /dev/sdb or /dev/sdc (execute the dmesg command in the console and check the last lines for the USB drive detection and its device name like /dev/sd?). After knowing the USB device name issue the dd command to overwrite it with the ISO. Note, all data will be lost if you use the following command with the device name mentioned in the command line.

myuser@mydesktop ~ # dd if=/mnt/media/OS/Fedora/Fedora-Xfce-Live-x86_64-38-1.6.iso of=/dev/sdd bs=8M status=progress oflag=direct
1610612736 bytes (1.6 GB, 1.5 GiB) copied, 11 s, 146 MB/s1683156992 bytes (1.7 GB, 1.6 GiB) copied, 11.4234 s, 147 MB/s

200+1 records in
200+1 records out
1683156992 bytes (1.7 GB, 1.6 GiB) copied, 11.4559 s, 147 MB/s

The USB flash drive should have at least 4G space. Using the dd command will overwrite the data on the USB drive without warning or confirmation!

The user can check what device name the just-plugged USB Drive has with dmesg console command:

myuser@mydesktop ~ # dmesg|tail -n 20
[1111445.079524] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1111445.079526] usb 3-2: Product: IS888 USB3.0 to SATA bridge
[1111445.079528] usb 3-2: Manufacturer: Innostor Technology
[1111445.079529] usb 3-2: SerialNumber: 088810000000
[1111445.083169] usb-storage 3-2:1.0: USB Mass Storage device detected
[1111445.083301] scsi host6: usb-storage 3-2:1.0
[1111446.092244] scsi 6:0:0:0: Direct-Access     KINGSTON  SNV425S2128GB        PQ: 0 ANSI: 0
[1111446.093165] sd 6:0:0:0: Attached scsi generic sg2 type 0
[1111446.093586] sd 6:0:0:0: [sdd] 250069680 512-byte logical blocks: (128 GB/119 GiB)
[1111446.093883] sd 6:0:0:0: [sdd] Write Protect is off
[1111446.093886] sd 6:0:0:0: [sdd] Mode Sense: 03 00 00 00
[1111446.094489] sd 6:0:0:0: [sdd] No Caching mode page found
[1111446.094497] sd 6:0:0:0: [sdd] Assuming drive cache: write through
[1111446.100093] GPT:Primary header thinks Alt. header is not at the end of the disk.
[1111446.100102] GPT:1402999 != 250069679
[1111446.100104] GPT:Alternate GPT header not at the end of the disk.
[1111446.100105] GPT:1402999 != 250069679
[1111446.100106] GPT: Use GNU Parted to correct GPT errors.
[1111446.100148]  sdd: sdd1 sdd2 sdd3
[1111446.100623] sd 6:0:0:0: [sdd] Attached SCSI disk

The just-plugged USB drive is attached to the system with the device name /dev/sdd.

SCREENSHOT 1) Boot from the UEFI USB Kingston drive.

It is the same as the UEFI USB CD/DVD-ROM bootable device. Choose the UEFI USB drive and boot the installation live drive.

main menu
UEFI BIOS USB boot

Keep on reading!

Review of freshly installed Fedora 38 KDE Plasma Desktop part 2 – System Settings

This is the part 2 of the Fedora 38 KDE Plasma Desktop review – Review of freshly installed Fedora 38 KDE Plasma Desktop (KDE GUI)
In part 2 only the System Settings of KDE Plasma is presented – the central place to configure and tweak the KDE Plasma – the graphical desktop environment with customizable layouts and panels, virtual desktops and sophisticated widgets. Some of the settings require an administrative account and whenever it is necessary the Plasma platform shows an authentication dialog to escalate privileges.
It worth mentioning the KDE Platform versions in Fedora 38:

  • KDE Plasma version: 5.27.4
  • KDE Frameworks version: 5.104.0, upgradable to 5.107.0
  • QT version: 5.15.8, upgradable to 5.15.10

The System Settings reflects the above versions and the functionality they incorporate.
The main components are:

  • Appearance
  • Workspace
    • Workspace Behavior
    • Windows Management
    • Shortcuts
    • Startup and Shutdown
    • Search
  • Personalization
    • Notifications
    • Users
    • Reginal Settings
    • Accessibility
    • Applications
    • KDE Wallet
    • Online Accounts
    • User Feedback
  • Network
    • Connections
    • Settings
  • Hardware
    • Input Devices
    • Display and Monitor
    • Audio
    • Power Management
    • Bluetooth
    • Color Corrections
    • KDE Connect
    • Printers
    • Removable Storage
    • Thunderbolt
  • System Administration
    • About this System
    • Software Update

System Settings may also be started from the console with

myuser@mydesktop ~ $ systemsettings

Here are the System Setting screenshots:

SCREENSHOT 1) Click on System Settings to launch the “System Settings” program.

View and edit KDE and some Linux system settings.

main menu
Main Menu – Favorites

Keep on reading!

Review of freshly installed Fedora 38 KDE Plasma Desktop (KDE GUI)

After the tutorial on how to install Fedora 38 KDE Plasma Desktop this tutorial is mainly to see what to expect from a freshly installed Fedora 38 KDE Plasma Desktop – the look and feel of the new KDE GUI (version 5.27.4 of KDE Plasma). The Fedora 38 KDE Plasma Desktop is part of Fedora spins – https://spins.fedoraproject.org/kde/
Here the user can find how to Install Fedora 38 KDE Plasma Desktop (KDE GUI). Here it worth mentioning the included versions of KDE software for Fedora 36:

  • KDE Plasma version: 5.27.4
  • KDE Frameworks version: 5.104.0, upgradable to 5.107.0
  • QT version: 5.15.8, upgradable to 5.15.10

The idea of this article is just to see what to expect from Fedora 38 KDE Plasma – the look and feel of the GUI, the default installed programs and their look and how to do some basic steps with them, it is included also screenshots of the KDE settings program. Here you’ll find more than 250 screenshots and not so many texts we do not want to turn this review of many texts and version information and 3 meaningless screenshots, which you could not see anything for the user interface because these days it is the primary goal of a Desktop system. You can expect more of this kind of review in the future. The big missing is the Kate Advanced Text Editor, which is not installed by default in this release.
This article is the first part of reviewing the Fedora 38 KDE Plasma. The second article contains KDE System Settings screenshots and it is Review of freshly installed Fedora 38 KDE Plasma Desktop part 2 – System Settings.

Some of the interesting screenshots

  • Logging
  • KDE Plasma Overview with Panel Toolbox
  • Fedora KDE main menu
  • Plasma Widgets
  • Activities
  • Install/Update applications with Discover
  • Install applications with dnfdragora
  • review of multiple installed GUI applications and games.
  • Dolphin – the KDE File Manager
  • KWrite – Text Editor

Fedora 38 KDE Plasma screenshots

SCREENSHOT 1) Fedora (6.2.9-300.fc38.x86_64) 38 (KDE Plasma)

main menu
grub entry boot

Keep on reading!

Install Fedora 38 KDE Plasma Desktop (KDE GUI)

This article will show the simple steps of installing a modern Linux Distribution like Fedora 38 KDE Plasma with KDE for the user graphical interface. First, it is offered the basic steps for installing the Operating system and then there are some screenshots of the installed system and its look and feel of it. Here is another article available with more screenshots of the installed and working Fedora 38 KDE PlasmaReview of freshly installed Fedora 38 KDE Plasma Desktop (KDE GUI). If the user is interested in Gnome as a graphical interface there are two articles on how to install Fedora 37 Workstation Edition, which comes with GNOMEInstall Fedora Workstation 38 (Gnome GUI) and Review of freshly installed Fedora 38 Workstation (Gnome GUI).
This is the simplest setup. 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 Fedora 38 KDE Plasma. All disk information in sda disk device will be permanently deleted by the installation wizard!

The Fedora 38 KDE Plasma Desktop comes with

  • Xorg X server – 22.1.9 XWayland is used by default
  • linux kernel – 6.2.9
  • KDE Plasma version: 5.27.4
  • KDE Frameworks version: 5.104.0
  • QT version: 5.15.8

For more packages and versions information the user may check out the Fedora 38 server articles – Software and technical details of Fedora Server 38 including cockpit screenshots.

We used the following ISO for the installation process:

https://download.fedoraproject.org/pub/fedora/linux/releases/38/Spins/x86_64/iso/Fedora-KDE-Live-x86_64-38-1.6.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 or to flush a USB drive with the ISO. Just use the Linux command dd and a USB flash drive. It’s worth mentioning the dd command will destroy all data on the USB drive and overwrite it with the Fedora KDE Live ISO, so be sure to use a UBS Flash, which data is not important or with no data on it. The dd command uses the ISO as input and the output is the USB drive in Linux device form as /dev/sd?. For the following dd command, the USB drive is /dev/sdd

dd if=/mnt/media/OS/Fedora/Fedora-KDE-Live-x86_64-38-1.6.iso of=/dev/sdd bs=8M status=progress oflag=direct
2306867200 bytes (2.3 GB, 2.1 GiB) copied, 14 s, 164 MB/s2408269824 bytes (2.4 GB, 2.2 GiB) copied, 14.6423 s, 164 MB/s

287+1 records in
287+1 records out
2408269824 bytes (2.4 GB, 2.2 GiB) copied, 14.6466 s, 164 MB/s

SCREENSHOT 1) Boot from the UEFI USB Drive Kingston device.

It is the same as the USB CD/DVD-ROM bootable removable drive. Choose the UEFI USB CD/DVD drive and boot the installation live drive.

main menu
UEFI BIOS DVD-ROM boot

Keep on reading!