apache-top icon indicating copy to clipboard operation
apache-top copied to clipboard

Initial support for apache 2.4

Open kepi opened this issue 9 years ago • 8 comments

Original apache-top doesn't work on apache 2.4 because of small diferences in output. There is new table with thread listing on top of output which cause troubles.

This initial support just ignore this table so everything works in same way as in 2.2 and older.

kepi avatar Dec 04 '15 18:12 kepi

Hi and thanks for your pull request. It looks great.

However, when I try to run it and for some reason it fails to reach the server-status page, the script fails with the following error:

Traceback (most recent call last):
  File "./apache-top.py", line 437, in <module>
    stdscr.keypad(0)
NameError: name 'stdscr' is not defined

It should show an error message instead.

If you fix this little annoyance I'll merge it

fr3nd avatar Dec 09 '15 10:12 fr3nd

Yeah, I'm no python master and not sure about how nested exception works :)

Fixed version pushed - I moved whole block to detect apache version before curses initialization which is anyway much better.

kepi avatar Dec 09 '15 15:12 kepi

I'm testing your changes with Apache 2.4.6 and I'm unable to make it work... What version did you test it with?

fr3nd avatar Dec 11 '15 16:12 fr3nd

Version 2.4.10 and 2.2.21. Can you send me your status page so I can check what differences are?

kepi avatar Dec 11 '15 16:12 kepi

Hi @kepi, thanks for the support. I also got an error testing on Apache version 2.4.16:

ERROR parsing the data. Please, make sure you are alowed to read the server-status page and you have ExtendedStatus flag activated

This is the html code generated on my mod_status page: http://slexy.org/view/s206tCFDVO

altmas5 avatar Dec 12 '15 17:12 altmas5

@altmas5 i'm not able to reach slexy.org. Looks like it doesn't work. Can you upload it somewhere else?

kepi avatar Dec 14 '15 12:12 kepi

Sorry @kepi,

Try with this one: http://pastebin.com/GYBsJ7UM

altmas5 avatar Dec 15 '15 14:12 altmas5

@altmas5 please turn ExtendedStatus On in your config. If you open file you provided me with on pastebin, you can see that on last line there is info you don't have it enabled. Apache-top is working only with extended status.

@fr3nd Can you please provide me with raw output from status page so I can fix this?

kepi avatar Jan 07 '16 16:01 kepi