Featured »

Watch the Log

June 18, 2013 – 8:06 pm |

In the past few days my Postfix server has been having occasional problems talking to the mail gateway. They problem would come and go. The Postfix server would timeout trying to connect to the gateway and keep …

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.

Postfix »

Install Pflogsumm PostFix Log Summarizer

March 12, 2013 – 9:58 am |

Pflogsumm is yet another log analyzer/summarizer for Postfix. It is written in Perl and has been around for a while. Very simple to install, so I writing this post mostly as a note to myself. I added an example cron job with some “grep” syntax to cut the Pflogsumm report down to size by dropping some things I am usually not interested in. Read the full story »

Installing Sendmail Analyzer on RHEL/CentOS

March 11, 2013 – 11:35 pm |

The Sendmail Analyzer can be useful for visualizing your Sendmail/Postfix log. The commands below can be copy-pasted as root on default installations of RHEL and CentOS 5/6 with default Postfix and httpd. If your configuration …

Fast IP Range Scanner in Bash

February 22, 2013 – 2:53 pm | 4 Comments

Just a simple script to scan an IP range and do a reverse DNS lookup. This can be useful for building an inventory of systems on your LAN. Just make sure to give your network …

Filesystem Performance Testing Using dd

February 5, 2013 – 3:35 pm | 5 Comments

Below is a simple script to test filesystem read/write performance using dd with varying blocksize parameter. This can be useful for testing local filesystems as well as network-mounted filesystems. The end result will be a …

Uninstall PostgreSQL from Ubuntu

January 4, 2013 – 1:22 pm | 2 Comments

Ok, so this is a very simple one: uninstall PostgreSQL running on Ubuntu. There are a bunch of pieces to the database server and just running “apt-get remove postgresql” will still leave you with with a bunch of leftovers

A Faster Way to Delete Many Folders

October 24, 2012 – 11:00 pm | 4 Comments
A Faster Way to Delete Many Folders

This issue is particularly annoying when dealing with expansive directory structures mounted via NFS. Let’s say you have a directory with ten thousand folders and each of them has more subfolders and files. And you …

Fixing the mount.nfs: rpc.statd is not running Error

October 22, 2012 – 4:11 pm |
Fixing the mount.nfs: rpc.statd is not running Error

The rpc.statd service is used by NFS client to help it recover from loss of connectivity to the NFS server. When rpc.statd is not running, NFS is not able to handle remote file locking. You …

System Recovery: Useful Tools

October 18, 2012 – 9:48 pm | One Comment
System Recovery: Useful Tools

The following is a brief collection of open-source and/or free tools I regularly use for various system recovery tasks. If the servers you work with have CD drives, I would recommend burning these images onto a CD or DVD. This would save you the trouble of messing with the boot options in the BIOS. More advanced versions of BIOS can mount remote ISO images and boot from those. In most cases, however, this approach requires using the dreaded Internet Explorer an requires Windows.

Dealing with Blank Lines in WordPress functions.php

October 17, 2012 – 1:06 am | 5 Comments
Dealing with Blank Lines in WordPress functions.php

This is an annoying little problem plaguing many WordPress themes: blank lines in the themes’ functions.php cause various random issues. The most common manifestation of this condition is the failure to save the “image” custom field. Below are a few commands to apply a quick fix. Unfortunately, these steps would need to be repeated every time you upgrade your theme, until the developers catch on. To simplify this task, I arranged the commands into a little script that will create a backup of your original functions.php and make the necessary changes.

Simple Shell Random Password Generator

October 2, 2012 – 10:54 am |
Simple Shell Random Password Generator

A very simple script to generate a random secure password of desired length. This can come in handy when setting up multiple user account and/or lacking imagination.

Solaris 10 SVM/SDS Mirrored Root Disk Replacement

September 25, 2012 – 3:08 pm | 8 Comments
Solaris 10 SVM/SDS Mirrored Root Disk Replacement

The following is a standard process for replacing a failed boot disk mirrored with SVM on a Solaris 10 Sun server. Your hardware must support hot-swappable disks for this process to be performed without booting into single-user mode.

Generate Encrypted Password for /etc/shadow

September 16, 2012 – 12:46 pm | 4 Comments
Generate Encrypted Password for /etc/shadow

Here is a simple way to generate an encrypted password string for use in Linux /etc/shadow, among other things. This is just in case you don’t wish to use the usual tools for changing the password (passwd, chpasswd).

