Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that the output of esxtop, the most important debugging tool on ESXi host, is full of garbled codes?

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

In this issue, the editor will bring you about how to solve the problem of the output of esxtop, the most important debugging tool on the ESXi host. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.

In VMware vSphere 6. 7, after allowing SSH to log in to the ESXi host, I tried to run esxtop. I didn't see a result similar to Linux top, but saw a full screen of garbled codes. As follows:

No termcap entry for a `xterm-256color' terminal "(PDH-CSV 4) (UTC) (0)", "\\ 172.localdomain\ Memory\ Memory Overcommit (1 Minute Avg)", "\\ 172.localdomain\ Memory\ Memory Overcommit (5 Minute Avg)", "\\ 172.localdomain\ Memory\ Memory Overcommit (15 Minute Avg)", "\ 172.localdomain\ Physical Cpu Load\ Cpu Load (1 Minute Avg)", "\ 172.localdomain\ Physical Cpu Load\ Cpu Load (5 Minute Avg)" "\\ 172.localdomain\ Physical Cpu Load\ Cpu Load (15 Minute Avg)", "\ 172.localdomain\ Physical Cpu (0)\% Processor Time", "\\ 172.localdomain\ Physical Cpu (1)\% Processor Time", "\\ 172.localdomain\ Physical Cpu (_ Total)\% Processor Time", "\\ 172.localdomain\ Physical Cpu (0)\% Util Time", "\ 172.localdomain\ Physical Cpu (1)\% Util Time", "\ 172.localdomain\ Physical Cpu (_ Total)\% Util Time" "\\ 172.localdomain\ Memory\ Machine MBytes", "\\ 172.localdomain\ Memory\ Kernel MBytes", "\\ 172.localdomain\ Memory\ NonKernel MBytes", "\\ 172.localdomain\ Memory\ Free MBytes", "\\ 172.localdomain\ Memory\ Kernel Managed MBytes", "\\ 172.localdomain\ Memory\ Kernel MinFree MBytes", "\ 172.localdomain\ Memory\ Kernel Reserved MBytes", "\ 172.localdomain\ Memory\ Kernel Unreserved MBytes", "\\ 172.localdomain\ Memory\ Kernel State" "\\ 172.localdomain\ Memory\ PShare Shared MBytes", "\\ 172.localdomain\ Memory\ PShare Common MBytes", "\\ 172.localdomain\ Memory\ PShare Savings MBytes", "\\ 172.localdomain\ Memory\ Swap Used MBytes", "\\ 172.localdomain\ Memory\ Swap Target MBytes", "\\ 172.localdomain\ Memory\ Swap MBytes Read/sec", "\ 172.localdomain\ Memory\ Swap MBytes Write/sec", "\ 172.localdomain\ Memory\ Total Compressed MBytes", "\\ 172.localdomain\ Memory\ Total Saved By Compression MBytes" "\\ 172.localdomain\ Memory\ Memctl Current MBytes", "\\ 172.localdomain\ Memory\ Memctl Target MBytes", "\\ 172.localdomain\ Memory\ Memctl Max MBytes", "\\ 172.localdomain\ Power\ Power Usage Now Watts", "\\ 172.localdomain\ Power\ Power Usage Cap Watts", "\\ 172.localdomain\ VSAN\ Enabled?", "\ 172.localdomain\ Group Cpu (1:system)\ Members", "\ 172.localdomain\ Group Cpu (1:system)\% Used" "\\ 172.localdomain\ Group Cpu (1:system)\% Run", "\\ 172.localdomain\ Group Cpu (1:system)\% System", "\\ 172.localdomain\ Group Cpu (1:system)\% Wait", "\ 172.localdomain\ Group Cpu (1:system)\% Ready", "\ 172.localdomain\ Group Cpu (1:system)\% Idle", "\ 172.localdomain\ Group Cpu (1:system)\% Overlap" "\\ 172.localdomain\ Group Cpu (1:system)\% CoStop", "\\ 172.localdomain\ Group Cpu (1:system)\% Max Limited", "\\ 172.localdomain\ Group Cpu (1:system)\% Swap Wait", "\ 172.localdomain\ Vcpu (1:system:2097153:idle1)\% Used", "\ 172.localdomain\ Vcpu (1:system:2097153:idle1)\% Run", "\ 172.localdomain\ Vcpu (1:system:2097153:idle1)\% System" "\\ 172.localdomain\ Vcpu (1:system:2097153:idle1)\% Wait", "\ 172.localdomain\ Vcpu (1:system:2097153:idle1)\% VmWait", "\\ 172.localdomain\ Vcpu (1:system:2097153:idle1)\% Ready", "\ 172.localdomain\ Vcpu (1:system:2097153:idle1)\% Idle"

Originally, vSphere had to rely on it to view system information, but esxtop was in a mess. What should I do? Search the Internet and find that some people have experienced the same experience. There is a solution on VMware's official website as follows:

Step 1 check the setting of the terminal variable [root@172:~] echo $TERMxterm-256color

The no termcap entry for a `xterm-256color' terminal in line 1 tells us that for a control terminal like xterm-256color, it is not found in the local database, so the correct format cannot be displayed. Since you don't support it, find a terminal that can support it.

Step 2 find the format supported by the ESXi host [root@172:~] find / usr/share/terminfo/-type f/usr/share/terminfo/v/vt102/usr/share/terminfo/x/xterm/usr/share/terminfo/s/screen/usr/share/terminfo/l/linux/usr/share/terminfo/a/ansi

See, there are 5 control terminals in terminfo data that can be supported by the ESXi host. Choose any one to try.

Step 3: set the terminal format # TERM=XTERM esxtop

Set to the second kind of xterm. It's almost done! The other ones are fine, too. The problem is solved for the time being. What if the next login cannot be displayed?

Then add the TERM variable to / etc/bashrc. No, there is no such file. / etc/profile is available, but it is read-only, and root does not have permission to modify it. However, there is a / etc/profile.local whose permission is 164. Root is a user and can be modified. When I opened it, there was a sentence that said:

This file is not used when UEFI secure boot is enabled.

It means that if you start safely with UEFI, this file will be invalidated. No matter how much it is, modify it and add two sentences to it:

TERM=xterm

Export $TERM

Then, quote this file again.

# source / etc/profile.local

Test it. Set TERM to something else first.

# TERM=test# source / etc/profile.local# echo $TERM

Xterm is displayed. Will you read this file the next time vSphere restarts? I haven't tried it yet.

The above is how to solve the problem of garbled output of esxtop, the most important debugging tool on ESXi host, which is shared by Xiaobian. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report