couple changes for cleanup in perflogserver.py and daemon/setup.py

This commit is contained in:
bharnden 2018-10-15 08:33:06 -07:00
parent f66efd3ab9
commit 934d7a0764
2 changed files with 6 additions and 7 deletions

View file

@ -12,7 +12,6 @@ node metrics: throughput, mem, cpu total, usr, sys, wait
import commands
import optparse
import os
import pdb
import signal
import sys
import time
@ -116,8 +115,8 @@ def checkserverthreshold(metricval):
for key in serverthresholds.getkeys():
if key == "processorusedcputime":
pcpus = metricval.getvalue(key)
for ind in range(0, len(pcpus)):
if pcpus[ind] > serverthresholds.getvalue(key):
for ind, pcpu in enumerate(pcpus):
if pcpu > serverthresholds.getvalue(key):
alarm = ["server", os.uname()[1], str(ind) + key,
"%.2f" % pcpus[ind], ">", serverthresholds.getvalue(key)]
if options.timestamp: