I was wondering if I deploy a server at home, with apache2. I would like to know how much traffic is currently on my site, in real time.
Please and thank you.
:)
I was wondering if I deploy a server at home, with apache2. I would like to know how much traffic is currently on my site, in real time.
Please and thank you.
:)
You can install the package
iptraf
which gives you realtime monitoring of various tcp and udp information. Page hits are realtime logged in the apache log that you have configured. You can either scan that file for number of lines matching your time period, or you can use some like piwik for your apache server which gives you analysis similar to google analytics.I frequently add the status module to my apache configuration so that I can examine the running state of Apache (this example restricts access to only
localhost
status requests).This goes in the virtualhost configuration:
This goes in the general server configuration (I used
/etc/apache2/conf.d/10status.conf
):And then I make sure
mod_status
is enabled:After that, I can just visit http://your-virtual-host.example.com/server-status and get all kinds of details, including the high-level summary, like this:
I especially like the requests/sec, and the detailed report about what URLs are being (or were recently) served.
I would recommend using apachetop, unfortunately it seems the development stopped, but it works well.
This site is more recent.
If every 5 minutes or so is realtime enough for you, take a look at Munin. It collects system information and displays them in nice graphs, see here for a live example-installation.
ssh root@HOST tcpdump -U -s0 -w - 'not port 22' | wireshark -k -i -
HOST = your webserver Chose Statistics fro Menu and Click IO Graphs
Try cacti.