Debian Codegraph @

src/FatController.hpp

raw
1 // For all support, instructions and copyright go to:
2 // http://e2guardian.org/
3 // Released under the GPL v2, with the OpenSSL exception described in the README file.
4
5 #ifndef __HPP_FATCONTROLLER
6 #define __HPP_FATCONTROLLER
7
8 // INCLUDES
9
10 #include "OptionContainer.hpp"
11 #include "UDSocket.hpp"
12
13 #include <string>
14 #include <atomic>
15
16 // DECLARATIONS
17
18 // program main loop - pass in FD of pidfile
19 int fc_controlit();
20
21 struct stat_rec {
22 long births; // num of child forks in stat interval
23 long deaths; // num of child deaths in stat interval
24 std::atomic<int> conx ; // num of client connections in stat interval
25 std::atomic<int> reqs; // num of client requests in stat interval
26 time_t start_int; // time of start of this stat interval
27 time_t end_int; // target end time of stat interval
28 std::atomic<int> maxusedfd; // max fd reached
29 std::atomic<int> busychildren;
30 FILE *fs; // file stream
31 void reset();
32 void start(bool firsttime);
33 void clear();
34 void close();
35 };
36
37
38
39 #endif