Skip to content

Instantly share code, notes, and snippets.

@king6cong
Last active December 5, 2017 08:22
Show Gist options
  • Save king6cong/503ccdf2f119f18be8e77f8242e66809 to your computer and use it in GitHub Desktop.
Save king6cong/503ccdf2f119f18be8e77f8242e66809 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