Now, let's learn to generate HTML and graphical statistics using Calamaris. To generate graphical stats, we need to create a directory where Calamaris can dump image files. So, let's see how it works:
$ mkdir stats $ cat access.log | calamaris -a --output-file access_stats.html -F html,graph --output-path ./stats/
The previous command will generate an access_stats.html
file along with a few image files in the stats
directory. Let's have a look at a few images from the stats
directory:
![](https://static.packt-cdn.com/products/9781849513906/graphics/3906_06_10.jpg)
This image is a graph of TCP requests by the Squid status. On the left-hand side is a scale representing the number of requests, and on the right-hand side is a scale representing the data transferred in Gigabytes. As we can see from the previous graph, around 17 million requests resulted in a hit. This means that they could be served from the cache without fetching data from remote servers.
Let's have a look at another graph:
![](https://static.packt-cdn.com/products/9781849513906/graphics/3906_06_11.jpg)