~ubuntu-branches/ubuntu/precise/haproxy/precise-updates

« back to all changes in this revision

Viewing changes to include/types/counters.h

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2010-04-15 20:00:34 UTC
  • mfrom: (1.1.8 upstream) (2.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100415200034-is2r38tyvmtvi3ml
Tags: 1.4.4-1
* New upstream release
* Add splice and tproxy support
* Add regparm optimization on i386
* Switch to dpkg-source 3.0 (quilt) format

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  include/types/counters.h
 
3
  This file contains structure declarations for statistics counters.
 
4
 
 
5
  Copyright 2008-2009 Krzysztof Piotr Oledzki <ole@ans.pl>
 
6
 
 
7
  This library is free software; you can redistribute it and/or
 
8
  modify it under the terms of the GNU Lesser General Public
 
9
  License as published by the Free Software Foundation, version 2.1
 
10
  exclusively.
 
11
 
 
12
  This library is distributed in the hope that it will be useful,
 
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
  Lesser General Public License for more details.
 
16
 
 
17
  You should have received a copy of the GNU Lesser General Public
 
18
  License along with this library; if not, write to the Free Software
 
19
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
20
*/
 
21
 
 
22
#ifndef _TYPES_COUNTERS_H
 
23
#define _TYPES_COUNTERS_H
 
24
 
 
25
struct pxcounters {
 
26
        unsigned int feconn_max, beconn_max;    /* max # of active frontend and backend sessions */
 
27
 
 
28
        long long cum_fe_req;                   /* cumulated number of processed HTTP requests */
 
29
        long long cum_feconn, cum_beconn;       /* cumulated number of processed sessions */
 
30
        long long cum_lbconn;                   /* cumulated number of sessions processed by load balancing */
 
31
 
 
32
        unsigned int fe_rps_max;                /* maximum of new sessions per second seen on the frontend */
 
33
        unsigned int fe_sps_max;                /* maximum of new sessions per second seen on the frontend */
 
34
        unsigned int be_sps_max;                /* maximum of new sessions per second seen on the backend */
 
35
        unsigned int nbpend_max;                /* max number of pending connections with no server assigned yet */
 
36
 
 
37
        long long bytes_in;                     /* number of bytes transferred from the client to the server */
 
38
        long long bytes_out;                    /* number of bytes transferred from the server to the client */
 
39
 
 
40
        long long denied_req, denied_resp;      /* blocked requests/responses because of security concerns */
 
41
        long long failed_req;                   /* failed requests (eg: invalid or timeout) */
 
42
 
 
43
        union {
 
44
                struct {
 
45
                        long long rsp[6];       /* http response codes */
 
46
                } http;
 
47
        } fe, be;                               /* FE and BE stats */
 
48
 
 
49
        long long failed_conns, failed_resp;    /* failed connect() and responses */
 
50
        long long cli_aborts, srv_aborts;       /* aborted responses during DATA phase due to client or server */
 
51
        long long retries, redispatches;        /* retried and redispatched connections */
 
52
};
 
53
 
 
54
struct licounters {
 
55
        unsigned int conn_max;                  /* max # of active listener sessions */
 
56
 
 
57
        long long cum_conn;                     /* cumulated number of processed sessions */
 
58
 
 
59
        long long bytes_in;                     /* number of bytes transferred from the client to the server */
 
60
        long long bytes_out;                    /* number of bytes transferred from the server to the client */
 
61
 
 
62
        long long denied_req, denied_resp;      /* blocked requests/responses because of security concerns */
 
63
        long long failed_req;                   /* failed requests (eg: invalid or timeout) */
 
64
};
 
65
 
 
66
struct srvcounters {
 
67
        unsigned int cur_sess_max;              /* max number of currently active sessions */
 
68
        unsigned int nbpend_max;                /* max number of pending connections reached */
 
69
        unsigned int sps_max;                   /* maximum of new sessions per second seen on this server */
 
70
 
 
71
        long long cum_sess;                     /* cumulated number of sessions really sent to this server */
 
72
        long long cum_lbconn;                   /* cumulated number of sessions directed by load balancing */
 
73
 
 
74
        long long bytes_in;                     /* number of bytes transferred from the client to the server */
 
75
        long long bytes_out;                    /* number of bytes transferred from the server to the client */
 
76
 
 
77
        long long failed_conns, failed_resp;    /* failed connect() and responses */
 
78
        long long cli_aborts, srv_aborts;       /* aborted responses during DATA phase due to client or server */
 
79
        long long retries, redispatches;        /* retried and redispatched connections */
 
80
        long long failed_secu;                  /* blocked responses because of security concerns */
 
81
 
 
82
        union {
 
83
                struct {
 
84
                        long long rsp[6];       /* http response codes */
 
85
                } http;
 
86
        } p;
 
87
 
 
88
        long long failed_checks, failed_hana;   /* failed health checks and health analyses */
 
89
        long long down_trans;                   /* up->down transitions */
 
90
};
 
91
 
 
92
#endif /* _TYPES_COUNTERS_H */
 
93
 
 
94
/*
 
95
 * Local variables:
 
96
 *  c-indent-level: 8
 
97
 *  c-basic-offset: 8
 
98
 * End:
 
99
 */