Bug #24105
Show recent runs not working properly
100%
Description
On artdaq_runcontrol_gui we've seen that run numbers are not increasing after stopping a run, look at: #24081
We use the script: daqinterface/bin/show_recent_runs.sh
to query the run number.
Investigating this script on a terminal, outside GUI, we're not getting the actual last run number if we do:
show_recent_runs.sh 1
Not even if we do:
show_recent_runs.sh 10
If we ask for a number greater than the runs, we do get the last run number (duh!) but is not ordered. Hence not really useful.
Associated revisions
JCF: Issue #24105: touch the run record subdirectory on start to timestamp it with the start time, not the time that it was created on the config transition
History
#1 Updated by John Freeman 11 months ago
Interesting, I'll look into this. If I perform a clean login, what are the exact commands I should type to recreate this error?
#2 Updated by John Freeman 11 months ago
Actually: is there a chance that for some reason the run-numbered subdirectories in your run records directory aren't in expected chronological order? Because show_recent_runs.sh uses "ls -tr1" on the run records directory to determine the most recent runs...
#3 Updated by John Freeman 11 months ago
- % Done changed from 0 to 100
- Status changed from New to Resolved
Talking with Esteban and Gennadiy, what I found out was that the mtime of a run record subdirectory was the time it was originally created in /tmp/run_record_attempted_$USER, during the config transition and prior to being copied over to the run records directory at the beginning of the start transition. In a situation where there are multiple start-stops off a single configuration, this means that the "ls -tr1" of show_recent_runs.sh won't be able to distinguish chronologically between these runs.
I've added a line in commit 5d1d6162a5e810743192f3b673ee37119745de4a of bugfix/24105_chronological_ordering_of_run_records whereby, immediately after copying a run record into the run records directory, it calls the "touch" function to make its mtime match up with run start. This way "ls -tr1" will be able to reveal which runs began when, even if multiple start-stops were performed off of a config.
#4 Updated by Gennadiy Lukhanin 11 months ago
- Status changed from Resolved to Reviewed
Works. Tested with the for_sbndaq-artdaq branch.
#5 Updated by Eric Flumerfelt about 2 months ago
- Status changed from Reviewed to Closed
JCF: Issue #24105: touch the run record subdirectory on start to timestamp it with the start time, not the time that it was created on the config transition