The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

capture text to file: Server Status > Apache Status

Discussion in 'EasyApache' started by simpleupdates, Dec 7, 2008.

  1. simpleupdates

    simpleupdates Member

    Joined:
    Jan 17, 2005
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Hi there!

    I wonder if there is a way to capture the text output from

    Main >> Server Status >> Apache Status

    to a text file upon a program trigger. Is there a way I could run the status command from the command line or a bash script?

    Thanks!
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    The Apache Status is essentially the same thing you get if you go to:

    http://localhost/whm-server-status

    You can adjust what addresses/hostnames are able to access that URL in the httpd.conf. But going to that URL on the local machine itself should be easy enough. IF you try to go to that URL from your home machine it obviously isn't going to work, and even if you use the main IP of the server in that URL it won't work by default because browsing that URL from a machine other than localhost is usually disabled by default.

    You could use WGET to snatch that URL and put it in a file, i.e. wget http://localhost/whm-server-status , but it would contain HTML formatting that you might not want.

    Mike
     
  3. simpleupdates

    simpleupdates Member

    Joined:
    Jan 17, 2005
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Perfect

    Hi there,

    This is just what I was looking for!

    Thanks,
     

Share This Page