LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Httpd status (https://www.linuxquestions.org/questions/linux-software-2/httpd-status-606544/)

ittec 12-13-2007 09:35 AM

Httpd status
 
Hi

i revised a httpd.conf of one server to activate the statistics of apache. If can view the statisctics by browser like http://X.X.X.X/httpd-status but i need to see them in shell. If i write

# httpd status

i don't obtain nothing. If i write

# service httpd status

The shell output is a large number of PIDs. What I can do to view httpd status statistics from shell? Something like this:

CPU Usage: u6047.55 s364.33 cu121.44 cs19.23 - 29.3% CPU load
25.5 requests/sec - 0.7 MB/second - 28.6 kB/request
130 requests currently being processed, 63 idle servers

Thanks

theNbomr 12-13-2007 03:50 PM

how about
Code:

wget -o - http://localhost/httpd-status
This uses the html output provided by the web server, but fetches it locally and dumps it to standard output. If you need to clean it up a bit, parse it with perl using HTML::Parser.

--- rod.

ittec 12-14-2007 06:23 AM

Thanks but
 
Thanks for your answer but i think doesnt work. I did

wget -otemporaly http://mydomain.com/httpd-status

But temporaly file only contains the output of wget command, not output of httpd-status :(

Any idea?

At least i can revise httpd-status by web.

theNbomr 12-14-2007 09:07 AM

My bad. The switch to specify the output file is '-O' (uppercase Oh), not -o. Like you, I should have done 'man wget' to get the correct commandline. At any rate, the actual HTML output from the command will still have been saved to a file named by your commandline URL, probably 'httpd-status.html'. The file name used should be indicated in the file containing wget's output.
--- rod.


All times are GMT -5. The time now is 10:50 AM.