Hi Olivier, On Wed, Sep 03, 2014 at 02:50:44PM +0200, Olivier wrote: > Hello, > > Debugging an unusual problem of session saturation, I played this morning > with "show sess" on stats socket with HAProxy 1.5.2 > > > I was unable to find a proper documentation of all fields returned by this > command.
That's intentional, and I'll reject any patch to document it. It's a debugging feature whose format changes between versions or for any reason we see fit when facing a new problem. This can only be used with the code at hand. > This is : > > 0x43fc290: proto=tcpv4 src=80.12.63.XXX:49389 fe=webXXX:80 be=webXXX:80 > srv=<none> ts=08 age=19d18h calls=7 > rq[f=000000h,i=8192,an=200h,rx=,wx=,ax=] > rp[f=000000h,i=0,an=00h,rx=,wx=,ax=] s0=[7,ch,fd=581,ex=] > s1=[0,0h,fd=-1,ex=] exp= > > > The real issue I am investigating here is the "age" field. Here it is 19 > days, should I understand that the connection was open 19 days ago ? Yes absolutely. > Maybe I'm missing something, but my HAProxy process was launched a few > minutes ago (yet handling over an old process with -sf), so I was expecting > new connections on this process. Maybe I misunderstood haproxy reloading > behaviour over TCP connections. Please send a "show info" there, it is possible that for any reason you're connected to the old process (eg: if you got this from an automated tool which stays connected to this socket). I'm not seeing any reason for a session's age to be wrong otherwise. > So any doc on all those fields will be very useful (and add it to the doc > for other users too). It would be great to have the same for "show sess > 0x37896b0" verbose output too. Really no, for the reasons above. In general if you need to see what exactly the fields correspond to, you'll find them in src/dumpstats.c, it's not that hard to read, and you'll understand the exact conditions where a value may be emitted for example. It already happened to me to get trapped believing something without reading the code (because I thought I knew), so you absolutely need to check it. The only usage which does not really need the code is to count sessions, or to find one by source in order to kill it. Regards, Willy

