feature request: imitation of apache directive SetHandler server-status

Discussion in 'Feedback/Feature Requests' started by aww, Dec 20, 2011.

  1. aww

    aww New Member

    It would be interesting if litespeed could support the apache directive

    SetHandler server-status

    to get a little text based status report for the server and currently open connections.

    Obviously low priority but just an idea for one more bit of apache compatibility.

    I should point out apache also has two options that are handy
    server-status?notable
    server-status?auto

    I think it all comes from mod_status
    Last edited: Dec 20, 2011
  2. webizen

    webizen New Member

    Real-Time Stats (Admin CP -> Actions)
  3. aww

    aww New Member

    Yes I am aware of that feature but in some situations I want to give others access to the activity without admin access to the server.

    This way I just pw protect the directory and give them access that way.

    Maybe the stats could be accessed via some kind of api.
  4. webizen

    webizen New Member

  5. aww

    aww New Member

    Oh wow, never knew about that.

    I really need to catch up on all the newer 4.x+ stuff.
  6. eva2000

    eva2000 Member

  7. NiteWave

    NiteWave Administrator

  8. eva2000

    eva2000 Member

    Last edited: Dec 21, 2011
  9. aww

    aww New Member

    Ah I see what it does http://localhost:7080/status?rpt=summary

    Except we don't run admin panel on standard port and use SSL ;)

    You'll have to allow config somewhere for other advanced users, and I recommend a curl option with -k to ignore certificate.

    Basically I can use that exactly like the apache server-status handler

    Keep up the great work!

    Code:
    $url='http://localhost:7080/status?rpt=summary';
    $ch=curl_init($url);
    curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    $results = curl_exec($ch);
    curl_close($ch);
    
    Last edited: Dec 23, 2011

Share This Page