File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change 2
2
set -x
3
3
4
4
LOG_DIR=${LOG_DIR:-/ tmp/ devstack-logs}
5
- mkdir -p $LOG_DIR
6
- sudo journalctl -o short-precise --no-pager & > $LOG_DIR /journal.log
7
- sudo systemctl status " devstack@*" & > $LOG_DIR /devstack-services.txt
8
- free -m > $LOG_DIR /free.txt
9
- dpkg -l > $LOG_DIR /dpkg-l.txt
10
- pip freeze > $LOG_DIR /pip-freeze.txt
11
- cp ./devstack/local.conf $LOG_DIR
12
- sudo find $LOG_DIR -type d -exec chmod 0755 {} \;
13
- sudo find $LOG_DIR -type f -exec chmod 0644 {} \;
5
+ mkdir -p " $LOG_DIR "
6
+ # shellcheck disable=SC2024
7
+ sudo journalctl -o short-precise --no-pager & > " $LOG_DIR /journal.log"
8
+ # shellcheck disable=SC2024
9
+ sudo systemctl status " devstack@*" & > " $LOG_DIR /devstack-services.txt"
10
+ for service in $( systemctl list-units --output json devstack@* | jq -r ' .[].unit | capture("devstack@(?<svc>[a-z\\-]+).service") | ' .svc' ' )
11
+ do
12
+ journalctl -u " devstack@${service} .service" --no-tail > " ${LOG_DIR} /${service} .log"
13
+ done
14
+ free -m > " $LOG_DIR /free.txt"
15
+ dpkg -l > " $LOG_DIR /dpkg-l.txt"
16
+ pip freeze > " $LOG_DIR /pip-freeze.txt"
17
+ cp ./devstack/local.conf " $LOG_DIR "
18
+ sudo find " $LOG_DIR " -type d -exec chmod 0755 {} \;
19
+ sudo find " $LOG_DIR " -type f -exec chmod 0644 {} \;
You can’t perform that action at this time.
0 commit comments