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 »

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


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


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


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 Scripts

Decision Making Using Python TOPSIS

November 20, 2021 – 12:03 pm

In a nutshell, TOPSIS – the Technique for Order of Preference by Similarity to Ideal Solution – seeks out one of many options that is the closest to the ideal option while at the same …

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. 

Counting Beer Calories

February 24, 2016 – 10:58 pm

It is safe to say that almost everyone knows that sodas and other sugary drinks are bad for your teeth.  Did you know that alcohol is bad for your teeth, too?
Alcohol increases …

Quickly Grow EMC Celerra Filesystem

June 21, 2013 – 11:22 am

As we all know, Celerra and its kin can get a bit annoying with their “filesystem over 90%” warning emails. Enabling the “autoextend” feature for the filesystems is one option, but if you are a control …

Windows Network Troubleshooting Script

January 20, 2010 – 10:15 pm
windows keyboard

I try my best to stay away from Windows. I wish my clients did the same. The usual difficulty of troubleshooting elusive network performance problems is amplified many-fold when there is a Windows computer at the end of the line. With Unix it’s relatively simple: run tests “a”, “b”, “c”, etc and follow the familiar process of elimination. With Windows in the picture the number of steps uses up all of the English alphabet and spills over well into the Russian one. And when you finally reach step “я”, you have to pull out your Chinese dictionary.

WordPress File Upload Size Limit

December 25, 2009 – 9:24 pm

By default, WordPress will not allow you to upload a file larger than 2Mb. This limit is not set by WordPress itself, but by detaul PHP configuration. This configuration file is usually /etc/php.ini, but normally …

WordPress Backup Script

October 23, 2009 – 1:04 pm

Whenever a new WordPress version comes out, I get an itch to upgrade as quickly as possible. Generally, this is not a good idea, unless you enjoy working out new software bugs and dealing with …

Shell Scripting for HPC Clusters, Part 2

October 23, 2009 – 12:30 pm

This is the second installment of a multipart guide for beginner Unix sysadmins supporting HPC clusters. You can view the first part of the guide here.
Searching, Replacing, Comparing
Try to work with a large cluster and …

Shell Scripting for HPC Clusters, Part 1

October 10, 2009 – 12:59 am

This is the first installment of a multipart guide for beginner Unix sysadmins supporting HPC clusters.
“For” and “While” Loop Constructs
The main challenge of supporting a Linux cluster is ensuring a homogeneous environment. Aside from small …

Shell Random Number Generator

August 4, 2009 – 2:58 pm

Sometimes, in the course of writing shell script, a need arises for some random input. Using the built-in $RANDOM shell variable will give you a random number from 0 to 32767 . Let’s take a …

Duplicating WordPress Installation

June 25, 2009 – 2:51 pm

Whenever you upgrade your WordPress installation or do development work, it is always a good idea to be working on a copy of your main site and not on the real thing. Copying WordPress installation …

Restart Apache, MySQL When Low on Memory

June 25, 2009 – 4:27 am

Heavy traffic, hungry SQL queries, leaky applications will eventually leave your server low on memory. Apache will go on a hunt for swap space and MySQL will start freezing in thoughtful contemplation. Your hard drives …

MySQL Global Search and Replace Script

June 25, 2009 – 3:53 am

A day will eventually come when your need to find and replace a string of text in your database. You don’t know which row, or which column, or which table. Heck, you may not even …

Passing MySQL Commands from Shell Script

June 25, 2009 – 3:30 am

Running MySQL commands from a shell script is a relatively simple task that has a lot of people baffled. Some say its too complicated and suggest using PHP or Perl, others claim doing so is …

Controlling Process CPU Utilization

March 9, 2009 – 12:36 pm

Let’s say there is a process on your Unix/Linux system that sometimes tends to consume all CPU resources and become unresponsive. At the same time, you do not want to terminate the process at the …

Korn Shell Arrays

January 24, 2008 – 11:13 am

Here are a few useful examples of how to use data arrays within Korn shell. Arrays are a great tool for storing user input and other data for quick, on-the-fly access. If, for example, you …

Script to modify Veritas HA Cluster Resource Configuration

December 7, 2005 – 11:10 am

The following interactive Korn shell script can be used to make common changes to the configuration of Veritas HA Cluster resources. The script enables you to view the listing of available resources; view resource configuration; …

Bounce Veritas HA Cluster resource

December 7, 2005 – 11:01 am

The following is a Korn shell script that can be used from command line or cron to bounce a Veritas HA Cluster resource. This can be useful to resolve certain problems with Oracle databases running …

Solaris boot disk copy using dd

November 22, 2005 – 6:40 pm

The following Korn shell script will make a bootable copy of the boot disk on a Solaris system. The script uses dd and requires that the source disk and destination disk have the same geometry.

NetBackup statistics, Part I

November 21, 2005 – 4:59 pm

The following script will calculate total size of data backups for each Veritas NetBackup client over the past week (or as defined by the “daysago” variable in the script). The final output will be uploaded …

Solaris boot disk copy

November 20, 2005 – 2:24 am

A sample procedure for installing PHP, MySQL and Apache2 on Solaris 8.