Created
November 7, 2019 15:28
-
-
Save Bowenislandsong/da72025a7d457bedb01c5852441d734b to your computer and use it in GitHub Desktop.
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 | |
# make a dir with time | |
dir_name="olm_$(date +"%m_%d-%T")" | |
mkdir "$dir_name" | |
for pod_name in $(oc get pods -n olm | awk 'NR>1 {print $1}') | |
do | |
oc logs --all-containers $pod_name -n olm > "$dir_name/$pod_name.txt" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment