How to capture network traces on Azure App Services (Windows & Linux)

This post has been republished via RSS; it originally appeared at: IIS Support Blog articles.

How to capture network traces on Azure App Services (Windows & Linux)

 

Azure App Service Windows:

  • On App Service Page on Azure Portal, select “Diagnose and Solve Problems”:Diagnose and Solve Problems.jpg 

  • In the search box, type "Collect Network Trace" and select "Collect Network Trace"collect network trace.jpg

     

  • Choose the duration and click on Collect Network Trace button:Timer.jpg 
  • The timer started and the portal will show you the countdown before the trace will automatically stop:Timer Started.jpg

     

How to open the trace file:

A new Zip file will be created, you can download the trace file (cap file) on your machine as below screenshots:network traces.jpg

 

Azure App Service Linux:

Use the tcpdump tool to collect the network trace.

  • In most Linux systems, tcpdump tool is pre-installed. If the tool is not installed, install it with the following command:
    • yum install tcpdump
  • Determine the name of the active network adapter using any of the commands below.
    • tcpdump -D
    • ip -a
    • ifconfig
    • Collect the network packets and save them in a pcap file
  • tcpdump -w /tmp/0001.pcap -i en0
    Where:

    • /tmp is the location where we want to save the capture
    • 0001.pcap is the name of the capture file
    • en0 is the name of the active adapter derived in Step 2
  • Reproduce the issue.
  • Use Ctrl+C to stop the capture.
  • Collect the /tmp/0001.pcap and send it for analysis.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.