Docker中「TERM environment variable not set.」問題

 

 

 

在使用top查容器內部資源利用狀況時候,發現沒法使用,報「TERM environment variable not set.」錯誤。從網上找到了解決方案,經實驗有效mysql

root@103b5f054624:/# topTERM environment variable not set.root@103b5f054624:/# echo $TERM
dumb
root@103b5f054624:/# export TERM=dumb
root@103b5f054624:/# top
top - 08:00:41 up 20 days,  4:52,  0 users,  load average: 0.02, 0.02, 0.00
Tasks:   5 total,   1 running,   4 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.1 us,  0.3 sy,  0.0 ni, 99.6 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :   997592 total,   104704 free,   334732 used,   558156 buff/cache
KiB Swap:        0 total,        0 free,        0 used.   514408 avail Mem 

   PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND                                                                                                                                                                                                  
     1 mysql     20   0 1122092 199356  17532 S  0.0 20.0   0:10.21 mysqld                                                                                                                                                                                                   
   153 root      20   0   18168   3128   2692 S  0.0  0.3   0:00.01 bash                                                                                                                                                                                                     
   160 root      20   0   32880   4728   3988 S  0.0  0.5   0:00.00 mysql                                                                                                                                                                                                    
   165 root      20   0   18172   3284   2768 S  0.0  0.3   0:00.04 bash                                                                                                                                                                                                     
   479 root      20   0   43164   3204   2692 R  0.0  0.3   0:00.00 top                      
相關文章
相關標籤/搜索