Skip to content
Smarter by Design.Simpler for Business

Standard Log Format (L7 TCP) ​

About the Format ​

Standard Log Format is the basic log format that contains the TCP connection information and the timing metrics for the L7 TCP vServices. It takes place in the Line Format list in the profile form with the Standard Log Format option.

Unlike the HTTP formats, the TCP format provides information at the connection level instead of the request/response content: the connection times, the data transfer amounts, the connection termination states and the Backend Service information. The TLS information is not present in this format; CEF or TR7 JSON is used for the cipher and the protocol.

Use cases

  • TCP proxy access logging.
  • Connection performance analysis.
  • Backend Service monitoring.
  • Troubleshooting and debugging.

Warning

The Standard, Apache Combined and Apache VHost formats produce the same output for TCP.

Supported Features ​

HTTP vService
L7 TCP vService
WAF Information
SSL Information

Example Log ​

text
172.16.101.42:49602 [09/Sep/2026:20:48:51.888] DFE DBE/lbBackends-mrdk4wpm 1/1/6398 4819 cD 1/1/0/0/0 0/0 172.16.102.168:80

Field Descriptions ​

Connection Information ​

FieldExampleDescription
Client IP172.16.101.42The client IP address
Client Port49602The client source port
Timestamp09/Sep/2026:20:48:51.888The connection time (with millisecond precision, the local time of the device)

Proxy Information ​

FieldExampleDescription
FrontendDFEThe Frontend identifier
BackendDBEThe Backend identifier
ServerlbBackends-mrdk4wpmThe Backend Service ID information

Timing Metrics ​

FieldExampleUnitDescription
Wait Time1msThe waiting time in the queue
Connect Time1msThe time to connect to the Backend Service
Total Time6398msThe total time from the acceptance of the session to its closing

Wait Time and Connect Time are written as -1 when the connection is cut without ever reaching the related phase. This value must be filtered out in the commands that make a duration comparison.

Data Transfer ​

FieldExampleDescription
Bytes4819The amount of bytes transferred from the Backend Service to the client. The data uploaded from the client is not included in this number; that information is not present at all in this format.

Connection Termination ​

FieldExampleDescription
Termination StatecDThe connection termination state

The value cD in the example line is read as follows: in the data transfer phase the client remained silent during the client timeout period, and therefore the connection was terminated by TR7. The total time, 6398 ms, is the time from the acceptance of the session to its closing; it is not the timeout value itself. The list of the codes is below.

Connection Counters ​

FieldExampleDescription
Active Connections1The number of simultaneous connections across the process (it does not belong only to this vService)
Frontend Connections1The number of Frontend connections
Backend Connections0The number of Backend connections
Server Connections0The number of Backend Service connections
Retries0The number of retries

Queue Information ​

FieldExampleDescription
Server Queue0The Backend Service queue length at the moment the session was taken out of the queue
Backend Queue0The backend queue length at the moment the session was taken out of the queue

Backend Service Address ​

FieldExampleDescription
Server IP172.16.102.168The Backend Service IP address
Server Port80The Backend Service port

Termination State (%ts) ​

The termination state is a 2-character code that shows how the connection ended.

The First Character: The Reason for the Termination ​

CodeMeaning
CThe client cut the connection
SThe server cut or rejected the connection
PTR7 terminated it (a rule, a limit or a protection)
LTR7 produced a local response
RResource exhaustion
IAn internal error
cA timeout on the client side
sA timeout on the server side
DThe session was terminated because the server passed to the DOWN state
UThe session was terminated because the main server became UP while the backup server was being used
KThe session was terminated by the administrator
-Normal completion

The Second Character: The Phase at the Moment of the Termination ​

CodeMeaning
QThe request was in the queue
CThe connection to the server was being made
DThe data transfer was continuing
LThe last data were being transferred to the client
-Normal completion

Common Combinations ​

ValueMeaning
--Normal completion
cDA client-side timeout in the data phase. It is a usual termination on the long-lived and idle connections.
sDA server-side timeout in the data phase
CDThe client cut the connection in the data phase
SDThe server cut the connection in the data phase
SCThe Backend Service rejected the connection: the most frequently seen connection error
sCA timeout while connecting to the Backend Service

Timing Diagram ​

text
Client ──────────┬─────────────────────────────────────────┬────── Server
                 │                                         │
                 │◄── Tw ──►│◄── Tc ──►│                   │
                 │  Queue   │ Connect  │                   │
                 │          │          │                   │
                 │◄──────────────── Tt ───────────────────►│
                 │            Total Time                   │
DurationStartEnd
TwThe session was taken into the queueA connection slot was opened on the Backend Service
TcThe connection attempt startedThe TCP handshake was completed
TtThe connection was acceptedBoth ends closed

Example Analysis Scenarios ​

Finding the Slow Connections ​

The examples assume a raw log line

The commands below assume that the file consists of the raw log lines. If local (default), rfc3164, rfc5424 or priority is selected as the Log Standard in the log profile, a syslog prefix is added to the beginning of every line; the field indexes shift and the JSON lines cannot be parsed. In this case, either the collector must strip the prefix or raw must be selected in the profile.

In the raw line the timing triplet (Tw/Tc/Tt) is the fifth field; the total time is the last part of this triplet.

bash
# The connections longer than 10 seconds
awk '{split($5, t, "/"); if (t[3] > 10000) print}' tcp.log

Backend Error Rate ​

bash
# Count the Backend Service connection errors (rejection + connection timeout)
awk '$7 ~ /^(SC|sC)$/' tcp.log | wc -l

The IPs That Make the Most Connections ​

bash
awk '{split($1, a, ":"); print a[1]}' tcp.log | sort | uniq -c | sort -rn | head -10