Hi,
i'm currently playing with the values that the admin socket return when
the "show servers state" command is issued and I noticed to things:

1. When using and abstract namespace socket as address on a server line
then the srv_addr "field" will be empty which technically isn't a
problem but the documentation doesn't seem to mention how exactly fields
are delimited. Example:

...
5 sites-front-ssl 1 clear  2 0 1 1 63797 1 0 2 0 0 0 0
...
(notice the two spaces after "clear")

In my first attempt at parsing the output i used white-space as a
delimiter which failed for this particular server line. Once I used one
single space character as a delimiter the parsing worked fine.
I would probably be good to document this explicitly to make parsers
more robust. Alternatively one could use white-space as a delimiter and
maybe output fields that have not content as "-".

2. The server administrative state flags are defined like this:

enum srv_admin {
        SRV_ADMF_FMAINT    = 0x01,
        SRV_ADMF_IMAINT    = 0x02,
        SRV_ADMF_MAINT     = 0x23,
        SRV_ADMF_CMAINT    = 0x04,
        SRV_ADMF_FDRAIN    = 0x08,
        SRV_ADMF_IDRAIN    = 0x10,
        SRV_ADMF_DRAIN     = 0x18,
        SRV_ADMF_RMAINT    = 0x20,
};

Shouldn't the SRV_ADMF_MAINT value include the CMAINT flag and thus
actually have a value of 0x27?

Regards,
  Dennis

Reply via email to