Is there a way to monitor the activity of a web server via the command line.

I have seen in many movies webmasters watching a command line screen in which data is continuously moving up, seems to me more like a web server activity monitor. Like as seen in this video at 1.48.


The video that you have linked does not look like real time monitering it just looks like SSH and they are preforming SSH commands such as GREP and CURL, or they are viewing files that contain scripts and just scrolling down.

It's worth mentioning that generally when news companies make videos they want the IT guys to look super smart and super geeky.. Its unlikely they will be using such command lines on a daily basis and will be using GUI's via an web application to view things such as this. Anyway onto the actual answer we go...

You can view the current concurrent users within SSH using:

netstat -plan | grep :80 | wc -l

And for Real Time Monitoring use:

httpd status

And for even more information within the httpd status use:

httpd fullstatus

Cpanel users can use (not tested this myself)

/usr/bin/lynx -dump -width 500

Another alternative would be to use 'GoAccess'

If you use NGinx or Apache and just want more detail on the screen then you could install GoAccess which should do the job nicely.

To install in Ubuntu/Debian do sudo apt-get install goaccess

And to run sudo goaccess /var/log/apache2/your-log-file.log

| improve this answer | |

In addition to the commands that bybe mentioned, you can simply use this command to see all the hits to the webserver in the apache log file in real time as they happen:

tail -F /var/log/apache2/access_log

Then you can use <ctrl>-c to stop.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.