Stats are reset to 0 after haproxy reload

@lukastribus

I upgraded to haproxy 2.6.6-1, it looks good

# echo 'show proc' | socat -  /run/haproxy-master.sock
#<PID>          <type>          <reloads>       <uptime>        <version>      
1590727         master          1 [failed: 0]   0d00h08m11s     2.6.6-1~bpo11+1
# workers
1590983         worker          0               0d00h06m29s     2.6.6-1~bpo11+1
# programs


# echo '@!1590983 show stat' | socat -  /run/haproxy-master.sock | grep ^10_0_55_192-22,10_0_55_192-22 | cut -d "," -f5
2


# echo 'reload' | socat -  /run/haproxy-master.sock

# echo 'show proc' | socat -  /run/haproxy-master.sock
#<PID>          <type>          <reloads>       <uptime>        <version>      
1590727         master          2 [failed: 0]   0d00h08m28s     2.6.6-1~bpo11+1
# workers
1592078         worker          0               0d00h00m03s     2.6.6-1~bpo11+1
# old workers
1590983         worker          1               0d00h06m46s     2.6.6-1~bpo11+1
# programs


# echo '@!1590983 show stat' | socat -  /run/haproxy-master.sock | grep ^10_0_55_192-22,10_0_55_192-22 | cut -d "," -f5
2

Thanks @lukastribus

Hope this thread can help who want to get accurate counters after haproxy reload.

1 Like