Skip to content

Conversation

@KaushikMalapati
Copy link
Contributor

Description

  • Removed trailing whitespace in stopdaq
  • Fixed braces in wheredaq awk (https://www.shellcheck.net/wiki/SC1083)
  • Quoted CNFFILE in stopdaq (file name)
  • In both, quoted $(basename "$0") argument to daqutils (evaluates to stopdaq or wheredaq respectively)
  • In both, disabled SC2068 for $@ argument(s) to daqutils (https://www.shellcheck.net/wiki/SC2068). Not sure if there are any globbed arguments you would intentionally provide, like a path to multiple cnf files.

Motivation and Context

How Has This Been Tested?

Where Has This Been Documented?

@KaushikMalapati KaushikMalapati requested a review from a team as a code owner July 21, 2025 06:48
Copy link
Member

@ZLLentz ZLLentz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct and harmless, but the scripts are high-traffic enough that I suspect we need to test a bit. Since we're in shutdown hopefully it isn't so hard to run stopdaq, for example.

@silkenelson
Copy link
Collaborator

silkenelson commented Jul 21, 2025

I would test wheredaq & stopdaq together anyways. I would test in:
LCLS I instrument (single setup): XCS or MEC
LCLS I instrument (double setup): CXI - test from cxi-daq at minimum. Check script also on cxi-monitor, this checks the DAQ w/ a different platform.
LCLS II instrument (single setup): TMO or RIXS
check with the CDSOs, maybe even in a relevant slack channel already.

@KaushikMalapati
Copy link
Contributor Author

wheredaq working

[kaushikm@xcs-control et]$ wheredaq && scripts/wheredaq
DAQ is running on xcs-daq
DAQ is running on xcs-daq
[kaushikm@xcs-control et]$ sshcd cxi-daq
===============================================================================
This is a Federal computer system and is the property of the United States
Government. It is for authorized use only. Users (authorized or unauthorized)
have no explicit or implicit expectation of privacy.

By using this system you expressly consent to the terms and conditions in
https://www.slac.stanford.edu/comp/policy/use.html
===============================================================================
Current working directory: /cds/home/k/kaushikm/et
[kaushikm@cxi-daq et]$ wheredaq && scripts/wheredaq
Main DAQ cxi_0 is not running on cxi-daq
Main DAQ cxi_0 is not running on cxi-daq
[kaushikm@cxi-daq et]$ sshcd cxi-monitor
===============================================================================
This is a Federal computer system and is the property of the United States
Government. It is for authorized use only. Users (authorized or unauthorized)
have no explicit or implicit expectation of privacy.

By using this system you expressly consent to the terms and conditions in
https://www.slac.stanford.edu/comp/policy/use.html
===============================================================================
Current working directory: /cds/home/k/kaushikm/et
[kaushikm@cxi-monitor et]$ wheredaq && scripts/wheredaq
Secondary DAQ cxi_1 is not running on cxi-monitor
Secondary DAQ cxi_1 is not running on cxi-monitor
[kaushikm@cxi-monitor et]$ sshcd tmo-daq
===============================================================================
This is a Federal computer system and is the property of the United States
Government. It is for authorized use only. Users (authorized or unauthorized)
have no explicit or implicit expectation of privacy.

By using this system you expressly consent to the terms and conditions in
https://www.slac.stanford.edu/comp/policy/use.html
===============================================================================
Current working directory: /cds/home/k/kaushikm/et
[kaushikm@tmo-daq et]$ wheredaq && scripts/wheredaq
DAQ is not running in tmo
DAQ is not running in tmo

@silkenelson is it enough to test stopdaq in just one hutch when the daq is and isn't running?

@KaushikMalapati
Copy link
Contributor Author

Tested in rix

rix-daq:et> restartdaq
DAQ is not running in rix
+ /cds/home/opr/rixopr/git/lcls2_051225/install/bin/daqmgr restart /reg/g/pcds/dist/pds/rix/scripts/rix.py

took 4.3563s. for starting the DAQ
rix-daq:et> ps
  PID TTY          TIME CMD
11840 pts/0    00:00:00 bash
15306 pts/0    00:00:00 ps
rix-daq:et> wheredaq
DAQ is running on rix-daq
rix-daq:et> ./scripts/wheredaq
DAQ is running on rix-daq
rix-daq:et> ./scripts/stopdaq
+ /cds/home/opr/rixopr/git/lcls2_051225/install/bin/daqmgr stop /reg/g/pcds/dist/pds/rix/scripts/rix.py

is there anything else I should try?

@silkenelson
Copy link
Collaborator

I think this is enough testing, thank you.

@KaushikMalapati KaushikMalapati merged commit 0705f9b into pcdshub:master Jul 23, 2025
2 checks passed
@KaushikMalapati KaushikMalapati deleted the daq branch July 23, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants