Created
September 28, 2017 17:57
-
-
Save aranair/9d0ddc9d0bfa34b176b60649511662c1 to your computer and use it in GitHub Desktop.
strace s3 uploader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while true; do | |
YEAR=`date +%Y` | |
MONTH=`date +%m` | |
DAY=`date +%d` | |
HOUR=`date +%H` | |
MINUTE=`date +%M` | |
ARR=$(pidof "Passenger NodeApp: /srv/factory" | tr " " "\n") | |
STR="" | |
for VAR in $ARR | |
do | |
STR="${STR} -p ${VAR}" | |
done | |
$(timeout -sHUP 1m strace ${STR} -o strace.log) | |
aws s3 cp strace.log s3://homan-test-bucket/logs/ge/${YEAR}/${MONTH}/${DAY}/${HOUR}/strace_${MINUTE}.log | |
rm strace.log | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment