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.

Dealing with Blank Lines in WordPress functions.php

October 17, 2012 – 1:06 am
wordpress_0003

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.

Searching Large Network-Mounted Filesystems

October 16, 2012 – 4:14 pm
shell

Recently I ran into a small problem: I needed to find recently-modified files in a very large NFS filesystem. One of the high-level folders contained dozens of sub-folders with thousands of files in each. There is a significant performance penalty associated with placing such directory structures on network-mounted filesystems. Running the “find” command at the top of the filesystem would have taken over an hour and the problem here was not available bandwidth, but the time it takes for the “find” to request and receive attribute information for each folder and file.

Simple Shell Random Password Generator

October 2, 2012 – 10:54 am
shell_0002

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
sun_solaris_0001

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
Internet Security System

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
spreadsheet

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

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
Postfix_logo

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
shell

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.

Linux LVM: Reduce Filesystem and Logical Volume

March 14, 2012 – 5:07 pm
hard_disk_drive_hdd_0002

The following example shows how to reduce the size of a filesystem mounted on an LVM logical volume. The instructions below are only for non-root filesystems. No reboot is required, but the filesystem will need to be unmounted. So, if there are any user applications using this filesystem, they will need to be stopped and the users will need to log out.

Playing With Time in Bash Shell

February 24, 2012 – 11:38 pm
time clock watch

The “date” command in Bash shell offers a remarkable array of features that can be very useful in performing many system administration tasks. As you will see below, it is easy to determine date, time, day of week for any interval of time. This can be very useful for system automation tasks with “cron” and “at”.

A Simple Process Monitoring Script

February 22, 2012 – 11:28 am
968780_94091618

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
hard drive disk

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
shell

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.

Quick Review: Boxee Box

December 27, 2011 – 12:22 am

Some of the technical issues with Boxee Box could have been fixed if the dev team was paying more attention to addressing the bugs rather than adding “features” of dubious value. In the final analysis, for the price and ease of use, Boxee Box is the best in its class and price range. You just need to be mindful of its limitations and buy it in hope of future improvements to its usability.

Be a HERO and Help STOP SOPA Now!!

December 23, 2011 – 12:24 pm

Photo Fun with iPhone 4S

December 19, 2011 – 3:16 am
apple_0003

As an avid amateur photographer I would like to have my dSLR with me at all times. And my collection of lenses. And filters. And tripods. But even if this was possible, I don’t really want to be, say, sitting at a bar, looking like I just returned from a Serengeti safari. My iPhone will have to suffice and I’ll just have to get more creative with the photos apps to fill in for the fancy equipment.

Disable Usage Information Sharing on iPhone

December 19, 2011 – 1:23 am
apple

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.

Writing a Linux Startup Script

December 16, 2011 – 2:11 am
linux_penguin_0003

As basic as the task of creating a startup script may sound, even experienced sysadmins sometimes run into problems with having services start at the right time during the boot process or stop during the shutdown. Two major reasons for this: the procedure is a bit convoluted due to linking. Also, writing startup scripts is not something you have to do very often these days.

Photo Noise Reduction Apps for iPhone

December 7, 2011 – 3:59 am
apple_0005

In digital cameras, image noise (grain) is most pronounced in photos taken in low-light conditions without a flash. For such situations, the camera sets high ISO (light sensitivity of the image sensor) and a long exposure. A number of apps are available for the iPhone to reduce the appearance of grain. None of these apps are particularly impressive, especially when compared to specialized PC software. There is a good reason for this: digital noise reduction is a very CPU-intensive process that also requires a large amount of memory.

iPhone 4S HDR Performance

November 8, 2011 – 5:31 pm
apple

HDR – High Dynamic Range – photography is a method of achieving a degree of visual detail in highlights and shadows beyond what the camera’s image sensor can record in a single exposure. The HDR processing usually involves combining two or more frames taken at different exposures. This is done on the computer or inside the camera itself. Human vision uses the HDR approach.

Fun with Call Forwarding

October 31, 2011 – 10:20 pm

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.