Skip to content

Instantly share code, notes, and snippets.

@king6cong
Created December 5, 2017 08:17
Show Gist options
  • Save king6cong/bbeced1580c9e4342728773aa33280b5 to your computer and use it in GitHub Desktop.
Save king6cong/bbeced1580c9e4342728773aa33280b5 to your computer and use it in GitHub Desktop.
#!/bin/sh
set -u
LOG_DIR=/tmp/lark_log
mkdir -p $LOG_DIR
dump_path=`ps aux|grep crash|grep -i lark|grep -v grep|sed "s/.*metrics-dir=\([^-]*\).*/\1/"`
dump_path="$(sed -e 's/[[:space:]]*$//' <<<${dump_path})"
echo '>>> dump path:' $dump_path
cd "$dump_path"
zip $LOG_DIR/dump.zip *
open $LOG_DIR
echo '>>> completed. Please upload dump.zip for inspection'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment