apache threshold

Hi folks,

how can i check apache threshold values via shell scripting and what factors need to check via shell scripting process or number of users or what.

pls do advice me.

Thanks,
Bash

Hi,

can any one help?

Thanks,
Bash

What are your inputs? How are they generated?

What are your (desired) outputs?

Hi,

Thanks for reply, i want to calculate threshold for users on apache, if it exceed than 100 so it generate mail, cron will run after 10 minute, and also need to calculate apache instance if it exceed than 50 so it generate email.

Thanks,
Bash

Er... something like this:

if [ $(pidof httpd | awk '{print $2}') -gt 50 ]; then
    echo Too many httpd processes.
fi

Again, if you have any actual input/output, we can help.

Do you have a different version of pidof? Mine just prints a list of PIDs, not the number of instances in $2. Or perhaps you mean '{print NF}'?

:(, its giving me process id of httpd is above 50 but i asked

i want to calculate threshold for users on apache, if it exceed than 100 so it generate mail, cron will run after 10 minute, and also need to calculate apache instance if it exceed than 50 so it generate email.

Is it possible to calculte apache process swap taking currently and how much it taking in MB, how much apache process taking memory, in MB.

can anyone shed a light on it plsssss................

Thanks,
Bash

Hi era,

whats your input? pls can u advice.

Thanks,
Bash

I can only echo what others have already said: tell us how these things are calculated and we can piece together the puzzle for you; but you are using terms which are not familiar. What's a "threshold for users on apache"? You mean a limit on how many users Apache will serve, or a limit on how many Apache instances a user can create, or a limit on how many Apache instances will serve the same user (IP address)? What's the difference between the threshold of 50 and the threshold of 100; the criteria look similar to me?

Several solutions have shown how to calculate the number of running httpd processes already -- is this at all helpful, or are you looking for something else?

Hi,

I want to see how much apache is taking RAM and SWAP, if there are total 5 process of http is running and only wants to count them there are total two process are taking above 20MB RAM and. I also want to calculate how much users are currently connecting to apache, i want in depth calcultion of apache with shell scripts, that explore apache.

Thanks,
Bash