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 »
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 »
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 …
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 …
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 …
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
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 …
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 …
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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 …
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.
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.
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.
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.
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.
Most Commented