git://git.onelab.eu
/
mom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- disable delivery status notifications
[mom.git]
/
nm_mom.py
diff --git
a/nm_mom.py
b/nm_mom.py
index
4484a33
..
dc18817
100755
(executable)
--- a/
nm_mom.py
+++ b/
nm_mom.py
@@
-5,15
+5,13
@@
# Faiyaz Ahmed <faiyaza@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
# Faiyaz Ahmed <faiyaza@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: $
+# $Id:
nm_mom.py,v 1.2 2006/08/17 20:12:09 faiyaza Exp
$
#
import syslog
import os
import sys
#
import syslog
import os
import sys
-import getopt
import time
import time
-import pickle
import socket
import xmlrpclib
import socket
import xmlrpclib
@@
-30,6
+28,7
@@
def restartNM():
pid = os.fork()
if pid == 0:
bwlimit.run("/etc/init.d/pl_nm stop")
pid = os.fork()
if pid == 0:
bwlimit.run("/etc/init.d/pl_nm stop")
+ time.sleep(10)
try:
nmpid = bwlimit.run("/bin/ps -e -o pid,cmd | grep nm.py")[0].split(" ")[0]
os.kill(int(nmpid), 9)
try:
nmpid = bwlimit.run("/bin/ps -e -o pid,cmd | grep nm.py")[0].split(" ")[0]
os.kill(int(nmpid), 9)