Skip to content

Commit

Permalink
don't hardwire path for tail (perlmutter is different)
Browse files Browse the repository at this point in the history
  • Loading branch information
robnagler committed Jan 4, 2025
1 parent 9beb8b2 commit 17918c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sirepo/job_driver/sbatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,9 @@ async def _get_agent_log(connection, before_start=True):
await tornado.gen.sleep(self.cfg.agent_log_read_sleep)
f = f"{agent_start_dir}/{log_file}"
async with connection.create_process(
# test is a shell-builtin so no abs path
f"test -e {f} && /bin/tail --lines=200 {f}"
# test is a shell-builtin so no abs path. tail varies in
# location. can trust that it will be in the path
f"test -e {f} && tail --lines=200 {f}"
) as p:
o, e = await p.communicate()
_write_to_log(
Expand Down

0 comments on commit 17918c6

Please sign in to comment.