View Apache requests per minute
Run the following command to see requests per minute:
grep "23/Jan/2013:06" example.com | cut -d -f2 | cut -d » -f1 | awk -F: '{print $2":"$3}' |
sort -nk1 -nk2 | uniq -c | awk '{ if ($1 > 10) print $0}'
Code breakdown:
After constructing the graph to model the repository, it is amenable to standard graph algorithms. For this approach, we’ll turn to a popular algorithm for identifying the “key” elements of a graph called betweenness centrality. This algorithm assigns an integer score to each vertex; the higher the score, the more “central” the vertex. A vertex score is incremented if it falls on the shortest path between any two other vertices in the graph.