Install Apache Bench – Ubuntu 14.04

AB is a tool for benchmarking Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give an impression of how current Apache installation performs. More specifically it shows how many requests per second Apache installation is capable of serving.


1. Update package database
$ sudo apt-get update

2. Install apache2 utils package to get access to ApacheBench
$ sudo apt-get install apache2-utils

Here i got a generic error
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Here the lock file can be deleted. But that should be last measure; maybe if there is no alternative. Better to check what is running-

On checking that I got
$ ps aux | grep "[a]pt"
root 30961 0.4 0.7 297404 57160 ? SNl 18:42 0:01 /usr/bin/python3 /usr/sbin/aptd

I killed that specific process
$ sudo kill 30961

Now just retry to run apt-get install again and should work fine.

$ man ab
Should respond with all the details.

I’ll come up with another post to explain how I’m using ab to benchmark API.

Note: ab documentation


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s