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.

Avoid IP Spoofing And Bad Addresses Attacks

May 9, 2016 – 2:01 pm
firewall-icon

Spoofing and bad address attacks attempt to fool the server into believing packets had come from local network. Here’s a brief explanation and a useful script that uses IPTables to prevent such exploits.

Useful Bash One-Liners

May 2, 2016 – 8:43 am
shell

Here’s a  loosely-organized pile ‘o shell quickies I kept googling now and then and finally decided to write ’em down.

Monitoring NetBackup Daemons

April 27, 2016 – 9:25 pm
tape dlt backup

Here’s an example of a script you can use to monitor NetBackup server daemons in a Linux environment. The main difficulty with keeping track of these services is that there are so many of them. …

Using JTR to Crack Office Documents

April 22, 2016 – 5:35 pm
Computer Password Security

John the Ripper is a free multi-platform password-cracking software. This article is not intended to be a comprehensive guide to jtr, rather a quick how-to. Starting with version 1.7.9, jumbo patch 6, jtr supports password …

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 …

Counting Beer Calories

February 24, 2016 – 10:58 pm
12132667_10200897814324877_1326917951447475910_o

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 CAVITY RISK
Alcohol increases …

Monitoring Application Network Connections

February 11, 2016 – 3:12 pm
network switch

A Java application on one of my servers has been causing problems by opening up too many network connections and now closing them quickly enough. I needed to be notified when the number of connections …

Run Cron Jobs at Arbitrary Intervals

January 27, 2016 – 10:24 am
time clock watch

Current versions of cron support sophisticated syntax making creating weird schedules a breeze. With older versions of cron you normally had to schedule multiple jobs to fill every time slot in a complex schedule. The …

Diff on Output of Remote Commands

January 25, 2016 – 1:47 pm
shell

Let’s say you run the same command on two remote servers and you want to compare the output. Here’s a quick example:

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 …

Show NIC Bandwidth Utilization

January 15, 2016 – 12:43 am
network switch

Just a quick script that will measure bandwidth utilization in KB/s for all NICs on your server over the specified period of time. You can call the script with an optional time wait parameter in seconds.

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, …

Taking Linux Temperature

December 14, 2015 – 12:21 am
termometer_001

Just some notes on setting up temperature monitoring and alerting on CentOS/RHEL running on HP ProLiant. The first step is to install lm_sensors:

Deleting Lots of Files Quickly

November 17, 2015 – 9:03 am
machine-gun-001

I am not talking about hundreds or thousands of files. I am talking about hundreds of thousands. The usual “/bin/rm -rf *” may work, but will take a while. Or it may fail with the …

When Was that Server Built?

November 11, 2015 – 11:49 am
shell

Just a quick note on how to (sort of) figure out when a server first came online. This can be useful to various folks in your bean-counting department working on maintenance contract renewals and whatnot. …

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 …

Testing Email Server Response

November 7, 2015 – 5:37 pm
colorful shells

A little while ago I ran into a situation when connections to the relay email server would occasionally time out. The issue seemed sporadic resulting in a controversy regarding its source. The perimeter email server …

Protected: Reverse SSH Tunnel Over SSL on RHEL

October 28, 2015 – 9:22 am
reverse_ssh_tunnel

There is no excerpt because this is a protected post.

Tuesday Morning Rant

October 27, 2015 – 11:27 am
centos_linux_0003

So I just got around to installing CentOS 7. What a pile of shit with bugs all over it. The installation GUI completely messed up network configuration. On the first try, the network config I …

Oracle Sun SPARC Server Quick Configuration

October 20, 2015 – 6:03 pm
sun_solaris_0003

In the following example we’re using a SPARC T4-2. These systems ship from the manufacturer with pre-installed Solaris 11. After the system has been racked and connected to primary and ILO networks, the first step is to …

Detecting Sun ILOM with NMap

October 13, 2015 – 10:57 am
sun_solaris_0002

This is an oddball tech note: how to detect Sun ILOM interfaces on the network using nmap. I needed to connect to one of the Sun boxes that dropped off the network, but couldn’t remember …