: How to view Web Server Activity via a command line or terminal Is there a way to monitor the activity of a web server via the command line. I have seen in many movies webmasters watching
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.
More posts by @Barnes591
2 Comments
Sorted by latest first Latest Oldest Best
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.
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 127.0.0.1/whm-server-status
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
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.