Created
April 24, 2018 09:58
-
-
Save MyounghoonKim/a9683c6eedcb8af9c763d65ba32d07cc to your computer and use it in GitHub Desktop.
monitor emr hadoop steps log
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 | |
target="/var/log/hadoop/steps" | |
while true | |
do | |
touch $target/lastwatch | |
sleep 1 | |
find -cnewer $target/lastwatch -exec tail -1 {} \; | |
done | |
# based on https://unix.stackexchange.com/questions/24952/script-to-monitor-folder-for-new-files/249238#249238 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment