Commit be32d82 1 parent 39fcbfc commit be32d82 Copy full SHA for be32d82
File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ INTERVAL=3
7
7
trap ' stty echo; exit' INT EXIT
8
8
9
9
print_header () {
10
- echo " +----------------------------------------------------+--------------+----------+----------- +----------------+"
11
- printf " | %-50s | %-12s | %-8s | %-8s | %-15s |\n" " NAME" " CONTAINER ID" " CPU %" " Memory %" " Memory Usage"
12
- echo " +----------------------------------------------------+--------------+----------+----------- +----------------+"
10
+ echo " +----------------------------------------------------+--------------+----------+----------+----------------+"
11
+ printf " | %-50s | %-12s | %-8s | %-8s | %-14s |\n" " NAME" " CONTAINER ID" " CPU %" " Memory %" " Memory Usage"
12
+ echo " +----------------------------------------------------+--------------+----------+----------+----------------+"
13
13
}
14
14
15
15
print_container_info () {
@@ -18,7 +18,7 @@ print_container_info() {
18
18
local container_id=${container_info[1]}
19
19
local container_stats=(${container_info[@]: 2} )
20
20
21
- printf " | %-50s | %-12s | %-8s | %-8s | %-15s |\n" " $container_name " " $container_id " " ${container_stats[0]} " " ${container_stats[1]} " " ${container_stats[2]} "
21
+ printf " | %-50s | %-12s | %-8s | %-8s | %-14s |\n" " $container_name " " $container_id " " ${container_stats[0]} " " ${container_stats[1]} " " ${container_stats[2]} "
22
22
}
23
23
24
24
while true ; do
@@ -33,7 +33,7 @@ while true; do
33
33
print_container_info " $( echo " $line " | awk ' {gsub(/\//, " "); print}' ) "
34
34
done <<< " $DOCKER_STATS"
35
35
36
- echo " +----------------------------------------------------+--------------+----------- +----------+----------------+"
36
+ echo " +----------------------------------------------------+--------------+----------+----------+----------------+"
37
37
else
38
38
echo " No active containers found"
39
39
break
You can’t perform that action at this time.
0 commit comments