We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 958de47 + 8cc363b commit 480640dCopy full SHA for 480640d
2 files changed
examples/limcontrol.py
@@ -0,0 +1,18 @@
1
+from pythonlsf import lsf
2
+
3
4
+# the hostname you want to operate lim running on
5
+host = "your_hostname"
6
7
+# set opCode to 1 if you need to reboot lim
8
+#set to 2 if you want to shutdown it
9
+opCode = 1
10
11
+if lsf.lsb_init("test") > 0:
12
+ print("failed to initialize")
13
+ exit
14
+if lsf.ls_limcontrol(host, opCode) == 0 :
15
+ print("host operated successfully")
16
+else :
17
+ print("host operated failed")
18
examples/restartMbd.py
@@ -0,0 +1,15 @@
+req = lsf.mbdCtrlReq()
+req.opCode = 0
+req.message = ""
+req.name = "mbd"
+if lsf.lsb_init("test") > 0 :
+if lsf.lsb_reconfig(req) == 0 :
+ print("mbd restarted successfully")
+ print("failed to restart mbd")
0 commit comments