File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 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+
Original file line number Diff line number Diff line change 1+ from pythonlsf import lsf
2+
3+ req = lsf .mbdCtrlReq ()
4+ req .opCode = 0
5+ req .message = ""
6+ req .name = "mbd"
7+
8+ if lsf .lsb_init ("test" ) > 0 :
9+ print ("failed to initialize" )
10+ exit
11+ if lsf .lsb_reconfig (req ) == 0 :
12+ print ("mbd restarted successfully" )
13+ else :
14+ print ("failed to restart mbd" )
15+
You can’t perform that action at this time.
0 commit comments