Skip to content

Commit a623703

Browse files
authored
Merge pull request #274 from vkucera/setup
Report more info in the setup summary script. Extend snippet for runtime debugging.
2 parents 05d2e0d + e114f25 commit a623703

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

docs/troubleshooting/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ o2-analysis-... > stdout.log 2>&1
3434
Search for keywords related to problems in the log file using the `grep` command:
3535

3636
```bash
37-
grep -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "segmentation" -e "Segmentation" -e "SEGMENTATION" -e "command not found" -e "Error:" -e "Error in " -e "\\[WARN\\]" stdout.log
37+
grep -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "segmentation" -e "Segmentation" -e "SEGMENTATION" -e "command not found" -e "Program crashed" -e "Error:" -e "Error in " -e "\\[WARN\\]" stdout.log
3838
```
3939

4040
Try to understand and resolve the first reported problem.

docs/troubleshooting/summarise_o2p_setup.sh

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
# Summarise O2Physics setup
44

5+
# System info
6+
7+
systemName=""
8+
user=""
9+
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
10+
systemName="$(lsb_release -ds)"
11+
user="$(whoami)"
12+
elif [[ "$OSTYPE" == "darwin"* ]]; then
13+
systemName="$(sw_vers -productName) $(sw_vers -productVersion)"
14+
user="$(whoami)"
15+
else
16+
echo "Unrecognised OS type: \"${OSTYPE}\""
17+
fi
18+
echo "OS: ${systemName}"
19+
echo "User: ${user}"
20+
21+
# aliBuild info
22+
523
if [[ -n "$(which aliBuild)" ]]; then
624
echo "aliBuild location: $(which aliBuild)"
725
# echo "all aliBuild locations: $(whereis aliBuild)"
@@ -10,19 +28,29 @@ else
1028
echo "aliBuild not found."
1129
fi
1230

31+
if [[ -n "$ALIBUILD_WORK_DIR" ]]; then
32+
echo "ALIBUILD_WORK_DIR=\"${ALIBUILD_WORK_DIR}\""
33+
else
34+
echo "ALIBUILD_WORK_DIR is not set."
35+
fi
36+
37+
# Repository info
38+
1339
for repo in alidist O2 O2Physics; do
1440
[[ -d "${repo}" ]] || { echo "Directory ${repo} not found in the current directory."; continue; }
1541
echo "Last commit of ${repo}: $(cd "${repo}" && git log -n 1 --pretty="format:%ci %h")"
1642
done
1743

44+
# Package build info
45+
1846
cmdStat=""
1947
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
2048
cmdStat="stat -c %y"
2149
elif [[ "$OSTYPE" == "darwin"* ]]; then
2250
cmdStat="stat -f %Sm"
2351
fi
2452

25-
if [[ -n "$cmdStat" ]]; then
53+
if [[ -n "$cmdStat" && -n "$ALIBUILD_WORK_DIR" ]]; then
2654
for pkg in O2 O2Physics; do
2755
log="$ALIBUILD_WORK_DIR/BUILD/${pkg}-latest/log"
2856
[[ -f "${log}" ]] || { echo "Log file ${log} not found."; continue; }

0 commit comments

Comments
 (0)