Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions bin/check_apache
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,13 @@ def parse(data, version):
# First remove server name on first line
data = data.splitlines(False)
data = data[1:]
# Then remove lines with dates (and more than : delimiter in it)
lines=[]
for l in data:
if l.startswith('Server Built'):
continue
if l.startswith('CurrentTime'):
continue
if l.startswith('RestartTime'):
continue
lines.append(l)
data = "\n".join(lines)
stats = ["BytesPerSec CPULoad", "BusyWorkers", "ReqPerSec", "BytesPerReq", "Scoreboard"]
_data = []
for item in data:
for i in stats:
if i in item:
_data.append(item)
data = "\n".join(_data)
# Clean out certain chars
replace = '() '
csvobj = csv.reader(StringIO.StringIO(data), delimiter = ":", skipinitialspace = True)
Expand Down