ClickHouse/utils/report/clickhouse-report

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

#!/bin/sh -x
# Usages:
# sh -x clickhouse-report > ch.`hostname`.`date '+%Y%M%''d%H%M%''S'`.dmp 2>&1
2019-09-23 16:18:19 +00:00
# curl https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/utils/report/clickhouse-report | sh -x > ch.`hostname`.`date '+%Y%M%''d%H%M%''S'`.dmp 2>&1
# Also dump some system info (can contain some private data) and get trace from running clickhouse-server process
# sh -x clickhouse-report system gdb > ch.`hostname`.`date '+%Y%M%''d%H%M%''S'`.dmp 2>&1
2019-09-23 16:18:19 +00:00
# curl https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/utils/report/clickhouse-report | sh -s -x system gdb > ch.`hostname`.`date '+%Y%M%''d%H%M%''S'`.dmp 2>&1
for i in "$@" ; do
case $i in
gdb)
sudo gdb -p $(pidof -s clickhouse-server) -batch -ex 'set pagination off' -ex 'thread apply all backtrace' -ex 'detach' -ex 'quit'
shift
;;
system)
uname -a
cat /etc/lsb-release
df -h
top -bn1
ps auxw
shift
;;
esac
done
2018-04-13 12:34:14 +00:00
tail -n200 /var/log/clickhouse-server/clickhouse-server.err.log
tail -n200 /var/log/clickhouse-server/clickhouse-server.log
2018-08-29 19:52:04 +00:00
tail -n100 /var/log/clickhouse-server/stderr.log
2018-04-13 12:34:14 +00:00
clickhouse-client -q 'SELECT * FROM system.events FORMAT PrettyCompactNoEscapes'
clickhouse-client -q 'SELECT * FROM system.metrics FORMAT PrettyCompactNoEscapes'
clickhouse-client -q 'SELECT * FROM system.asynchronous_metrics FORMAT PrettyCompactNoEscapes'
clickhouse-client -q 'SELECT * FROM system.build_options FORMAT PrettyCompactNoEscapes'
clickhouse-client -q 'SELECT * FROM system.processes FORMAT PrettyCompactNoEscapes'
clickhouse-client -q 'SELECT * FROM system.merges FORMAT PrettyCompactNoEscapes'
clickhouse-client -q 'SELECT * FROM system.parts FORMAT PrettyCompactNoEscapes'
clickhouse-client -q 'SELECT * FROM system.replication_queue FORMAT PrettyCompactNoEscapes'
clickhouse-client -q 'SELECT * FROM system.replicas FORMAT PrettyCompactNoEscapes'
clickhouse-client -q 'SELECT * FROM system.dictionaries FORMAT PrettyCompactNoEscapes'