Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix scanner healthcheck. #735

Merged
merged 1 commit into from
Jun 20, 2023
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 bin/scanhc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PORT=$1
LASTUPDATE=""
for i in {1..5} ; do
UPDATE=$(wget -q -O- http://0.0.0.0:$PORT/|grep -E '^last_freq_update')
UPDATE=$(wget -q -O- http://0.0.0.0:$PORT/|grep -E '^run_timestamp')
if [[ "$UPDATE" == "" ]] ; then
continue
fi
Expand Down
2 changes: 2 additions & 0 deletions gamutrf/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def init_prom_vars():
"tune_overlap": Gauge("tune_overlap", "multiple of samp_rate when retuning"),
"tune_step_fft": Gauge("tune_step_fft", "tune FFT step (0 is use sweep_sec)"),
"sweep_sec": Gauge("sweep_sec", "scan sweep rate in seconds"),
"run_timestamp": Gauge("run_timestamp", "updated when flowgraph is running"),
}
return prom_vars

Expand Down Expand Up @@ -328,6 +329,7 @@ def run_loop(options, prom_vars, wavelearner):
tb.start()
while running and reconfigures == handler.reconfigures:
idle_time = 1
prom_vars["run_timestamp"].set(time.time()),
time.sleep(idle_time)

while reconfigures != handler.reconfigures:
Expand Down
Loading