Server and Network Monitoring with iPhone
February 25, 2010 – 6:53 pm | No Comment

What is a Unix sysadmin doing with an iPhone, you ask? It was a birthday present, if that’s all right with you. I know, I should have gotten something odd with a beta version of …

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 and 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 Commands and Shells

Forcing Linux to Reboot
January 29, 2010 – 3:21 pm | No Comment
Forcing Linux to Reboot

Until I branched out a few years ago from supporting Unix server to working with Linux clusters, I never really encountered this issue: you type “reboot”, “init 0″, or “shutdown” as root and… nothing happens. Or the system starts going down but then hangs on unmounting a filesystem or unloading a module. I think this happened once to a colleague of mine who was rebooting a Solaris server, but this is a common problem with Linux.

WordPress File Upload Size Limit
December 25, 2009 – 9:24 pm | No Comment
WordPress File Upload Size Limit

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 …

Reboot Remote Windows Workstation
December 10, 2009 – 9:53 am | No Comment
Reboot Remote Windows Workstation

When using RDP, sometimes the session may lock up and you may need to reboot your workstation remotely. This can be done using the “shutdown.exe” command from your local PC. First, make sure you can …

Remove Duplicate Posts in WordPress
December 5, 2009 – 10:28 pm | No Comment
Remove Duplicate Posts in WordPress

Below is the SQL script that will attempt to identify and remove duplicate posts in your WordPress database. This script can be useful for autoblogging. If you use plugins like WP-o-Matic to pull full-text RSS …

Slow SSH login in SuSE Linux
November 3, 2009 – 6:17 pm | One Comment
Slow SSH login in SuSE Linux

Starting with SuSE 10 and including both openSuSE and SLES an annoying SSH problem appeared. When you SSH to the server (via PuTTY and such) you get the “login” prompts right away, but the “password” …

Shell Scripting for HPC Clusters, Part 2
October 23, 2009 – 12:30 pm | No Comment
Shell Scripting for HPC Clusters, Part 2

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 | One Comment
Shell Scripting for HPC Clusters, Part 1

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 …

Web Hosting Providers and php.ini
October 9, 2009 – 4:07 pm | No Comment
Web Hosting Providers and php.ini

The php.ini is the primary configuration file for the PHP – a popular scripting language used for Web development. Most Web hosting providers offer preinstalled PHP on their servers. However, not many hosting providers explain …

Automatically Validate HTTP Proxies
August 5, 2009 – 4:14 pm | No Comment
Automatically Validate HTTP Proxies

Let’s say you downloaded a long list of Web proxy servers. Now you are stuck with the task of weeding out the proxies that are dead, slow, fake, or otherwise unusable. There are some applications …

Shell Random Number Generator
August 4, 2009 – 2:58 pm | No Comment
Shell Random Number Generator

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 …

Wget and User-Agent Header
June 29, 2009 – 12:41 pm | No Comment
Wget and User-Agent Header

As you may already know, Wget is a popular (particularly in the Unix world) command-line downloader and Web crawler application. You can read more about Wget in one of my earlier posts on the subject. …

Numeric File Permissions in Unix
June 27, 2009 – 7:50 pm | No Comment
Numeric File Permissions in Unix

Suppose you are working with a Web server and your task is to make sure that no files or directories have permissions “777″. It would be easy to just recursively change permissions for all files …

Controlling Process CPU Utilization
March 9, 2009 – 12:36 pm | No Comment
Controlling Process CPU Utilization

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 …

Encoding Videos for XBox 360 and PS3
January 1, 2009 – 4:47 pm | No Comment
Encoding Videos for XBox 360 and PS3

Both Xbox 360 and PS3 support a variety of video codecs and are capable of playing high-definition video files. One of the most popular formats for HD video files is Matroska (MKV), which provides excellent …

Random Filename Chooser
June 17, 2008 – 9:02 pm | No Comment
Random Filename Chooser

This is a rather peculiar little script with a purpose that may not be immediately apparent. The script will look for files in the specified folder; it will then pick one at random from the …

Scali Manage (Platform Manager) CLI Guide
June 5, 2008 – 10:24 pm | No Comment
Scali Manage (Platform Manager) CLI Guide

Scali Manage – the bloated and unpredictable HPC cluster management tool – has recently been acquired by Platform Computing Corp. It is to be integrated into Platform LSF and Platform OCS products. I can’t say …

Dealing With Disk Hogs
June 1, 2008 – 5:49 pm | No Comment
Dealing With Disk Hogs

Some users and application developers believe that any free disk space on the server belongs to them. Suddenly you get an email alert saying that a server “xyz” ran out of disk space in /home. …

Useful SysAdmin Scripts: Search-and-Replace
June 1, 2008 – 3:03 pm | No Comment
Useful SysAdmin Scripts: Search-and-Replace

Let’s say you moved your server to a new network and now it has a different IP address. You know your users have a habit of hard-coding the server’s IP into their scripts. So you …

Improving WordPress Performance
May 4, 2008 – 12:39 pm | No Comment
Improving WordPress Performance

WordPress is a great blogging engine and decent CMS. Unfortunately, most available WordPress themes- even those claiming to be “minimalist” – are bloated and slow to load. Heavy CSS stylesheets, multiple Java scripts, numerous graphics …

Use Perl inside Shell scripts
May 1, 2008 – 11:44 am | No Comment
Use Perl inside Shell scripts

Perl is a far more powerful programming tool than any shell script. Sometimes you want to borrow some of that power without having to rewrite your entire shell script. There is an easy way to integrate Perl snippets inside your shell script.

Installing and Configuring Ganglia
March 25, 2008 – 4:19 pm | One Comment
Installing and Configuring Ganglia

Ganglia is a distributed performance monitoring application used primarily for tracking status of high-performance compute (HPC) clusters. Ganglia is a royal pain in the ass to install and configure even for a seasoned Unix sysadmin. …

Log Monitoring with Swatch
March 11, 2008 – 1:43 pm | No Comment
Log Monitoring with Swatch

Swatch is a Perl-based log monitoring tool that can match regular expressions and perform automated actions. The tool is useful for monitoring system log files in real time with an option to run external commands …