Capturing Packets on Windows with Packet Monitor (Pktmon)

As https://learn.microsoft.com/en-us/windows-server/networking/technologies/pktmon/pktmon puts it: Packet Monitor (Pktmon) is an in-box, cross-component network diagnostics tool for Windows. It can be used for packet capture, packet drop detection, packet filtering and counting. Nice thing about it is that it is present by default on all modern Windows versions, so you can do a quick packet capture when […]

Python Versions

Even though I’ve used Python programming language on-and-off since about year 2000, I only started paying more attention to specific Python versions around 2016 when I gradually started using Python more seriously in devops. When dealing with different runtime environments it is crucial to know which features are available in which Python versions. This page […]

Using Tmux

A long time ago I discovered screen. It made it possible to start applications in Linux and then disconnecting the SSH session, without stopping the applications. It was magic: otherwise the the applications just terminated if the SSH connection was lost. Then I heard about tmux. It was like screen on steroids! I could split […]

Count Lines of Python Code

I have created a new application called lopc (Lines of Python Code). It is available for install with pip on PyPI (https://pypi.org/project/lopc/), and the source code is available on GitHub: https://github.com/markkuleinio/lopc The app really only counts the number of non-empty and non-comment lines of *.py files in the given directories. These are some features of […]

Python f-String Formatting Codes

Here is my short list about the common f-string formatting codes in Python: >>> score = 123.728 >>> f”{score}” ‘123.728’ Minimum field length: >>> f”{score:>10}” ‘ 123.728’ >>> f”{score:<10}” ‘123.728 ‘ >>> f”{score:^10}” ‘ 123.728 ‘ Number of decimals: >>> f”{score:.2f}” ‘123.73’ >>> f”{score:10.2f}” ‘ 123.73’ >>> f”{score:<10.2f}” ‘123.73 ‘ Padded with a character: >>> […]

Zabbix Active Agent Autoregistration

Let’s see how the Zabbix active agent autoregistration works in the communication. I have configured the Zabbix agent (version 6.2.3) on the Linux host at 192.168.7.17 with this configuration: ServerActive=192.168.7.15 Hostname=Test-agent After restarting the agent, the Zabbix server (version 6.2.3) at 192.168.7.15 logged immediately in /var/log/zabbix/zabbix_server.log: cannot send list of active checks to “192.168.7.17”: host […]