Featured »

March 2, 2022 – 2:00 pm

Books have been written on the subject of awk and sed. Here’s a small sample of commands I put together over the years that are useful for everyday system administration tasks. Most of these tasks …

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Archive by Category

Articles in Featured

Finding Prime Numbers

April 22, 2016 – 2:09 pm
numbers

I have no intention of competing with GIMPS. To me this is a fun scripting exercise that may produce useful results beyond this initial application. Our goal is to take a bunch of integers and …

Parallel MySQL Queries

January 19, 2016 – 12:38 am
mysql_0001

Unlike Oracle, MySQL has no support for parallel SQL queries. A bummer for sure, in light of all the awesome multi-coreness we enjoy these days. There’ve been some attempts (1, 2) to get around this …

Tracking Network Connections Over Time

January 13, 2016 – 3:31 pm
network_cable_01

Firewall changes, datacenter migrations, application re-hostings, server decommissions are just some of the activities where having a record of network connections over time can help avoid confusion and unplanned downtime. To capture all network connections, …

Log Event Time Distribution (Part II)

November 11, 2015 – 2:30 am
time clock watch

Earlier I discussed a way to visualize frequency and distribution of messages in log files. Here’s a script to help you with that. Currently, the script works with two time formats: the one used in …

Securing VSFTP with TCP Wrappers and IPTables

November 11, 2015 – 1:44 am
computer_security_0001

I’ve been drinking beer and perhaps had one too many. Regardless of the reason, I felt the urge to further secure my favorite server. The target of my paranoia is once again the VSFTPd. I …

Create ISO Images

October 2, 2015 – 5:56 pm
barrels

The genisoimage has been around for a few years, but is relatively little-known. It is a pre-mastering program to generate ISO9660/Joliet/HFS hybrid filesystems and is particularly good for creating portable data backups. Here are a …

Linux CLI Network Speed Test

September 1, 2015 – 12:36 am
network switch

The speedtest.net is probably one of the more popular bandwidth testing utilities, Unfortunately, this and many other similar tools require a Web browser with late-version Flash or Java support, which can be problematic on Unix …

Dealing with Runaway Processes

July 14, 2015 – 10:46 pm
shell_003

There is no official definition of a “runaway process”. Generally, it is a process that ignores its scheduled priority. It can also be a process that enters an infinite loop. Or it can be a process …

Practical TShark Capture Filters

June 12, 2015 – 9:30 am
ethernet cables

The tshark is the command-line interface for Wireshark – a popular open-source network packet analyzer. A seemingly infinite variety of options make tshark an unlikely choice for casual use. Nevertheless, the power of CLI justifies the extra …

Simple Statistical Functions in Shell

June 3, 2015 – 12:01 pm
colorful shells

Here’s a small collection of basic statistical functions you can use in your shell scripts. This may come in handy when analyzing disk space, system performance, etc.

Regex Collection

May 14, 2015 – 12:29 pm
shell_001

Just a small collection of POSIX regular expressions that may come in handy for writing sysadmin scripts.

A Better Mysqlcheck Script

April 2, 2015 – 10:44 am
SQL_query

Mysqlcheck is a stand-alone MySQL utility for checking, optimizing and repairing tables. It’s a useful tool that allows automating the usually time-consuming database maintenance tasks. One of the advantages of mysqlcheck it is ability to run …

IMDB Lookup Script

March 5, 2015 – 1:02 pm
old film projector with dramatic lighting

IMDB is one of the most complete movie and television databases on the Internet. It offers an advanced Web search UI, but Unix CLI support has been discontinued years ago and the old scripts no …

Ad-Hoc Analysis of /var/log/secure

February 28, 2015 – 9:41 pm
keys_security_lock_01

The /var/log/secure contains a record of authentication and authorization activity on the system. It can be an invaluable resource for the purposes of intrusion detection and prevention. Below are a few simple examples that show how …

Salt Configuration Notes

February 25, 2015 – 12:44 pm
salt crystals

Here are just some random notes on installing and configuring salt-master and salt-minion services. I figured I better write this down before I forget. Most of this is covered in official documentation, but in a very nonchalant …

Salt Snippets

February 17, 2015 – 10:12 pm
Spoon_Salt_Sugar_Black_Pour_1920x1200

SaltStack has decent documentation (at least compared to Puppet), but it’s a bit lacking on examples. There’s plenty of simple stuff that is useful if you’re managing a handful of nodes. However, why would you …

VSFTPd, SSL, and Firewalls

December 5, 2014 – 1:58 pm
network switch

If you ever wanted to configure SSL/TLS encryption for an FTP server behind a firewall, the “Google wisdom” ranges from “a major pain” to “can’t be done”. Fortunately, things are not all that bad. In …

Multithreaded Encryption and Compression

November 24, 2014 – 9:13 am
storage barrels cluster hpc

One problem with encryption is it’s a slow and resource-intensive process. While most encryption software lacks multithreading support, it is possible to use the GNU Parallel to take full advantage of modern multi-core CPUs to …

Filesystem Syncronization with Lsyncd

November 15, 2014 – 3:05 pm
poi002

Lsyncd monitors a local filesystem for changes and mirrors those changes to a filesystem on a remote server. The advantage of lsyncd over rsync is the former’s ability to detect filesystem changes without having to re-scan …

Toilet Fun

October 24, 2014 – 1:49 pm
murage-toilet2

It’s been a slow Friday afternoon at the office, so I decided to pimp my VM. The tool of choice is “toilet“. Depending on your flavor, this may or may not be easy to install. …

Resizing Hitachi VSP LDEVs (LUNs)

October 23, 2014 – 2:06 pm
technology-hard_00400654

Resizing Hitachi VSP LUNs (aka LDEVs) is a quick and simple task. Unfortunately, due to Hitachi Storage Navigator’s archaic design, the LDEV resize function, while easy to use, is not easy to find. So, here’s …

Rescanning New LUNs on VNX

October 16, 2014 – 10:49 am
hard-disk_00416535

Just a quick background of the little problem I ran into with our VNX: after creating a couple of LUNs for the mapped file pool using Unisphere, I clicked “Rescan Storage Systems” and got “This …