Tom, everything is fine which is finishing fine ;-))
regarding "broken pipe" error messages : no need to worry too much
about them, in fact these messages were added explicitly to the
STAT-service code to help to understand for which reason the
collection of stats was stopped... And there are 2 options: the
command line output was closed unexpectedly (broken pipe) or a network
connection was closed between servers..
And both states may be normal and abnormal ;-))
When you're stopping stats collects via web interface -- all
corresponding network connections will be closed then, and
STAT-service will receive an error as "connection lost", and this will
be as expected and correct.. Now, if the client running STAT-service
will hang, or reset, or reboot -- the connection will be lost then on
the dim_STAT server side, and this will be seen as abnormal, so you'll
automatically get in your LOG messages the corresponding errors
pointing to the connection lost..
Same for "broken pipe" : generally each stat command is supposed to
loop forever, but it can be killed, or be buggy and crash (for ex.) --
in this case the STAT-service will recognize the situation and will
log a message about "broken pipe" from a corresponding stat command,
and then close the connection and allowing the dim_STAT server to
restart it in a normal way again. The only exception here is a
reserved "STAT_LIST" command -- this is a reserved order to show the
list of all available stat commands from a given STAT-service, and
this order is processed as any other stat command. And as STAT_LIST is
not supposed to loop forever, there is an "error" message about broken
pipe, once the STAT_LIST output is finished (just to say that all info
was sent to the network connection and pipe was closed)..
Well, hope it'll clarify little bit what is going inside ;-)