Here is a simple script that utilizes xentop to monitor your Xen server. You can schedule this via cron to run every X minutes to track the load average and if gets too high, it will email you (be sure you change your-emailid to your actual email address) #!/bin/bash loadavg=`uptime | awk '{print $10}'` process=`nproc`… Read more
Linux
Doudou – Linux distribution for kids
Linux for kids? I took my kids to a fast food place and in this location, the play area had two table top CRT touch screen system. One was working, and one was stuck in a boot loop, so I saw that it was booting Linux. The other one was fully booted, and came up… Read more
Create a compressed MySQL database dump/backup (Linux)
This may go without saying, but backing up your database regularly is important. Hard disks can fail at anytime causing you to lose all your data (We recommend using a RAID configuration when possible for data redundancy!) Often times, we may overlook the database and simply make backups of our /www or /public_html folder that… Read more
Scripting the Linux ‘passwd’ command easily without interactive prompt
If you are looking for a quick and easily solution to changing your Linux passwd from a script, you have come to the right place. As you already know, the passwd command prompts the user to enter the desired password as well as a confirmation, but I have a solution that will change the password… Read more
Linux ‘find’ to list files less than or greater than a certain size
This article will go through some basic examples on how to list files above or below a certain size in Linux using the find command. There are many use cases for running queries like this, for instance finding small files on your hard drive or finding very large files. So, lets get started with some examples. Using find… Read more
Fetch error installing Java on Ubuntu 11.04. Solved!
I am running Ubuntu 11.04 and was trying to install the Java OpenJDK 6.0 (and 7.0) on my system but I received the following error: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? I tried installing several different Java packages but all of them failed with the same error. Finally… Read more
Solved! Installing mysql gem – extconf.rb failed error
Are you attempting to install the mysql gem and you are receiving this error? Fetching: mysql-2.8.1.gem (100%) Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient… Read more
How to install PostgreSQL 8.4 on CentOS 5.5
If you have tried installing PostgreSQL database on CentOS 5.5 using yum, you will notice that you an old, outdated version! There are several ways to get the 8.4.x version of Postgres installed on this OS, but here is the quick and easy method! Installing PostgreSQL 8.4.x on CentOS 5.5 Download the PostgreSQL 8.4 repository… Read more
Linux – How to disable ‘Last Login’ welcome message
When you login (via SSH or other method), to a Linux box, you will see a Welcome message that displays your Last Login time and date as well as other general information regarding the system. Here is an example: Linux sp-ubuntu 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 01:41:57 UTC 2010 i686 GNU/Linux Ubuntu 10.10 Welcome… Read more
Free Linux utility to convert PDF to Text file
Are you looking for a fast, easy, and free way to convert a PDF document to a plain-text .txt format? Luckily, there is a built-in program in most Linux distributions that can do this called pdftotext. To convert, simply do: pdftotext -layout filename.pdf filename.txt… Read more