Benchmarking Your Site with ‘http_load’
http_load is a stunningly useful HTTP benchmarking utility that gives you a rough idea of how many hits per second a server is capable of serving. You simply tell it what pages to grab, and how many “clients” it should run in parallel; it gives you back useful information about the average fetches per second and the average, minimum, and maximum response times. It’s no substitute for a solid profiler to dig into the hows and whys of your application’s performance, but it’s great at telling you when you’re “good enough” to launch.
Installing http_load on OS X
- Download from http://www.acme.com/software/http_load/
- Open terminal, cd to the directory where the archive is and unzip
$ tar xvzf http_load-12mar2006.tar.gz - Move to that directory
$ cd http_load-12mar2006 - Run
$ make - Run
$ sudo make install
How to check an MD5 hash on a file
MD5 is a one-way hash algorithm as defined by RFC1321 and can be used to help determine the integrity of a file by providing a 128 bit digital signature. This digital signature is like a fingerprint for a file, changing just one single byte in a file will result in a different MD5 hash.
MD5 hashes can be used to catalog files on a filesystem and then determine at a later date that the files have not been altered in any way, for example if someone broke into a system and modified system files.
They can also be used to ensure a file downloaded from a website is the same as expected. This can be especially important when downloading a file from a mirror site to ensure you are not installing a modified program which contains a trojan horse or some other nasty. By simply comparing the MD5 hash of the file you have downloaded from the mirror with that from the original website you can determine whether or not the file is exactly the same.
Read more…
Check / List Running Services
Q. How do I list all currently running services in CentOS / RHEL / Fedora Linux server ?
A. There are various ways and tools to find and list all running services under CentOS / RHEL / Fedora Linux systems.
service command – list running services
service --status-all
service --status-all | grep ntpd
service --status-all | less
Read more…
How to Change the Timezone in Linux
- Logged in as root, check which timezone your machine is currently using by executing `date`. You’ll see something like Mon Nov 9 13:49:01 EST 2009, PST in this case is the current timezone.
- Change to the directory /usr/share/zoneinfo here you will find a list of time zone regions. Choose the most appropriate region, if you live in Hong_Kong or the Singapore this directory is the “Asia” directory.
Install bandwidth monitor vnstat
vnStat is a network traffic monitor for Linux that keeps a log of daily network traffic for the selected interface(s). vnStat isn’t a packet sniffer. The traffic information is analyzed from the /proc -filesystem, so vnStat can be used without root permissions. However at least a 2.2.x kernel is required.
- Install vnStat
wget http://humdi.net/vnstat/vnstat-1.7.tar.gz
tar zxvf vnstat-1.7.tar.gz
cd vnstat-1.7
make
make install
How to install winrar on CentOS
Rar is one of the common file format use for data compression and archiving. What happen if you have a rar file in Linux ? Don’t panic, just using the ‘rar’ program .There is some intro in Unrar the File.
Today I had to install rar support to archive and split large files. I’ve tried to download an rar from rarlab site
wget http://www.rarlab.com/rar/rarlinux-3.9.b2.tar.gz
Extract it:
tar -xf rarlinux-3.8.0.tar.gz
cd rar
Copy rar & unrar files to /usr/bin:
cp rar unar /usr/bin Read more…
How to open winrar files with Linux
Introduction
To open RAR (those created with winrar) you will need unrar. There are lots of sites now providing files packaged under the rar format.
So you will need first to install unrar on your systems and therefore be able to list content and unpack the files into your hard disk to be able to work with them.
Installation unrar on Debian / Ubuntu
apt-get install unrar
Installation unrar on Fedora / Centos
Be sure to have rpmforge repository enabled on CentOS
yum install unrar
Using unrar
To read the contents of the file.
unrar l [filename.rar]
Read more…
How To remote backup with rsync
This is probably the simply way to backup data to other server using a secure protocoal an minimum bandwidh.
Note:
BackupServer.com – Is the backup server
MainServer.com – Is the server you want to backup
- Login to the server you want to backup
- Creating a key with the ssh-keygen utility:
ssh-keygen -t rsa -N '' (these are two single quotes) - Copy RSA encryption key to the backup server:
scp ~/.ssh/id_rsa.pub username@backupserver.com:keys/server1
ssh username@backupserver.com mergekeys
How To Secure /tmp and /dev/shm partition
Keep you server clean of rookits is a good idea to get a good security level. A sysadministrator can create a seperate partition for /tmp and mount it with noexec and nosuid parameters. And to do it is not necessary to reboot or repartition your drive.
1. First you should secure /tmp:
Read more…
System Tuning Info for Linux Servers
NOTE: Most of the info on this page is about 3 years, and one or two kernel versions out of date.
This page is about optimizing and tuning Linux based systems for server oriented tasks. Most of the info presented here I’ve used myself, and have found it to be beneficial. I’ve tried to avoid the well tread ground (hdparm, turning off hostname lookups in apache, etc) as that info is easy to find elsewhere.
Some cases where you might want to apply some of benchmarking, high traffic web sites, or in case of any load spike (say, a web transfered virus is pegging your servers with bogus requests)
Read more…