Skip to content

Instantly share code, notes, and snippets.

@king6cong
Created December 5, 2017 08:02
Show Gist options
  • Save king6cong/8905cc95046bd71cd713ed7a01a4c8ce to your computer and use it in GitHub Desktop.
Save king6cong/8905cc95046bd71cd713ed7a01a4c8ce to your computer and use it in GitHub Desktop.
#!/bin/sh
set -u
LOG_DIR=/tmp/lark_log
mkdir -p $LOG_DIR
log_path=`ps aux|grep crash|grep -i lark|grep -v grep|sed "s/.*metrics-dir=\([^-]*\).*/\1/"`
log_path="$(sed -e 's/[[:space:]]*$//' <<<${log_path})"
echo '>>> log path:' $log_path
cd "$log_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