InfoAction.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2019 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 /* DEBUG: section 16 Cache Manager API */
10 
11 #ifndef SQUID_MGR_INFO_ACTION_H
12 #define SQUID_MGR_INFO_ACTION_H
13 
14 #include "mgr/Action.h"
15 #include "StoreStats.h"
16 
17 namespace Mgr
18 {
19 
23 {
24 public:
26 
27 public:
28  struct timeval squid_start = {};
29  struct timeval current_time = {};
30  double client_http_clients = 0.0;
31  double client_http_requests = 0.0;
32  double icp_pkts_recv = 0.0;
33  double icp_pkts_sent = 0.0;
34  double icp_replies_queued = 0.0;
35 #if USE_HTCP
36  double htcp_pkts_recv = 0.0;
37  double htcp_pkts_sent = 0.0;
38 #endif
39  double request_failure_ratio = 0.0;
41  double avg_icp_messages = 0.0;
42  double select_loops = 0.0;
43  double avg_loop_time = 0.0;
44  double request_hit_ratio5 = 0.0;
45  double request_hit_ratio60 = 0.0;
46  double byte_hit_ratio5 = 0.0;
47  double byte_hit_ratio60 = 0.0;
48  double request_hit_mem_ratio5 = 0.0;
52 
54 
55  double unlink_requests = 0.0;
56  double http_requests5 = 0.0;
57  double http_requests60 = 0.0;
58  double cache_misses5 = 0.0;
59  double cache_misses60 = 0.0;
60  double cache_hits5 = 0.0;
61  double cache_hits60 = 0.0;
62  double near_hits5 = 0.0;
63  double near_hits60 = 0.0;
64  double not_modified_replies5 = 0.0;
65  double not_modified_replies60 = 0.0;
66  double dns_lookups5 = 0.0;
67  double dns_lookups60 = 0.0;
68  double icp_queries5 = 0.0;
69  double icp_queries60 = 0.0;
70  double up_time = 0.0;
71  double cpu_time = 0.0;
72  double cpu_usage = 0.0;
73  double cpu_usage5 = 0.0;
74  double cpu_usage60 = 0.0;
75  double maxrss = 0.0;
76  double page_faults = 0.0;
77 #if HAVE_MSTATS && HAVE_GNUMALLOC_H
78  double ms_bytes_total = 0.0;
79  double ms_bytes_free = 0.0;
80 #endif
81  double total_accounted = 0.0;
82  double gb_saved_count = 0.0;
83  double gb_freed_count = 0.0;
84  double max_fd = 0.0;
85  double biggest_fd = 0.0;
86  double number_fd = 0.0;
87  double opening_fd = 0.0;
88  double num_fd_free = 0.0;
89  double reserved_fd = 0.0;
90  unsigned int count = 0;
91 };
92 
94 class InfoAction: public Action
95 {
96 protected:
97  InfoAction(const CommandPointer &cmd);
98 
99 public:
100  static Pointer Create(const CommandPointer &cmd);
101  /* Action API */
102  virtual void add(const Action& action);
103  virtual void respond(const Request& request);
104  virtual void pack(Ipc::TypedMsgHdr& msg) const;
105  virtual void unpack(const Ipc::TypedMsgHdr& msg);
106 
107 protected:
108  /* Action API */
109  virtual void collect();
110  virtual void dump(StoreEntry* entry);
111 
112 private:
114 };
115 
116 } // namespace Mgr
117 
118 #endif /* SQUID_MGR_INFO_ACTION_H */
119 
cache manager request
Definition: Request.h:22
implement aggregated 'info' action
Definition: InfoAction.h:94
double request_failure_ratio
Definition: InfoAction.h:39
double total_accounted
Definition: InfoAction.h:81
double not_modified_replies60
Definition: InfoAction.h:65
double byte_hit_ratio5
Definition: InfoAction.h:46
double icp_replies_queued
Definition: InfoAction.h:34
InfoActionData data
Definition: InfoAction.h:113
double request_hit_disk_ratio5
Definition: InfoAction.h:50
struct _request * request(char *urlin)
Definition: tcp-banger2.c:291
double request_hit_ratio5
Definition: InfoAction.h:44
double client_http_requests
Definition: InfoAction.h:31
class Ping::pingStats_ stats
High-level store statistics used by mgr:info action. Used inside PODs!
Definition: StoreStats.h:13
struct timeval current_time
Definition: InfoAction.h:29
double avg_icp_messages
Definition: InfoAction.h:41
double request_hit_ratio60
Definition: InfoAction.h:45
unsigned int count
Definition: InfoAction.h:90
double request_hit_disk_ratio60
Definition: InfoAction.h:51
double client_http_clients
Definition: InfoAction.h:30
struct timeval squid_start
Definition: InfoAction.h:28
double request_hit_mem_ratio5
Definition: InfoAction.h:48
double request_hit_mem_ratio60
Definition: InfoAction.h:49
InfoActionData & operator+=(const InfoActionData &stats)
Definition: InfoAction.cc:32
bool action(int fd, size_t metasize, const char *fn, const char *url, const SquidMetaList &meta)
Definition: purge.cc:311
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:31
double avg_client_http_requests
Definition: InfoAction.h:40
double http_requests60
Definition: InfoAction.h:57
double unlink_requests
Definition: InfoAction.h:55
StoreInfoStats store
disk and memory cache statistics
Definition: InfoAction.h:53
double byte_hit_ratio60
Definition: InfoAction.h:47
Cache Manager API.
Definition: Action.h:19
double not_modified_replies5
Definition: InfoAction.h:64

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors