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.

Viewing “man” Pages in a Web Browser

September 16, 2011 – 12:43 am
istock-18586699-monkey-computer

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.

Autorebooting Servers on Low or High Load

September 14, 2011 – 5:03 pm
boot

Recently I ran into a situation where I needed to reboot several HPC cluster compute nodes. A couple of systems were still running user jobs that I did not want to interrupt. I also didn’t want to sit around and watch those jobs, as there was not way of telling how long they could take to complete. The solution was to write a short script that looks something like this…

Changing Process CPU Affinity on Linux

September 13, 2011 – 4:58 pm
cpu

A common real-life scenario: on a multi-CPU system Oracle processed have taken over and the system has ground to a crawl. The average system load is in double-digits and even logging in takes several minutes. The possible root causes for the problem can range from inefficient SQL queries (the common problem) to insufficient system resources. But at this point you just need to make the system a bit more responsive, so you can start troubleshooting.

Adding LUNs to VXVM on Linux

September 6, 2011 – 2:03 pm
linux_penguin_0002

The following is a brief overview of the process for adding LUNs to VXVM under Linux. In our example we have an RHEL 5 server with existing LUNs and VXVM volume groups. Two new LUNs with multipathing were allocated from SAN and need to be added to the system to grow one of the volumes and the corresponding filesystem.

Testing RAM in Linux

September 2, 2011 – 11:42 am
ram memory dimms

A number of good and mostly free tools are available for testing RAM hardware. However, most of these applications are designed to operate in stand-alone mode that requires shutting down the OS. Still, tare a few ways to run memory integrity checks from inside the operating environment. Here we will look at using dd and memtester.

Red Hat: Changing Hostname and IP

August 31, 2011 – 1:47 pm
redhat1

Changing hostname and IP is frequently required when a server is being moved from testing or development to production. The process is a fairly simple one, but steps must be performed in a certain order to avoid complications.

Using Expect with SSH and Su

August 29, 2011 – 10:47 am
shell

We have discussed using expect with sudo in an SSH session. Another common way to run commands on remote servers as root is to use the su – root command, where sudo is not configured. The trick to automating su operations using expect is to launch the su command with the spawn ssh command.

Enable Foreign Keyboard on iPhone

August 16, 2011 – 1:38 pm
apple_0005

This is a simple one, but people are always asking: how do I type in Russian, Swedish, Spanish, whatever on my iPhone? Go to Settings -> General -> International -> Keyboards -> Add New Keyboard -> select your language -> select Hardware Keyboard Layout (if applicable).

Moving Average with Excel and Shell Script

August 11, 2011 – 12:41 pm
shell

In this example we will show you how to calculate simple moving average using Excel and a shell script. As more data is added to the file, the shell script and the Excel formula will automatically use the specified number of the latest data points to calculate the moving average.

Configuring Passwordless SSH

July 23, 2011 – 11:02 am
Computer Password Security

Passwordless SSH works by pre-sharing public encryption keys. It is important to understand that setting up passwordless SSH opens your servers to certain security risks. A compromised user account on one server may allow the attacker to gain access to multiple systems on the network. Try to avoid using passwordless access for accounts with elevated privileges.

Automating SSH and Sudo with Expect

July 14, 2011 – 10:20 am
colorful shells

Let’s imagine a hypothetical scenario: you have a list of a hundred Linux servers and you need to log into each one of them and remove a local user “roger” and his home directory. Doing this by hand will get tedious and, chances are, you will make a few typos and there will be some collateral damage.

D-Link DNS-320 NAS Review

July 10, 2011 – 6:49 pm

In the past I reviewed the DNS-321 and the major complaint there was the device’s inability to utilize gigabit network capacity due to severe memory and CPU restrictions. While the DNS-321 was initially built as a 100-Mbit NAS and later converted to gigabit, the DNS-320 was built as a gigabit-capable storage device from the very beginning. It is still a very flimsy-looking plastic box filled with cheap components. If I am lucky, it may run for a year or two before the cooling fan fails or the power supply burns out.

OpenSUSE 11.4 Installation Overview

July 10, 2011 – 5:38 pm
suse1

After enjoying taking apart Microsoft’s “cloud” Office 365 for the numerous shortcomings of its installation process, having to do the same for my favorite Linux distro – openSUSE – is rather upsetting. OpenSUSE installation routine went from nearly-flawless in 11.1 to mildly annoying in 11.3, arriving to moderately obnoxious in 11.4. What happened? Same as with Microsoft, poor installation workflow is to blame. One can always feel when desktop support people take over workflow tasks from server admins.

Microsoft Launches Office 365. Fails.

June 28, 2011 – 3:47 pm
fail

To much fanfare Microsoft launched its first “cloud” version of the Office – the Office 365. Silly name, I know, but I still decided to give it a shot. Call me an optimist, but sometimes I feel there is a chance Microsoft will come out with a product more useful than Xbox 360. For the sake of brevity, let me just say that Office 365 was not that product. I can’t really tell you how good or bad it is, because I never got past the convoluted installation procedure. My many years of experience as a sysadmin did not help.

Run Background Tasks via SSH

June 16, 2011 – 12:58 am
968780_94091618

The idea here is simple: you need to connect to hosts 1..100 and execute a command in the background. The trick is to make sure the command continues to run after the SSH session terminates. Simply adding the “&” at the end of the command is not the answer here.

CompTIA Fails It’s Own Linux+ Exam

June 4, 2011 – 3:52 am

The CompTIA Linux+ is a certification program designed for people who’ve heard of Linux but can’t yet figure out what it is. Still, one would imagine that people running CompTIA’s Web site should be able to answer at least some of the sample exam questions posted on their site. At the end of the practice exam there is a link that says “Click here for the answers”. But if you click on that link, you will find none…

Shadowbox JS Plugin Breaks WordPress

June 2, 2011 – 12:24 am

Just a quick alert: the latest version (v. 3.0.3.3) of the popular Shadowbox JS plugin for WordPress has a serious bug that exposes your WordPress installation to a major security risk. Incorrectly coded handling of the “player” tag causes all of your NexGEN Gallery images to be displayed on any page that also has single images embedded via WordPress “Add an Image” function.

Disabling WordPress X-FRAME-OPTIONS Support

May 30, 2011 – 3:37 pm

Staring with version 3.1.3, WordPress introduced X-FRAME-OPTIONS support for the admin and login pages. This is a simple defensive measure against sneaky characters trying to encapsulate your blog within their own Web sites using iframes. So this new security was a welcome addition to WP for most users. I was not one of those users.

Password-less SSH and Autofs

May 15, 2011 – 4:04 am
Computer Password Security

Recently I’ve ran into an unusual problem with SSH on SLES 11 SP1. The system – a small HPC cluster – is configured to use NIS for authentication and automounter maps. Whenever a user logs in, the home directory is automounted from an external NAS. Each user has a ~/.ssh directory with the authorized_keys2 and known_hosts required for password-less SSH access among the cluster nodes.

Troubleshooting InfiniBand Connections

May 4, 2011 – 10:36 am
network_cable_01

The following is a brief troubleshooting guide for an InfiniBand network found in common HPC Linux clusters. Running these commands requires OFED 1.5.2 or later package installed on your systems. Additionally, the “pdsh” (parallel shell) command is part of the HP CMU cluster management software (version 4.2.1 used in our example) installed on the head node.

Load-Testing HPC Linux Clusters with “stress”

April 28, 2011 – 8:43 pm

The “stress” is a simple-to-use load generator for POSIX systems that I found very useful for stress-testing HPC clusters. The current version of the application is 1.0.4 and it was easy to compile and install. Stress can create configurable system load for CPU, memory, I/O, and disks. In the example below we ran “stress” on a SLES 11 HPC cluster with HP CMU 4.2 installed.

Facebook Security for the Lazy

April 28, 2011 – 2:36 am
picard-facepalm-text-569

Every time you use Facebook, you probably have a nagging feeling in the back of your head that someone other than your friends is reading your posts. You should trust that feeling. At the same time, keep in mind that Facebook is a tool designed primarily for sharing personal information with large groups of people you barely know. Facebook is not your personal diary or a substitute for SMS. You just need to assume that everything you post on Facebook inevitably will end up in the hands of someone you don’t like very much. And then you proceed based on that assumption.