Skip to content

Commit 2ae29d0

Browse files
David Hülsmeiersuaefar
David Hülsmeier
authored andcommitted
added example scripts to observe and kill ror-fade
1 parent b3b2fa7 commit 2ae29d0

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

examples/kill_ror_fade.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
SCRIPTS=(
4+
ror-fade
5+
# main scripts
6+
q_pre_simulation.sh
7+
q_record.sh
8+
q_features.sh
9+
q_train.sh
10+
q_recog.sh
11+
q_break_or_adjust.sh
12+
# scripts
13+
corpus-generate
14+
processing
15+
training
16+
recognition
17+
evaluation
18+
figures
19+
)
20+
21+
for ((ii=0; ii<${#SCRIPTS[@]} ; ii++)) ; do
22+
script="${SCRIPTS[$ii]}"
23+
PID=$(pidof -x "$script")
24+
[ -z "${PID}" ] || (
25+
kill ${PID}
26+
echo "killed ${script}"
27+
)
28+
done

examples/observe_jobs.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# invoke this script with `watch observe_jobs.sh <PROJECT>`
4+
PROJECT="${1}"
5+
STEPS=$(ls -1 "${PROJECT}/jobs" | sed '/lock/d')
6+
JOBS=$(find "${PROJECT}/jobs" -iname '*.job')
7+
8+
for istep in $STEPS ; do
9+
echo "${istep}:"
10+
for cstate in pending finished ; do
11+
CJ=$(echo "${JOBS}" | grep $istep | grep $cstate | \
12+
sed -e "s/${istep}//g" -e "s/${cstate}//g" -e "s/jobs//g" -e "s/\///g" -e "s/^\.//g" | tr '\n' ' ')
13+
echo " ${cstate}: $CJ"
14+
done
15+
done

examples/observe_ror_fade.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# invoke this script with `watch observe_fast_fade.sh`
4+
5+
pidof -x ror-fade &>/dev/null && echo "1: ror-fade runs" || echo "0: ror-fade not"
6+
echo ""
7+
pidof -x q_pre_simulation.sh &>/dev/null && echo "1: q_pre_simulation.sh runs" || echo "0: q_pre_simulation.sh not"
8+
pidof -x q_record.sh &>/dev/null && echo "1: q_record.sh runs" || echo "0: q_record.sh not"
9+
pidof -x q_features.sh &>/dev/null && echo "1: q_features.sh runs" || echo "0: q_features.sh not"
10+
pidof -x q_train.sh &>/dev/null && echo "1: q_train.sh runs" || echo "0: q_train.sh not"
11+
pidof -x q_recog.sh &>/dev/null && echo "1: q_recog.sh runs" || echo "0: q_recog.sh not"
12+
pidof -x q_break_or_adjust.sh &>/dev/null && echo "1: q_break_or_adjust.sh runs" || echo "0: q_break_or_adjust.sh not"
13+
echo ""
14+
pidof -x corpus-generate &>/dev/null && echo "1: corpus-generate runs" || echo "0: corpus-generate not"
15+
pidof -x processing &>/dev/null && echo "1: processing runs" || echo "0: processing not"
16+
pidof -x training &>/dev/null && echo "1: training runs" || echo "0: training not"
17+
pidof -x recognition &>/dev/null && echo "1: recognition runs" || echo "0: recognition not"
18+
pidof -x evaluation &>/dev/null && echo "1: evaluation runs" || echo "0: evaluation not"
19+
pidof -x figures &>/dev/null && echo "1: figures runs" || echo "0: figures not"

0 commit comments

Comments
 (0)