In this recipe we will learn how to use HTTP statistical information of the data that runs over the network.
Getting ready
Start Wireshark, click on Statistics.
How to do it...
To view the HTTP statistics follow these steps:
From the Statistics menu, select HTTP. The following window will appear:
In the HTTP submenu, we have the following:
Packet Counter(marked as 1 in the preceding screenshot): This provides us with the number of packets to each website. This will help us to identify how many requests and responses we have had.
Requests(marked as 2 in the preceding screenshot): This is used to see request distribution to websites.
Load Distribution(marked as 3 in the preceding screenshot): This is used to see load distribution between websites.
We will perform the following steps to view the Packet Counterstatistics:
Navigate to Statistics | HTTP | Packet Counter.
The following filter window will open:
In this window, you configure a filter to see the statistics that are applied to these filters. If you want to see statistics over the whole captured file, leave it blank. This will show you statistics over IP, that is, all the HTTP packets.
Click on the Create Stat button, and you will get the following window:
In order to see the HTTP statistics for a specific node, you can configure a filter for it using a display filter format.
We will perform the following steps to view HTTP Requests statistics:
Navigate to Statistics | HTTP | Requests. The following window will appear:
Choose the filter you need. For all data, leave blank.
Click on the Create Statbutton and the following window will come up:
To get statistics for a specific HTTP host, you can set a filter http.host contains <host_name> or http.host==<host_name> (depends on whether you need a hostname with a specific name or a hostname that contains a specific string), and you will see statistics to this specific host.
For example, by configuring the filter http.host contains ndi-com.com, you will get the statistics for the website www.ndi-com.com (shown in the following screenshot):
What you will get is:
To see Load Distributionon the Web or a specific website:
Navigate to Statistics | HTTP | Packet Counter.
The following window will appear:
Choose the filter you need. For all data, leave it blank.
Click on the Create Stat button and the following window will come up:
How it works...
When we open a website, it usually sends requests to several URLs. In this example, one of the websites we opened was www.cnn.com, which took us to edition.cnn.com, where we have sent several requests: to the root URL, to the breaking_news URL, and to two other locations on the home page.
There's more...
For deeper HTTP analysis, you can use purpose-specific tools. One of the most common ones is Fiddler. You can find it at http://www.fiddler2.com/fiddler2/
Fiddler is a software tool developed for HTTP troubleshooting and therefore it provides more data with a better user interface for HTTP.