DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
Functions
hermes-reboot-wibs Namespace Reference
Functions
cli
(dry_run, crate)
Function Documentation
◆
cli()
cli
(
dry_run
,
crate
)
Definition at line
11
of file
hermes-reboot-wibs.py
.
11
def
cli(dry_run, crate):
12
""""""
13
password = getpass.getpass(
'Password: '
)
14
15
for
i
in
range(1,6):
16
hostname = f
'np04-wib-{crate}0{i}'
17
s = pxssh.pxssh()
18
s.login(hostname,
'root'
, password)
19
s.sendline(
'uptime'
)
# run a command
20
s.prompt()
# match the prompt
21
print(hostname, s.before.decode(
'utf-8'
))
# print everything before the prompt.
22
if
not
dry_run:
23
s.sendline(
'reboot'
)
# run a command
24
s.prompt()
25
print(hostname, s.before.decode(
'utf-8'
))
# print everything before the prompt.
26
s.logout()
27
Generated on
for DUNE-DAQ by
1.17.0