mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 12:32:12 +00:00
tweaking
This commit is contained in:
parent
0f2f5ff1db
commit
0aa7865e42
1 changed files with 22 additions and 7 deletions
|
@ -1,4 +1,6 @@
|
||||||
#/bin/bash
|
#/bin/bash
|
||||||
|
stty -echo -icanon time 0 min 0
|
||||||
|
myIMAGES=$(cat /data/images.conf)
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
clear
|
clear
|
||||||
|
@ -7,11 +9,24 @@ while true
|
||||||
echo Uptime:" "$(uptime)
|
echo Uptime:" "$(uptime)
|
||||||
echo CPU temp: $(sensors | grep "Physical" | awk '{ print $4 }')
|
echo CPU temp: $(sensors | grep "Physical" | awk '{ print $4 }')
|
||||||
echo
|
echo
|
||||||
/usr/bin/docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" -f status=running -f status=exited | GREP_COLORS='mt=01;35' /bin/egrep --color=always "(^[_a-z-]+ |$)|$" | GREP_COLORS='mt=01;32' /bin/egrep --color=always "(Up[ 0-9a-Z ]+ |$)|$" | GREP_COLORS='mt=01;31' /bin/egrep --color=always "(Exited[ \(0-9\) ]+ [0-9a-Z ]+ ago|$)|$"
|
echo "NAME CREATED PORTS"
|
||||||
if [ "$1" = "" ];
|
for i in $myIMAGES; do
|
||||||
then
|
/usr/bin/docker ps -f name=$i --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" -f status=running -f status=exited | GREP_COLORS='mt=01;35' /bin/egrep --color=always "(^[_a-z-]+ |$)|$" | GREP_COLORS='mt=01;32' /bin/egrep --color=always "(Up[ 0-9a-Z ]+ |$)|$" | GREP_COLORS='mt=01;31' /bin/egrep --color=always "(Exited[ \(0-9\) ]+ [0-9a-Z ]+ ago|$)|$" | tail -n 1
|
||||||
break;
|
if [ "$1" = "vv" ];
|
||||||
else
|
then
|
||||||
sleep $1
|
/usr/bin/docker exec -t $i /bin/ps -awfuwfxwf | egrep -v -E "awfuwfxwf|/bin/ps"
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
if [[ $1 =~ ^([1-9]|[1-9][0-9]|[1-9][0-9][0-9])$ ]];
|
||||||
|
then
|
||||||
|
sleep $1
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
read myKEY
|
||||||
|
if [ "$myKEY" == "q" ];
|
||||||
|
then
|
||||||
|
break;
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
stty sane
|
||||||
|
|
Loading…
Reference in a new issue