-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMonitor.sh
More file actions
28 lines (20 loc) · 892 Bytes
/
Copy pathMonitor.sh
File metadata and controls
28 lines (20 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/bash
# Copyright (c) 2023, 2024, 2025 Michael Willers
# This software is part of LEGENDLab-Monitoring, released under the MIT License.
# https://github.com/mwillers/LEGENDLab-Monitoring
# See the LICENSE.txt file in the project root for full license information.
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
OUTPUT_FILE="$(date +%Y_%m_%d).csv"
OUTPUT_FILE="${SCRIPT_DIR}/log/${OUTPUT_FILE}"
JULIA="/home/legend/software/julia-1.9.0/bin/julia"
PYTHON="/home/legend/software/conda/bin/python"
TIMEOUT_DURATION="15s"
echo "Running script from: $SCRIPT_DIR"
echo "Saving to: $OUTPUT_FILE"
command="${JULIA} ${SCRIPT_DIR}/Monitor.jl"
output=$(timeout $TIMEOUT_DURATION $command)
echo "$output"
echo "$output" >> $OUTPUT_FILE
(timeout $TIMEOUT_DURATION $PYTHON ${SCRIPT_DIR}/Plot.py)
(timeout $TIMEOUT_DURATION $PYTHON ${SCRIPT_DIR}/Plot24.py)
chown -R legend:legend $SCRIPT_DIR