Import CSV into Excel Spreadsheet via OLEDB

September 6, 2012 – 2:53 pm | 4 Comments

The following is a quick how-to explaining the process of importing an external CSV file into an existing Excel spreadsheet. This approach can be very handy if your CSV data is updated regularly by some external application. Keeping the formatting in the spreadsheet and pulling fresh data from a separate CSV is the way to go. The instructions below are for Excel 2010 running on Windows 7 64-bit. Command syntax for other versions of Excel and other platforms may differ.

Use wget with Your Rapidshare Account

July 8, 2012 – 10:40 pm | 6 Comments
Use wget with Your Rapidshare Account

If you have a Rapidshare premium account, you can use wget to download files. The process is two-fold: first, you need to use wget with your Rapidshare username and password to obtain and store the Rapidshare cookie; then, you can use wget with the cookie file to download a list of links.

Configure Postfix to Use Gmail for Sending

May 16, 2012 – 12:52 pm | 6 Comments
Configure Postfix to Use Gmail for Sending

Here is a simple script to help you configure Linux postfix to use your Gmail account for sending emails. The script has been tested on OpenSuse 11.4 and 12.1, but should work find on any recent Linux disro. The only requirement is that you have postfix insalled.

Show Allocated / Used Filesystem Space Summary

April 17, 2012 – 9:31 pm | 6 Comments
Show Allocated / Used Filesystem Space Summary

On servers with many filesystems calculating filesystem space utilization summary can get very tedious. Below is a simple script that will summarize all filesystems and provide you will the totals for allocated and used space in GB.

A Simple Process Monitoring Script

February 22, 2012 – 11:28 am | 8 Comments
A Simple Process Monitoring Script

Let’s say you are running a data restore. Things are moving along, but network is congested and the backup server is overloaded. You really don’t feel staring at the restore status for the next several hours and just want to be notified when the process completes. The simplest method of monitoring for processes starting or ending on Unix systems is by using “ps” with a “while” loop.

Compress Old Log Files on Linux

January 12, 2012 – 6:06 pm | 6 Comments
Compress Old Log Files on Linux

Most log files located in /var/log are part of the log rotation and will be compressed automatically. However, in many cases various user applications maintain log files outside of /var/log. These logs are not managed …

Testing SSH Connectivity to Multiple Servers

December 27, 2011 – 2:46 am | 8 Comments
Testing SSH Connectivity to Multiple Servers

Imagine a hypothetical scenario: you support hundreds of remote servers and you need to check which server you can access via SSH and which servers are not letting you log in. Doing this manually is a tedious process that many sysadmins choose to skip. The inevitable outcome is inability to quickly access a system when it really counts.

Disable Usage Information Sharing on iPhone

December 19, 2011 – 1:23 am | 8 Comments
Disable Usage Information Sharing on iPhone

Carrier IQ is software installed on your iPhone by Apple at the request of the service providers. This system utility collect detailed usage and location data on your phone and sends it to the service providers. Supposedly, this was done to improve quality of service. In reality, however, if any such improvement actually occurred, it was only a side-effect.

Fun with Call Forwarding

October 31, 2011 – 10:20 pm | 8 Comments
Fun with Call Forwarding

Sometimes you don’t want people to reach you on your phone, but you don’t want to do something obvious, like turning the phone off. Because then they’ll just leave you a message and you will still be expected to call back. Below is a list of phone number in various US area codes that you can use to forward your unwanted calls.

Simple Host Monitoring with SSH

September 23, 2011 – 12:10 am | 6 Comments
Simple Host Monitoring with SSH

Sometimes you just need something very simple to monitor a server or an application on a temporary basis. A basic ping monitor is fine, but it will only tell you if a server is responding on the network. It will not tell you if there is some other problem on the system. The script below relies on passwordless SSH setup to periodically log into the monitored nodes and check on their health by executing a local or remote script.

Viewing “man” Pages in a Web Browser

September 16, 2011 – 12:43 am | 4 Comments
Viewing “man” Pages in a Web Browser

The Unix “man” pages are an indispensable tool even for the most experienced of sysadmins. Unfortunately, in a terminal window the text may be hard to read and getting a hard copy to take with you down to the datacenter will really test your Unix skills. The following quick script will convert the “man” page of your choice into formatted text and open it in the Web browser.