Classes | |
class | RemoteCMD |
Remote command definitions and execution. More... | |
Functions | |
def | ExecCMD |
Execute a command on the remote nodes. | |
def | ExecCMDs |
Execute a set of commands on the remote nodes. | |
def | check_active |
returns the number of RSH threads that are active and kill threads exceeding WALTIME | |
def | check_passive |
returns the number of RSH threads that are passive and kill threads exceeding WALTIME | |
def | get_passive |
returns the list of RSH threads that are passive | |
def | printout |
print thread results | |
def | get_nodes |
get list of nodes from the file | |
def | get_cmds |
get list of commands from the file end append common execution directory if not None | |
Variables | |
string | __copyright__ |
string | __license__ |
string | RSH = 'ssh' |
tuple | TIMEOUT = timedelta(0,3600L) |
int | TIMECHECK = 10 |
SHOWTIMES = False | |
VERBOSE = False | |
KILL = True |
def SLIMutils.pcmdutils.check_active | ( | t, | ||
tout, | ||||
kill | ||||
) |
returns the number of RSH threads that are active and kill threads exceeding WALTIME
Definition at line 257 of file pcmdutils.py.
def SLIMutils.pcmdutils.check_passive | ( | t, | ||
tout, | ||||
kill | ||||
) |
returns the number of RSH threads that are passive and kill threads exceeding WALTIME
Definition at line 273 of file pcmdutils.py.
def SLIMutils.pcmdutils.ExecCMD | ( | nodes, | ||
cmd, | ||||
RSH = RSH , |
||||
TIMEOUT = TIMEOUT , |
||||
TIMECHECK = TIMECHECK , |
||||
SHOWTIMES = SHOWTIMES , |
||||
VERBOSE = VERBOSE , |
||||
KILL = KILL | ||||
) |
Execute a command on the remote nodes.
Requires: Standard python modules.
Parameters: nodes: list of nodes (user or hostname) cmd: a command string (with &&, ||, ;, or pipes)
Keyword parameters (optional): RSH: command to execute remote shell TIMEOUT: timedelta object with timeout for each command TIMECHECK: how often to check for progress in seconds SHOWTIMES: show start, end, and wall times VERBOSE: be verbose KILL: kill the command exceeding the timeout
Returns: Cumulative status of all nodes (0 is OK)
Notes: None so far
Bugs: None so far
Definition at line 72 of file pcmdutils.py.
def SLIMutils.pcmdutils.ExecCMDs | ( | nodes, | ||
cmds, | ||||
RSH = RSH , |
||||
TIMEOUT = TIMEOUT , |
||||
TIMECHECK = TIMECHECK , |
||||
SHOWTIMES = SHOWTIMES , |
||||
VERBOSE = VERBOSE , |
||||
KILL = KILL | ||||
) |
Execute a set of commands on the remote nodes.
Requires: Standard python modules.
Parameters: nodes: list of nodes (user or hostname) cmds: a list of commands (separated by &&, ||, ;, or pipes) per element
Keyword parameters (optional): RSH: command to execute remote shell TIMEOUT: timedelta object with timeout for each command TIMECHECK: how often to check for progress in seconds SHOWTIMES: show start, end, and wall times VERBOSE: be verbose KILL: kill the command exceeding the timeout
Returns: Cumulative status of all commands (0 is OK)
Notes: None so far
Bugs: None so far
Definition at line 149 of file pcmdutils.py.
def SLIMutils.pcmdutils.get_cmds | ( | cmdlist, | ||
exedir | ||||
) |
get list of commands from the file end append common execution directory if not None
Definition at line 347 of file pcmdutils.py.
def SLIMutils.pcmdutils.get_nodes | ( | nodelist | ) |
def SLIMutils.pcmdutils.get_passive | ( | t | ) |
def SLIMutils.pcmdutils.printout | ( | res, | ||
shawtime | ||||
) |
string __copyright__ |
string __license__ |
Initial value:
""" This file is part of SLIMpy . SLIMpy is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SLIMpy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with SLIMpy . If not, see <http://www.gnu.org/licenses/>. """
Definition at line 4 of file pcmdutils.py.
KILL = True |
Definition at line 42 of file pcmdutils.py.
string RSH = 'ssh' |
Definition at line 37 of file pcmdutils.py.
SHOWTIMES = False |
Definition at line 40 of file pcmdutils.py.
int TIMECHECK = 10 |
Definition at line 39 of file pcmdutils.py.
tuple TIMEOUT = timedelta(0,3600L) |
Definition at line 38 of file pcmdutils.py.
VERBOSE = False |
Definition at line 41 of file pcmdutils.py.