Tag: python

bench.py: The Classic Server Benchmark Scripts, Rebuilt in Python

There’s a ritual every VPS owner knows. New server comes online, and before anything else, you paste in a one-liner from a forum post — bench.sh, vpsbench, one of their many mutations — and pipe a shell script you’ve never read straight into bash to find out whether your new host oversold you. The results are useful. The tradition of…

Read More »

Python Virtual Environments on Debian 12

Notes on setting up and managing Python virtual environments on Debian 12 (bookworm), including what to do with a venv copied from another machine. System Python Debian 12 ships Python 3.11 as the system Python. There is no python3.12 package in the bookworm repos (3.12 arrives with Debian 13). python3 –version # Python 3.11.x Copied Venvs Don’t Work If a…

Read More »

Zabbix: Python3 script to export all Templates to individual XML files

By default, Zabbix permits the export of all templates, but what if I wanted to download all the templates as individual XML files. Zabbix makes it easy to export templates, but the built-in option bundles everything together. If you want each template saved as its own individual XML file, you’ll need a different approach. As it turns out, someone wrote…

Read More »

Certbot Requires Python 2.7

This article describes how to use certbot with Python 2.7.  The assumption is that you have already installed certbot. At the bottom of this article, is a related post on how to install Python 2.7.  After installing Python, install/run certbot. A shortcut, run a command within a temporary environment, like this functional example below. scl enable python27 ‘/opt/certbot-auto help’ To…

Read More »

Install Python 2.7 on CentOS 6.x

CentOS 6.x uses python 2.6 for various things.  It is the default install and Python 2.7 is not available as a typical install but I  had a need for it and found a solution that worked for me. yum -y update yum install -y centos-release-SCL yum install -y python27 scl enable python27 bash The test. python -V Python 2.7.13 cat…

Read More »
Speedtest

Command Line Testing Internet Bandwidth Using Python

Speedtest.net is a go to site for testing Internet speeds, which is usually accomplished through a web browser. There is a command line utility that offers the functionality without the need of a GUI or the web browser. cd /opt wget https://github.com/sivel/speedtest-cli/archive/master.zip unzip master.zip cd speedtest-cli-master/ chmod +x speedtest_cli.py ./speedtest_cli.py mv speedtest_cli.py /usr/bin/ To run the utility, type speedtest_cli.py. Here…

Read More »