Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change log parsing from .log* to _*.log #30

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions recaptool
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ procs_mem() {
PROCESS="$1"
TMP=`mktemp`
>$TMP
for i in `ls $RECAPPATH/ps.log*`; do
for i in `ls $RECAPPATH/ps_*.log*`; do
head -n 1 $i | tr "\n" "\t" >> $TMP
egrep "$PROCESS" $i -c | tr "\n" "\t" >> $TMP
egrep "$PROCESS" $i | awk '{ SUM += $6 } END {print SUM/1024, "M"};' >> $TMP
Expand All @@ -21,7 +21,7 @@ procs() {
PROCESS="$1"
TMP=`mktemp`
>$TMP
for i in `ls $RECAPPATH/ps.log*`; do
for i in `ls $RECAPPATH/ps_*.log*`; do
head -n 1 $i | tr "\n" "\t" >> $TMP
egrep "$PROCESS" $i -c >> $TMP
done
Expand All @@ -33,7 +33,7 @@ mem() {
PROCESS="$1"
TMP=`mktemp`
>$TMP
for i in `ls $RECAPPATH/ps.log*`; do
for i in `ls $RECAPPATH/ps_*.log*`; do
head -n 1 $i | tr "\n" "\t" >> $TMP
egrep "$PROCESS" $i | awk '{ SUM += $6 } END {print SUM/1024, "M"};' >> $TMP
done
Expand All @@ -46,7 +46,7 @@ net() {
PORT="$1"
TMP=`mktemp`
>$TMP
for i in `ls $RECAPPATH/netstat.log*`; do
for i in `ls $RECAPPATH/netstat_*.log*`; do
head -n 1 $i | tr "\n" "\t" >> $TMP
egrep ":$PORT " $i -c >> $TMP
done
Expand All @@ -58,7 +58,7 @@ netestab() {
PORT="$1"
TMP=`mktemp`
>$TMP
for i in `ls $RECAPPATH/netstat.log*`; do
for i in `ls $RECAPPATH/netstat_*.log*`; do
head -n 1 $i | tr "\n" "\t" >> $TMP
egrep ":$PORT .*ESTAB" $i -c >> $TMP
done
Expand All @@ -69,7 +69,7 @@ netestab() {
querycount() {
TMP=`mktemp`
>$TMP
for i in `ls $RECAPPATH/mysql.log*`; do
for i in `ls $RECAPPATH/mysql_*.log*`; do
head -n 1 $i | tr "\n" "\t" >> $TMP
grep "Query" -c $i >> $TMP
done
Expand Down