Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ckiddo74 committed Aug 28, 2015
2 parents 15e31f0 + 06855c6 commit b341e03
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hresmonAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ def terminateAllAgents():
try:
myprocesses = multiprocessing.active_children()
for p in myprocesses:
logger.info("Terminate request "+p.name())
t.terminate()
logger.info("Terminate request "+p.name)
p.terminate()
msg = "Success!"
except Exception.message, e:
response.status = 400
Expand Down Expand Up @@ -690,9 +690,11 @@ def runAgentMulti2(pollTime,uuid,metrics,pid):
command = commandTimestamp+";"+metrics[key]['command']
if "__pid__" in command:
command = command.replace("__pid__",pid)
#print "COMMAND for METRICS",command
print "COMMAND for METRICS:",command

values = subprocess.check_output(command, shell=True).rstrip()

print ":::>", command
values_decoded = values.decode('utf-8')
# This convert multiline to singleline
values_decoded = values_decoded.replace("\n"," ")
Expand Down

0 comments on commit b341e03

Please sign in to comment.