All of us who manage web servers are always after some new tool or tweak, either to have more information about our hardware resources or to reduce consumption 😀
Here I will leave you a script that they put a while ago in Crystalb precisely for thisTo measure Apache's memory consumption, I leave you an example of the data it provides:
=========================================
Apache processes and memory usage.
=========================================
Total installed memory: 4.09Gb
Availiable memory: 3.31Gb
Free percentile: 80.00%
Status bar:
| +++++++++ —————————– |
=========================================
Current Usage
=========================================
Current processes: 28
Average memory: 76Mb
Maximum memory: 80Mb
Overall memory: 1.99Gb
=========================================
Projected usage
=========================================
Concurrent best: 446 more connection (s)
Concurrent worst: 424 more connection (s)
=========================================
As you can see, it tells us the number of connections to Apache that are in progress, amount of memory occupied, available memory, etc 🙂
Quite useful or not?
Even with just a few more minutes we could make this information reach us by email, that is, we would first put in crontab that every X time (1 hour for example) make this report, print the report in a file (stat.info) and then send us the file by email using some method that we have explained here before.
It would be:
1. Put in crontab run every hour
2. What will be executed would be:
/root/./script.sh >> /root/stat.info && mail -s "Server's Stats" kzkggaara@mail.com < /root/stat.info
And voila, it should work without problems 😀
Well nothing ... another tip that I hope will be useful 😉
regards
This script can be very useful to me, thanks for sharing it 🙂
OT: Sandy, you can stop crying in the corners that no one was commenting on about the post .. xD
Thanks for sharing it, it's good for me to pass them on to some people that will surely suit them like a glove ..
We have been very excited to find this article, it has been a long time since we wrote it and we expected some more enthusiasm from Cristalab readers. Maybe it wasn't the right place to post it 🙂
If you are interested in articles of this type, do not hesitate to say so and we will be doing tutorials and utilities in bash.
Greetings from Grafitto!
Thank you very much for reading us, for commenting and for sharing 🙂
If you want to make more scripts to automate tasks, for 'something' that you think may be interesting or useful... do not hesitate to contact me (kzkggaara[at]desdelinux[dot]net).
Thanks once again for your work
regards
I am doing a small job that requires connection to the database from bash and something else. It's simple, but I'll put it on a tutorial plan, let's see if you like it.
Thanks for the welcome!
hi, maybe the script is not available ?? I couldn't download it
If you can check it out, it would be great, I'm interested
greetings, thanks for sharing