LearnLinuxPerf

Comment identifier des problèmes de perfs:

Ressources

tcpdump

Description: Capture the network traffic and print it.

Resources:

TCP Handshake flags:

TCP Flagtcpdump FlagDescription
SYNSSyn packet, a session establishment request.
ACKAAck packet, acknowledge sender’s data.
FINFFinish flag, indication of termination.
RESETRReset, indication of immediate abort of conn.
PUSHPPush, immediate push of data from sender.
URGENTUUrgent, takes precedence over other data.
NONE.Placeholder, usually used for ACK.
Usage examples:
# See the DNS traffic
tcpdump -n - i any port 53

# Show all DNS traffic with 8.8.8.8
tcpdump -n - i any port 53 and host 8.8.8.8

# Show all DNS queries that fail
tcpdump udp[11]&0xf==3

# Stocker dans un fichier pcap
tcpdump -w traff.pcap

# Remove IP reverse resolution and port mapping conversion
tcpdump -n
tcpdump -nn

# Select an interface
tcpdump -i any
tcpdump -i eth0

# Show header dump
tcpdump -

Notes:

  • ICMP negotiation:
    1. Client: ICMP echo request
    2. Server: ICMP echo reply
  • TCP negociation - Opening:
    1. Client: Flags [S] (Syn)
    2. Server: Flags [S.] (Syn+Ack)
    3. Client: Flags [.] (Ack)
  • TCP negociation - Closing:
    1. Client: Flags[F.]
Protocol negotiation:
#ICMP: ping 8.8.8.8
# ========================
15:54:52.444247 IP 192.168.51.25 > 8.8.8.8: ICMP echo request, id 4394, seq 3, length 64
15:54:52.454061 IP 8.8.8.8 > 192.168.51.25: ICMP echo reply, id 4394, seq 3, length 64

# TCP: nc  linuxfr.org 80
# ========================
# Opening
15:57:21.832682 IP 192.168.51.25.44296 > 88.191.250.176.80: Flags [S], seq 2791330131, win 29200, options [mss 1460,sackOK,TS val 196127132 ecr 0,nop,wscale 7], length 0
15:57:22.036087 IP 88.191.250.176.80 > 192.168.51.25.44296: Flags [S.], seq 3304182190, ack 2791330132, win 28960, options [mss 1460,sackOK,TS val 437617140 ecr 196127132,nop,wscale 7], length 0
15:57:22.036157 IP 192.168.51.25.44296 > 88.191.250.176.80: Flags [.], ack 1, win 229, options [nop,nop,TS val 196127193 ecr 437617140], length 0

# Closing
15:58:09.006532 IP 192.168.51.25.44302 > 88.191.250.176.80: Flags [F.], seq 4, ack 1, win 229, options [nop,nop,TS val 3015205941 ecr 437628064], length 0
15:58:09.215673 IP 88.191.250.176.80 > 192.168.51.25.44302: Flags [F.], seq 1, ack 5, win 227, options [nop,nop,TS val 437628933 ecr 3015205941], length 0
15:58:09.215736 IP 192.168.51.25.44302 > 88.191.250.176.80: Flags [.], ack 2, win 229, options [nop,nop,TS val 3015206004 ecr 437628933], length 0



Problemes IOs

Problemes de CPU

http://blog.scoutapp.com/articles/2013/07/25/understanding-cpu-steal-time-when-should-you-be-worried

Page last modified on May 20, 2017, at 12:14 AM EST