Loading

×Sorry to interrupt
This page has an error. You might just need to refresh it.
[NoErrorObjectAvailable] Uncaught ReferenceError: addCTracking is not defined
Failing descriptor: {markup://c:KM_ArticleThemeLayout}

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

Collecting network packets using the lightweight PacketCapture (52843)

Last Updated: 10/11/2023Categories: How toTotal Views: 12580Language:
English

2 like this article

Subscribe to get an email
newsletter with new updates

2 people found this helpful Please provide article feedback:

Purpose

This article describes the PacketCapture tool and steps to efficiently collect network packets. This tool is available starting from vSphere 6.5 U2 and above versions.

Impact / Risks

PacketCapture collects and evaluate big amount of data which may consume a high CPU and disk usage.

Resolution

SSH to the VMware ESXi or vCenter Server Appliance virtual machine.

Enable PacketCapture in the rhttpproxy config.xml file.

Here is the default installation path of the rhttpproxy configuration file:

On vCSA: /etc/vmware-rhttpproxy/config.xml
On ESXi : /etc/vmware/rhttpproxy/config.xml

Note: Since ESXi 8.0U1 the service configuration is stored in a special config store database and is accessible using configstorecli tool. To edit the configuration, refer to: KB 89489

The possible PacketCapture configuration options and their description:
<config>
<packetCapture>
<enabled>true</enabled>
<!-- On startup delete all pcap and pcap.gz files that were last modified more than X hours ago and are not part of the current process. -->
<!-- The default value is 72 hours -->
<validity>72</validity>

<!-- Controls where rolling pcap files are stored -->
<!-- The directory must exist and should be accessible -->
<directory>/tmp</directory>

<!-- Size(in bytes) of captured data of each pcap file before rolling over to the next. -->
<!-- Storing 50 MB of captured data in a pcap file requires a pcap file of about ~67.5 MB. -->
<!-- The minimum amount is 5MB on vCSA and 2.5MB on ESXi -->
<maxDataInPcapFile>52428800</maxDataInPcapFile>

<!-- Number of pcap files to rotate amongst -->
<!-- The minimum number is 2 -->
<maxPcapFilesCount>5</maxPcapFilesCount>
</packetCapture>

</config>

Execute the following command to tell the rhttpproxy service to reload its config file:

# kill -SIGHUP `pidof rhttpproxy`

You should now see a new .pcap file in the folder /tmp (or if you configured a different destination folder in step 2, in this one. If there is no .pcap file, restart the rhttpproxy service by running:

On vCSA:

# vmon-cli -r rhttpproxy

On ESXi:
# /etc/init.d/rhttpproxy restart

When the traffic is sniffed during the network problem, disable the PacketCapture.

To disable the PacketCapture,

Change the rhttpproxy config.xml file.

<config>
<packetCapture>
<enabled>false</enabled>

Reload the configuration file, by using the command mentioned in Step 3.

6. Collect the support bundle.

Collect the created pcap and pcap.gz files in case they were not produced in the default directory.
By default they are produced in:

On ESXi: /var/run/log
On vCSA: /var/log/vmware/rhttpproxy

Note: Interfaces on which rhttpproxy captures packets are configurable through the xml array definition 'config/packetCapture/interface'. It could overwrite each of the PacketCapture's options configured in the rhttpproxy config.xml file.

By default:

On vCSA rhttpproxy captures traffic on the any interface.

On ESXi rhttpproxy captures traffic on both the 'vmk0' and 'lo0' interfaces.

7.Copy the pcap and pcap.gz files to a system that runs a network analyzer tool, such as Wireshark                   and examine the packet details.

Note: Before analyzing the ESXi packet details, fix frame size meta data as ESXi packets are truncated by design. To fix frame size, use a third party tool such as TraceWrangler.

Open the pcap files using the tool.

Edit files by selecting "Fix frame size meta data" and "Also recalculate wire size when not hard sliced" under Packet list option.

Click on Run to save the new files.

Analyze the network using the newly generated pcap files.

Disclaimer: VMware is not responsible for the reliability of any data, opinions, advice, or statements made on third-party websites. Inclusion of such links does not imply that VMware endorses, recommends, or accepts any responsibility for the content of such sites.

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

Result 1 of 1

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere ESXi

VMware vCenter Server Appliance

VMware ESXi

Related Versions:

Take Our Survey

Support Assistant