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 »
Here’s a scenario: you have an NFS client mounting a filesystem from server1. You need to migrate this data to NFS server2 and remount the filesystem from the client to point to the new server. The problem is that there is a user application on the client system that uses the NFS mount, preventing you from unmounting it.
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
The recent announcement from Suse Enterprise Linux that Btrfs was production-ready raised some suspicions. The last time I tested btrfs (not very long ago) the primary issues were excessive CPU utilization and filesystem space that seemed to disappear into nowhere. So, as a quick test, I put together an OpenSuse 12.2 (3.4.6-2.10-desktop, OpenSuse 12.2) 64-bit VM (ESX) with one dual-core vCPUs, 4GB RAM, the OS disk and a 6GB striped LVM filesystem consisting of 4 4-GB virtual disks.
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.
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.
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.
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.
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”.
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.
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.
Latest Comments