blob: f551bf07aba73e3dfecf374fa3939bdbbc7bd5b7 [file] [log] [blame]
Krzysztof Piotr Oledzki8d06b8b2009-10-04 14:32:53 +02001/*
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
25struct pxcounters {
26 unsigned int feconn_max, beconn_max; /* max # of active frontend and backend sessions */
27
28 long long cum_feconn, cum_beconn; /* cumulated number of processed sessions */
29 long long cum_lbconn; /* cumulated number of sessions processed by load balancing */
30
Willy Tarreauac68c5d2009-10-04 23:12:44 +020031 unsigned int fe_sps_max; /* maximum of new sessions per second seen on the frontend */
32 unsigned int be_sps_max; /* maximum of new sessions per second seen on the backend */
33 unsigned int nbpend_max; /* max number of pending connections with no server assigned yet */
34
Krzysztof Piotr Oledzki8d06b8b2009-10-04 14:32:53 +020035 long long bytes_in; /* number of bytes transferred from the client to the server */
36 long long bytes_out; /* number of bytes transferred from the server to the client */
37
38 long long denied_req, denied_resp; /* blocked requests/responses because of security concerns */
39 long long failed_req; /* failed requests (eg: invalid or timeout) */
40
Krzysztof Piotr Oledzki5fb18822009-10-13 21:14:09 +020041 union {
42 struct {
43 long long rsp[6]; /* http resonse codes */
44 } http;
45 } p;
46
Krzysztof Piotr Oledzki8d06b8b2009-10-04 14:32:53 +020047 long long failed_conns, failed_resp; /* failed connect() and responses */
48 long long retries, redispatches; /* retried and redispatched connections */
49};
50
51struct licounters {
52 unsigned int conn_max; /* max # of active listener sessions */
53
54 long long cum_conn; /* cumulated number of processed sessions */
55
56 long long bytes_in; /* number of bytes transferred from the client to the server */
57 long long bytes_out; /* number of bytes transferred from the server to the client */
58
59 long long denied_req, denied_resp; /* blocked requests/responses because of security concerns */
60 long long failed_req; /* failed requests (eg: invalid or timeout) */
61};
62
63struct srvcounters {
Willy Tarreauac68c5d2009-10-04 23:12:44 +020064 unsigned int cur_sess_max; /* max number of currently active sessions */
65 unsigned int nbpend_max; /* max number of pending connections reached */
66 unsigned int sps_max; /* maximum of new sessions per second seen on this server */
67
Krzysztof Piotr Oledzki8d06b8b2009-10-04 14:32:53 +020068 long long cum_sess; /* cumulated number of sessions really sent to this server */
69 long long cum_lbconn; /* cumulated number of sessions directed by load balancing */
70
71 long long bytes_in; /* number of bytes transferred from the client to the server */
72 long long bytes_out; /* number of bytes transferred from the server to the client */
73
74 long long failed_conns, failed_resp; /* failed connect() and responses */
75 long long retries, redispatches; /* retried and redispatched connections */
76 long long failed_secu; /* blocked responses because of security concerns */
77
Krzysztof Piotr Oledzki5fb18822009-10-13 21:14:09 +020078 union {
79 struct {
80 long long rsp[6]; /* http resonse codes */
81 } http;
82 } p;
83
Krzysztof Piotr Oledzki8d06b8b2009-10-04 14:32:53 +020084 long long failed_checks, down_trans; /* failed checks and up->down transitions */
85};
86
87#endif /* _TYPES_COUNTERS_H */
88
89/*
90 * Local variables:
91 * c-indent-level: 8
92 * c-basic-offset: 8
93 * End:
94 */