This file contains hidden or 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
$ ./sample.sh a b c | |
2015-12-22T11:30:26 local-host init | |
2015-12-22T11:30:27 local-host a | |
2015-12-22T11:30:28 local-host b | |
2015-12-22T11:30:29 local-host c |
This file contains hidden or 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 fuser -a smtp*.log 2>&1 | sed -n -e 's/^\(smtp.*.log\): *$/\1/p' | xargs -i gzip {} | |
do LANG=C date | |
for f in $(ls *\.log);do echo ${f%-*} ; done | for f in $(cat /dev/stdin); do echo ${f%-*}; done | uniq | for prefix in $(cat /dev/stdin); do ls -t ${prefix}*\.log | tail -n+3 ;done | xargs -i gzip {} | |
sleep 600 | |
done |
This file contains hidden or 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
cat messages-20150913 messages | grep segfault | grep kavehost > list_segfault_kavehost | |
cat messages-20150913 messages | grep segfault | grep -v kavehost > list_segfault_other | |
zcat smtp-2015091{0..5}-{0..23}.log.gz | grep -i -e "reported error 80040004" -e "AVMsgVerdictFailed" > list_err80040004_AVMsgVerdictFail | |
grep 80040004 list_err80040004_AVMsgVerdictFail > list_err80040004 | |
for tid in $(cat aminamid/list_err80040004 | grep 80040004 | sed -e 's/^\(........\) 0*\([^ :]\{1,2\}\)[^ ]* \([^ ]*\) .*$/\1_\2_\3/'); do echo ${tid}; done | awk -F'_' '{print "zgrep "$3" smtp-"$1"-"$2".log.gz | grep Subj" }' > l.sh | |
bash l.sh |
This file contains hidden or 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
``` | |
[google-chrome] | |
name=google-chrome | |
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64 | |
enabled=0 | |
gpgcheck=0 | |
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub | |
``` | |
``` |
This file contains hidden or 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
for x in $(ls sums) | |
do echo ${x} | |
ls sums/${x}/*imap* | grep -v ssl | xargs ./csvedit.py -l IMAP > ${x}.csv | |
ls sums/${x}/*imap* | grep ssl | xargs ./csvedit.py -l IMAPSSL >> ${x}.csv | |
ls sums/${x}/*pop* | grep ssl | xargs ./csvedit.py -l POPSSL >> ${x}.csv | |
ls sums/${x}/*pop* | grep -v ssl | xargs ./csvedit.py -l POP >> ${x}.csv | |
ls sums/${x}/*mxi* | xargs ./csvedit.py -l SMTPIN >> ${x}.csv | |
ls sums/${x}/*{ile,mxo}* | xargs ./csvedit.py -l SMTPOUT >> ${x}.csv | |
ls sums/${x}/*msa* | xargs ./csvedit.py -l SMTPOUTSSL >> ${x}.csv | |
done |
This file contains hidden or 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
while true; do while [ $? -eq 0 ] ; do sleep 60; imservping ; done ; $INTERMAIL/lib/imservctrl start ; done |
This file contains hidden or 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
for f in $(ls); | |
do sed -i -e "s/\(\(log\|stats\)File: *\[\).*\(\]\)/\1"${f}"_%03d.\2\3/" ${f} | |
sed -i -e "s#\(logDir: *\[\).*\(\]\)#\1./log/"$(basename ${PWD})"\2#" ${f} | |
done | |
for f in $(ls); do sed -i -e "s#\(num.*[rmo]\: *\[\).*\(\]\)#\1"350000"\2#" | |
${f} ; done | |
for f in $(ls); do sed -i -e "s#\(num.*[rmo][Bb]ase\: *\[\).*\(\]\)#\1"1"\2#" | |
${f} ; done |
This file contains hidden or 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
sed -e ':a;N;s/\([^s]\)\n/\1#/;t a;P;D;' | sed -e 's/\] \?#{H/ \n{H/' | sed -r 's/.*par new generation\s+total [0-9]+K, used ([0-9]+)K .*#\s+concurrent mark-sweep generation total [0-9]+K, used ([0-9]+)K .*#\s+concurrent-mark-sweep perm gen total [0-9]+K, used ([0-9]+)K .*#(....\-..\-..T..:..:..\....)\+....:.*# par new generation\s+total [0-9]+K, used ([0-9]+)K .*#\s+concurrent mark-sweep generation total [0-9]+K, used ([0-9]+)K .*#\s+concurrent-mark-sweep perm gen total [0-9]+K, used ([0-9]+)K [^}]+*#}#(....\-..\-..T..:..:..\....).*/ParNewBEGIN \4 \1 \2 \3#ParNewEND \8 \5 \6 \7/'| sed 's/#/\n/g' | grep ParNew | |
echo "event time new old parm" | |
sed -e ':a;N;s/\([^s]\)\n/\1#/;t a;P;D;' | sed -e 's/\] \?#{H/ \n{H/' | sed -r 's/^\{Heap before GC invocations=[0-9]+ \([^)]+\):#\s+par new generation\s+total [0-9]+K, used ([0-9]+)K \[[^)]+\)#\s+eden space [0-9]+K,\s+[0-9]+% used \[[^)]+\)#\s+from space [0-9]+K,\s+[0-9]+% used \[[^)]+\)#\s+to space [0-9]+K,\s+[0-9]+% used \[[^)]+\)#\s+concurrent mark-sweep genera |
This file contains hidden or 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
wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz" |
This file contains hidden or 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 -x | |
cat <(ls -d /root/mongo_dump_*|sort -u) <(join <(ls -d /root/mongo_dump_*|tail -n10|sort -u) <(ls -d /root/mongo_dump_*|sort -u)) |sort| uniq -u | xargs --no-run-if-empty rm -rf | |
/bin/bash -l -c 'mongodump --host jpn-zaq40.openwave.com --port 27017 --out ~/mongo_dump_`date "+%Y%m%d%H%M%S"` 2>&1 | logger -t mongodump -p local0.info ' |
NewerOlder