File: collectlogs

package info (click to toggle)
golang-github-gophercloud-gophercloud 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,416 kB
  • sloc: sh: 99; makefile: 21
file content (13 lines) | stat: -rwxr-xr-x 443 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
set -x

LOG_DIR=${LOG_DIR:-/tmp/devstack-logs}
mkdir -p $LOG_DIR
sudo journalctl -o short-precise --no-pager &> $LOG_DIR/journal.log
sudo systemctl status "devstack@*" &> $LOG_DIR/devstack-services.txt
free -m > $LOG_DIR/free.txt
dpkg -l > $LOG_DIR/dpkg-l.txt
pip freeze > $LOG_DIR/pip-freeze.txt
cp ./devstack/local.conf $LOG_DIR
sudo find $LOG_DIR -type d -exec chmod 0755 {} \;
sudo find $LOG_DIR -type f -exec chmod 0644 {} \;