Fix imapproxy_multi
- Added imapproxy.conf as parameter as pimpstat won't work without - Added unversal_newlines as Popen parameter because otherwise it's binary output
This commit is contained in:
parent
eea45ab34b
commit
2f14a9b31e
|
@ -79,9 +79,10 @@ def print_fetch():
|
||||||
connections_created = 0
|
connections_created = 0
|
||||||
connections_reused = 0
|
connections_reused = 0
|
||||||
connections = Popen(
|
connections = Popen(
|
||||||
"pimpstat -c | egrep '(Total (Reused|Created)|Cache (Hits|Misses))'",
|
"/usr/sbin/pimpstat -f /etc/imapproxy.conf -c | /usr/bin/egrep '(Total (Reused|Created)|Cache (Hits|Misses))'",
|
||||||
shell=True,
|
shell=True,
|
||||||
stdout=PIPE
|
stdout=PIPE,
|
||||||
|
universal_newlines=True
|
||||||
)
|
)
|
||||||
for line in connections.stdout:
|
for line in connections.stdout:
|
||||||
if re.search(r'Hits', line):
|
if re.search(r'Hits', line):
|
||||||
|
|
Loading…
Reference in New Issue