Benchmarking Your Site with ‘http_load’

by Tweak on May 8, 2010
in Apache, Linux, Servers

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

  1. Download from http://www.acme.com/software/http_load/
  2. Open terminal, cd to the directory where the archive is and unzip
    $ tar xvzf http_load-12mar2006.tar.gz
  3. Move to that directory
    $ cd http_load-12mar2006
  4. Run
    $ make
  5. Run
    $ sudo make install

Read more…

Share and Enjoy:
  • email
  • Print
  • PDF
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • StumbleUpon
  • MySpace
  • Live
  • Twitter
  • Yahoo! Buzz

How to check an MD5 hash on a file

by Tweak on May 5, 2010
in Linux

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…

Share and Enjoy:
  • email
  • Print
  • PDF
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • StumbleUpon
  • MySpace
  • Live
  • Twitter
  • Yahoo! Buzz

Check / List Running Services

by Tweak on May 4, 2010
in Linux, Servers

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…

Share and Enjoy:
  • email
  • Print
  • PDF
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • StumbleUpon
  • MySpace
  • Live
  • Twitter
  • Yahoo! Buzz

How to Change the Timezone in Linux

by Tweak on November 10, 2009
in Linux, Servers

  1. 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.
  2. 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.
  3. Read more…

Share and Enjoy:
  • email
  • Print
  • PDF
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • StumbleUpon
  • MySpace
  • Live
  • Twitter
  • Yahoo! Buzz

Install bandwidth monitor vnstat

by Tweak on September 5, 2009
in Linux, Servers

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.

  1. 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
  2. Read more…

Share and Enjoy:
  • email
  • Print
  • PDF
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • StumbleUpon
  • MySpace
  • Live
  • Twitter
  • Yahoo! Buzz

How to install winrar on CentOS

by Tweak on June 15, 2009
in Linux

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…

Share and Enjoy:
  • email
  • Print
  • PDF
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • StumbleUpon
  • MySpace
  • Live
  • Twitter
  • Yahoo! Buzz

How to open winrar files with Linux

by Tweak on June 14, 2009
in 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…

Share and Enjoy:
  • email
  • Print
  • PDF
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • StumbleUpon
  • MySpace
  • Live
  • Twitter
  • Yahoo! Buzz

How To remote backup with rsync

by Tweak on June 14, 2009
in Linux, Servers

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

  1. Login to the server you want to backup
  2. Creating a key with the ssh-keygen utility:
    ssh-keygen -t rsa -N '' (these are two single quotes)
  3. Copy RSA encryption key to the backup server:
    scp ~/.ssh/id_rsa.pub username@backupserver.com:keys/server1
    ssh username@backupserver.com mergekeys

Read more…

Share and Enjoy:
  • email
  • Print
  • PDF
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • StumbleUpon
  • MySpace
  • Live
  • Twitter
  • Yahoo! Buzz

How To Secure /tmp and /dev/shm partition

by Tweak on June 12, 2009
in Linux, Security, Servers

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…

Share and Enjoy:
  • email
  • Print
  • PDF
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • StumbleUpon
  • MySpace
  • Live
  • Twitter
  • Yahoo! Buzz

System Tuning Info for Linux Servers

by Tweak on June 12, 2009
in 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…

Share and Enjoy:
  • email
  • Print
  • PDF
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • StumbleUpon
  • MySpace
  • Live
  • Twitter
  • Yahoo! Buzz

Next Page »