Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "rda_python_dscheck"
version = "2.0.0"
version = "2.0.1"
authors = [
{ name="Zaihua Ji", email="[email protected]" },
]
Expand Down
6 changes: 3 additions & 3 deletions src/rda_python_dscheck/dscheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def email_check_info(self):
ss = "is"
subject = "{} active Check Record{}".format(allcnt, s)
mbuf = "{} {} listed:\n".format(subject, ss)
pgrecs = {'status' : self.get_check_status(pgrecs, allcnt)}
pgrecs = {'status': self.get_check_status(pgrecs, allcnt)}
for i in range(allcnt):
if i > 0: mbuf += self.PGLOG['SEPLINE']
mbuf += self.build_check_message(self.onerecord(pgrecs, i))
Expand Down Expand Up @@ -362,7 +362,7 @@ def interrupt_dschecks(self):
if dlupdt and self.pgexec("UPDATE dlupdt set pid = 0 WHERE lindex = {}".format(dlupdt['lindex']), self.PGOPT['extlog']):
self.pglog("Update Local File Index {} unlocked".format(dlupdt['lindex']), self.LOGWRN)
elif pgrec['command'] == 'dsrqst':
record = {'status' : 'I', 'pid' : 0}
record = {'status': 'I', 'pid': 0}
if pgrec['otype'] == 'P':
table = "ptrqst"
field = "pindex"
Expand Down Expand Up @@ -494,7 +494,7 @@ def check_host_connection(self):
hash = self.TBLHASH[tname]
condition = self.get_hash_condition(tname, None, "H", 1)
if 'HN' in self.params:
pgrecs = {'specialist' : [], 'hostname' : []}
pgrecs = {'specialist': [], 'hostname': []}
spclsts = self.pgmget(tname, "DISTINCT specialist", condition, self.PGOPT['extlog'])
if spclsts:
for specialist in spclsts['specialist']:
Expand Down
14 changes: 7 additions & 7 deletions src/rda_python_dscheck/dscheck.usg
Original file line number Diff line number Diff line change
Expand Up @@ -170,19 +170,19 @@ categories:
is present. Combination of specialist login name, command name and hostname of
computer must be unique for for each daemon control record.

Specify host name 'SLURM' for putting the command in the SLURM batch control system. If
Specify host name 'PBS' for putting the command in the PBS batch control system. If
a specified command name is not found in the daemon control, the general 'dscheck'
configuration for command name 'ALL' is used.

For example, set daemon control information for schuster, all commands on SLURM hosts,
For example, set daemon control information for schuster, all commands on PBS hosts,
for maximum 4 checks can be processed at the same time with priority 1, the smaller
the number the higher the priority is, via input file daemon.ctl

dsrqst SD -ND -IF daemon.ctl

<<Content of input file daemon.ctl>>
DaemonIndex<:>Command<:>Specialist<:>Hostname<:>ProcessLimit<:>Priority<:>
0<:>schuster<:>ALL<:>SLURM<:>4<:>1<:>
0<:>schuster<:>ALL<:>PBS<:>4<:>1<:>


3.1.2 Get Daemon Control
Expand Down Expand Up @@ -311,11 +311,11 @@ DaemonIndex<:>Command<:>Specialist<:>Hostname<:>ProcessLimit<:>Priority<:>
(ls -l | grep test) 1> test2.out 2>test2.err

For example, to add testing command 'test2' into 'dscheck' for delayed mode execution on
SLURM
PBS

dsheck AC -CM test2 -HN SLURM
dsheck AC -CM test2 -HN PBS

The command 'test2' must be executable at the current working directory on SLURM machines.
The command 'test2' must be executable at the current working directory on PBS machines.


3.2.2 Get Check
Expand Down Expand Up @@ -591,7 +591,7 @@ Information options are used to pass information, one or multiple values, into

-LH or -LocalHost, specify a local hostname to processes checks on the host for
action -PC(-ProcessCheck). It defaults to '' to use the local host name. Specify
SLURM or PBS to process batch jobs.
PBS to process batch jobs.

-MT or -MaxrunTime, specify the maxmum run time for deamon mode. It defaults to 0
for unlimit time. For examples, 5000 means seconds, and 1D means 1 day for 86400
Expand Down
Loading