Realtime Apache Monitor

Ask questions regarding Gentoox, Gentoo and Linux in general in these forums and we'll do our best to help you!
Post Reply
trixter
Adept
Posts: 65
Joined: Thu Sep 25, 2003 7:25 pm

Realtime Apache Monitor

Post by trixter »

I am looking for a program that will automatically monitor the activity of my xbox's apache webserver and display the information on the xbox screen. This would be similar to what the "simple server" built into the home version displays. It would show things like the IP of who is currently on, what page they are accessing, etc.

Is anyone aware of such a package? If not, is there a simple way to make the apache access log automatically dump its contents to the screen? Thanks.
rocketeer
Pro
Posts: 75
Joined: Sun Aug 17, 2003 12:05 am

Post by rocketeer »

Answer to your 2nd question:

Code: Select all

tail -f /var/log/apache2/access_log
Use CTRL+C to quit the tail (substitute log path if yours is different).
trixter
Adept
Posts: 65
Joined: Thu Sep 25, 2003 7:25 pm

Post by trixter »

I found this on another site:

tail -f /var/log/apache2/access_log ¦ cut -d' ' -f1,7 ¦ grep -v .jpg ¦ grep -v .php ¦ grep -v .css ¦ grep -v .gif

Would this work? I tried it and the the cursor doesn't come back and nothing is displayed. I don't know much about linux, but what does this "grep" command do?
rocketeer
Pro
Posts: 75
Joined: Sun Aug 17, 2003 12:05 am

Post by rocketeer »

Try

Code: Select all

man grep
The -v flag means inverted grep, ie lines that don't match. Basically it means that you'd not see the log lines with jpg, php, css and gif extensions. However, the -v option is not standard so it is distribution dependant.
The 'cut' command filters away the fields you don't want to see.
Post Reply