Skip to content

Commit

Permalink
v2.2.3
Browse files Browse the repository at this point in the history
FIXED: Processes using >100% VSZ in top would not be shown correctly in WebUI
  • Loading branch information
jackyaz authored Apr 6, 2021
2 parents 5c6a2e3 + a884846 commit 1bc72b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/bfd397624cdf4803a465d4ae1530e7fe)](https://www.codacy.com/app/jackyaz/scMerlin?utm_source=github.com&utm_medium=referral&utm_content=jackyaz/scMerlin&utm_campaign=Badge_Grade)
[![Build Status](https://travis-ci.com/jackyaz/scMerlin.svg?branch=master)](https://travis-ci.com/jackyaz/scMerlin)

## v2.2.2
### Updated on 2021-04-05
## v2.2.3
### Updated on 2021-04-06
## About
scMerlin allows you to easily control the most common services/scripts on your router.

Expand Down
4 changes: 2 additions & 2 deletions scmerlin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
### Start of script variables ###
readonly SCRIPT_NAME="scMerlin"
readonly SCRIPT_NAME_LOWER=$(echo $SCRIPT_NAME | tr 'A-Z' 'a-z' | sed 's/d//')
readonly SCM_VERSION="v2.2.2"
readonly SCRIPT_VERSION="v2.2.2"
readonly SCM_VERSION="v2.2.3"
readonly SCRIPT_VERSION="v2.2.3"
SCRIPT_BRANCH="master"
SCRIPT_REPO="https://raw.githubusercontent.com/jackyaz/$SCRIPT_NAME/$SCRIPT_BRANCH"
readonly SCRIPT_DIR="/jffs/addons/$SCRIPT_NAME_LOWER.d"
Expand Down
10 changes: 8 additions & 2 deletions tailtop
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ trap '' SIGHUP

while true; do
top -b -n 1 | tail -n +5 | head -n -1 | sed 's/S </S</g' | \
awk -F" " -v OFS=',' '{printf "%s,%s,%s,%s,%s,%s,%s,%s,", $1,$2,$3,$4,$5,$6,$7,$8;for(i=9; i<=NF; ++i) printf "%s ", $i; print ""}' | \
sed 's/S</S </g' > /tmp/scmerlin-top
awk -F" " -v OFS=',' '{if ($5 ~ /m[^\s\\]/){
printf "%s,%s,%s,%s,%s,%s,%s,", $1,$2,$3,$4,gensub(/m([^\s\\])/,"m,\\1","g",$5),$6,$7;for(i=8; i<=NF; ++i) printf "%s ", $i; print ""
}
else{
printf "%s,%s,%s,%s,%s,%s,%s,%s,", $1,$2,$3,$4,$5,$6,$7,$8;for(i=9; i<=NF; ++i) printf "%s ", $i; print ""
}
}' | \
sed 's/,$//g;s/S</S </g' > /tmp/scmerlin-top
sleep 3
done

0 comments on commit 1bc72b2

Please sign in to comment.