]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: sample: add a few basic internal fetches (nbproc, proc, stopping)
authorWilly Tarreau <w@1wt.eu>
Mon, 24 Nov 2014 15:02:05 +0000 (16:02 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 24 Nov 2014 16:44:02 +0000 (17:44 +0100)
commit0f30d26dbf74c21bce9a4d216dd868dc4d84d324
tree912992db0f02aef452949cbc5dfd9dee983d9fb5
parent4b9e80268ec15f6f3db85e53a5ab9c6dbf920264
MINOR: sample: add a few basic internal fetches (nbproc, proc, stopping)

Sometimes, either for debugging or for logging we'd like to have a bit
of information about the running process. Here are 3 new fetches for this :

nbproc : integer
  Returns an integer value corresponding to the number of processes that were
  started (it equals the global "nbproc" setting). This is useful for logging
  and debugging purposes.

proc : integer
  Returns an integer value corresponding to the position of the process calling
  the function, between 1 and global.nbproc. This is useful for logging and
  debugging purposes.

stopping : boolean
  Returns TRUE if the process calling the function is currently stopping. This
  can be useful for logging, or for relaxing certain checks or helping close
  certain connections upon graceful shutdown.
doc/configuration.txt
src/sample.c