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

How Not to Prepare for a SysAdmin Interview

August 2, 2018 – 4:06 pm
wel2jnfofw8wrj5i4w9llkvu3uf

The Linux Foundation just gave birth to seven supposedly interesting tips on how to prepare for a Linux SysAdmin job interview. Unfortunately, the research behind all this probably excellent advice was based on interviewing hiring …

Automating Web Page Screenshots

July 13, 2018 – 2:25 pm
dpu45eapwpze2jks2i1eq930q45

Automatic Web page screenshots are commonly used for various monitoring tasks, such as detecting copyright infringement, website defacement, and other legal and security matters. Automatic screenshotting can also be a useful tool for researchers, developers, …

Encrypted Volumes and Portable Apps

February 25, 2018 – 3:08 pm
vault safe

This is a description of an uncomplicated setup for an encrypted volume and portable applications for a Windows laptop consisting of a USB3 storage device, VeraCrypt OSS OTFE, a hardware password wallet, and portableapps.com software.

Detect SSL Certificate Injection

February 21, 2018 – 3:05 pm
spy

When the SSL Digital Certificate is intercepted and replaced by a device between your browser and the Web site, we call it certificate injection. This method is more commonly used not by hackers, but by …

SSL For Self-Hosted WordPress

February 17, 2018 – 3:05 pm
encryption

Just some notes for setting up SSL with your self-hosted WordPress hosting installation. Just got around to doing this the other day. Yeah, I know, about time…

Obfuscating Passwords in Shell Scripts

December 17, 2017 – 9:41 am
security_004

At the risk of repeating myself, I must say that this article is about obfuscating passwords – rendering obscure, unclear, or unintelligible – not hiding them. This can still be useful.

Occupy Subnet

December 1, 2017 – 2:15 pm
DSC_6214 copy copy

The script below (tested on RHEL 7) will use arp-scan to identify unused IPs on your subnet and configure virtual interfaces attached to your primary NIC to take over every available IP. 

Whiptail and Dialog Snippets

November 27, 2017 – 3:41 am
oiuekjhdhdh

Whiptail is a newt-based utility allowing to build pseudo-graphical dialog boxes from shell scripts. Dialog uses ncurses and is similar to whiptail but has more options and, consequently, a bit harder to use. I find both useful …

CLI System Monitoring Tools

November 12, 2017 – 12:24 pm
DSC_6236 copy copy copy copy copy

The multitude of sophisticated centralized monitoring tools available these days excel at one thing: telling you what happened while you’ve been sleeping. But what if you’re awake and need to know what’s going on right …

Checking Multiple Variables in Bash

September 19, 2017 – 10:04 am
DSC_8295 copy_1280

Let’s say you have a dozen variables in your script and you need to check if they have values set. The usual approach can get a bit tedious.

Selecting Time Ranges from Logs

July 29, 2017 – 6:00 pm
shell_001

Consider a common situation: you would like to select lines from a log file that match a specific string, but only during a specific time frame. For example, my /var/log/messages contains entries from one of the …

Parallel Rsync

June 10, 2017 – 3:55 pm
shell_003

This is an update of the script I originally wrote five years ago and used to migrate many terabytes of production data between two NAS systems. What’s new: more efficient subfolder crawling, more effective way …

SystemD: Back To The Future

May 23, 2017 – 8:38 pm
oiuwpoiiie

A creature in its death throes, Sun Microsystems gave birth to Solaris SMF – the product of a disturbing union between Unix System V and the Microsoft Windows Registry. Shortly thereafter the proud father died, …

Migrating Filesystems with Active Processes

May 2, 2017 – 1:47 pm
poiwiioiw

I’ve run into an interesting challenge: I needed to migrate application data from a local filesystem to NFS without stopping the processes running in the original mountpoint. Here’s a basic overview of the process. This …

Sample Salt Proxy Configuration for vCenter/ESX

March 20, 2017 – 4:15 pm
Spoon_Salt_Sugar_Black_Pour_1920x1200

The Salt proxy agent is a relatively new feature of Salt allowing to control networked devices where salt-minion cannot be installed directly. The official Salt documentation on the subject is outdated and full of syntax errors. It’s actually …

Recover Crontabs from Log

February 27, 2017 – 12:15 am
clock tower

Some time ago I was using PDSH to update root crontab on a bunch of servers and ran into what looked like a PDSH-specific bug. The same command that worked just fine when executed locally or …

DHCP Server Log Analysis

January 24, 2017 – 5:51 pm
servers_003

A quick script to go through your DHCP server log and get a summary of MAC addresses and associated DHCP requests. The script will attempt to download the IEEE OUI list for identifying the manufacturers …

Real-Time Log Stats With Logtop

December 30, 2016 – 1:00 am
logs_001

Logtop is an awesome, albeit a little quirky, real-time log analysis tool developed by Julien Palard. You should use logtop when time is of the essence. When you cannot wait for your cron job to run …

Removing Strings from Binary Log Files

November 14, 2016 – 12:52 pm
shell_0004

Below is a quick script that will replace specified strings in binary files with random values. A word of caution: the script will preserve the file’s original ctime by briefly changing system time. Obviously, this requires …

Watching VSFTP

November 8, 2016 – 10:56 pm
servers_006

I have an FTPS server running VSFTP and below is collection of commands useful for monitoring activity and analyzing the logs.

Check Filesystem Mount Status

August 20, 2016 – 1:44 pm
hard_disk_drive_hdd_0002

Sometimes you just need to do a quick sanity check on the filesystem mount status to make sure everything in fstab is mounted and everything’s that mounted is in the fstab. If, like myself, you’re a fan …

Atop Script with Scheduling and Logging

August 3, 2016 – 7:35 pm
istock-18586699-monkey-computer

When something is going down on a server, the first thing most sysadmins will run is the venerable top utility. This happens automatically: if you suspect the server is being sluggish, your fingers just type top without you …