mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-17 11:04:00 +01:00
Monitoring python script removed semicolon
This commit is contained in:
parent
c1ed540af8
commit
764dec45fd
@ -156,11 +156,11 @@ def checkProcessRunningStatus(process_name, pidFile):
|
|||||||
#if not matched set pidFileMatched=False
|
#if not matched set pidFileMatched=False
|
||||||
printd("Checking pid file")
|
printd("Checking pid file")
|
||||||
if isPidMatchPidFile(pidFile, pids) == StatusCodes.SUCCESS:
|
if isPidMatchPidFile(pidFile, pids) == StatusCodes.SUCCESS:
|
||||||
return True,pids;
|
return True,pids
|
||||||
|
|
||||||
printd("pid of exit status %s" %exitStatus)
|
printd("pid of exit status %s" %exitStatus)
|
||||||
|
|
||||||
return False,pids;
|
return False,pids
|
||||||
|
|
||||||
def restartService(service_name):
|
def restartService(service_name):
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ def checkProcessStatus( process ):
|
|||||||
if service_name == 'apache2':
|
if service_name == 'apache2':
|
||||||
# Killing apache2 process with this the main service will not start
|
# Killing apache2 process with this the main service will not start
|
||||||
for pid in pids:
|
for pid in pids:
|
||||||
cmd = 'kill -9 '+pid;
|
cmd = 'kill -9 '+pid
|
||||||
printd(cmd)
|
printd(cmd)
|
||||||
Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT)
|
Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT)
|
||||||
|
|
||||||
@ -331,9 +331,9 @@ def loadPsFromUnMonitFile():
|
|||||||
for i in plist:
|
for i in plist:
|
||||||
dict_unmonit[i.split(':')[0]] = i.split(':')[1]
|
dict_unmonit[i.split(':')[0]] = i.split(':')[1]
|
||||||
|
|
||||||
fd.close();
|
fd.close()
|
||||||
|
|
||||||
return dict_unmonit;
|
return dict_unmonit
|
||||||
|
|
||||||
|
|
||||||
def writePsListToUnmonitFile(umonit_update):
|
def writePsListToUnmonitFile(umonit_update):
|
||||||
@ -348,7 +348,7 @@ def writePsListToUnmonitFile(umonit_update):
|
|||||||
printd("Failed to open file %s " %Config.UNMONIT_PS_FILE)
|
printd("Failed to open file %s " %Config.UNMONIT_PS_FILE)
|
||||||
return StatusCodes.FAILED
|
return StatusCodes.FAILED
|
||||||
|
|
||||||
fd.write(line);
|
fd.write(line)
|
||||||
fd.close()
|
fd.close()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user