Articles in Scripts
I try my best to stay away from Windows. I wish my clients did the same. The usual difficulty of troubleshooting elusive network performance problems is amplified many-fold when there is a Windows computer at the end of the line. With Unix it’s relatively simple: run tests “a”, “b”, “c”, etc and follow the familiar process of elimination. With Windows in the picture the number of steps uses up all of the English alphabet and spills over well into the Russian one. And when you finally reach step “я”, you have to pull out your Chinese dictionary.
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 …
Whenever a new WordPress version comes out, I get an itch to upgrade as quickly as possible. Generally, this is not a good idea, unless you enjoy working out new software bugs and dealing with …
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 …
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 …
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 …
Whenever you upgrade your WordPress installation or do development work, it is always a good idea to be working on a copy of your main site and not on the real thing. Copying WordPress installation …
Heavy traffic, hungry SQL queries, leaky applications will eventually leave your server low on memory. Apache will go on a hunt for swap space and MySQL will start freezing in thoughtful contemplation. Your hard drives …
A day will eventually come when your need to find and replace a string of text in your database. You don’t know which row, or which column, or which table. Heck, you may not even …
Running MySQL commands from a shell script is a relatively simple task that has a lot of people baffled. Some say its too complicated and suggest using PHP or Perl, others claim doing so is …
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 …
Here are a few useful examples of how to use data arrays within Korn shell. Arrays are a great tool for storing user input and other data for quick, on-the-fly access. If, for example, you …
The following interactive Korn shell script can be used to make common changes to the configuration of Veritas HA Cluster resources. The script enables you to view the listing of available resources; view resource configuration; …
The following is a Korn shell script that can be used from command line or cron to bounce a Veritas HA Cluster resource. This can be useful to resolve certain problems with Oracle databases running …
The following Korn shell script will make a bootable copy of the boot disk on a Solaris system. The script uses dd and requires that the source disk and destination disk have the same geometry.
#!/bin/ksh
#### …
The following script will calculate total size of data backups for each Veritas NetBackup client over the past week (or as defined by the “daysago” variable in the script). The final output will be uploaded …
The following script will duplicate a Solaris boot disk. The script uses ufsdump/restore as opposed to dd, so disks of different sizes can be used.
#!/bin/sh
EMAIL=admin@domain.com
SUBJECT="Boot disk copy on `hostname`"
if [ "$#" != 2 ] ; …




