InfoAction.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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:
27 
28 public:
29  struct timeval squid_start;
30  struct timeval current_time;
33  double icp_pkts_recv;
34  double icp_pkts_sent;
36 #if USE_HTCP
39 #endif
43  double select_loops;
44  double avg_loop_time;
53 
55 
59  double cache_misses5;
61  double cache_hits5;
62  double cache_hits60;
63  double near_hits5;
64  double near_hits60;
67  double dns_lookups5;
68  double dns_lookups60;
69  double icp_queries5;
70  double icp_queries60;
71  double up_time;
72  double cpu_time;
73  double cpu_usage;
74  double cpu_usage5;
75  double cpu_usage60;
76  double maxrss;
77  double page_faults;
78 #if HAVE_MSTATS && HAVE_GNUMALLOC_H
79  double ms_bytes_total;
80  double ms_bytes_free;
81 #endif
85  double max_fd;
86  double biggest_fd;
87  double number_fd;
88  double opening_fd;
89  double num_fd_free;
90  double reserved_fd;
91  unsigned int count;
92 };
93 
95 class InfoAction: public Action
96 {
97 protected:
99 
100 public:
101  static Pointer Create(const CommandPointer &cmd);
102  /* Action API */
103  virtual void add(const Action& action);
104  virtual void respond(const Request& request);
105  virtual void pack(Ipc::TypedMsgHdr& msg) const;
106  virtual void unpack(const Ipc::TypedMsgHdr& msg);
107 
108 protected:
109  /* Action API */
110  virtual void collect();
111  virtual void dump(StoreEntry* entry);
112 
113 private:
115 };
116 
117 } // namespace Mgr
118 
119 #endif /* SQUID_MGR_INFO_ACTION_H */
120 
cache manager request
Definition: Request.h:22
implement aggregated 'info' action
Definition: InfoAction.h:95
double request_failure_ratio
Definition: InfoAction.h:40
double total_accounted
Definition: InfoAction.h:82
virtual void respond(const Request &request)
respond to Coordinator request; default is to collect and sendResponse
Definition: InfoAction.cc:129
double not_modified_replies60
Definition: InfoAction.h:66
double byte_hit_ratio5
Definition: InfoAction.h:47
double icp_replies_queued
Definition: InfoAction.h:35
virtual void collect()
calculate and keep local action-specific information
Definition: InfoAction.cc:139
InfoActionData data
Definition: InfoAction.h:114
double request_hit_disk_ratio5
Definition: InfoAction.h:51
struct _request * request(char *urlin)
Definition: tcp-banger2.c:291
double request_hit_ratio5
Definition: InfoAction.h:45
double client_http_requests
Definition: InfoAction.h:32
class Ping::pingStats_ stats
static Pointer Create(const CommandPointer &cmd)
Definition: InfoAction.cc:110
High-level store statistics used by mgr:info action. Used inside PODs!
Definition: StoreStats.h:13
virtual void pack(Ipc::TypedMsgHdr &msg) const
pack collected action info into a message to be sent to Coordinator
Definition: InfoAction.cc:162
struct timeval current_time
Definition: InfoAction.h:30
double avg_icp_messages
Definition: InfoAction.h:42
double request_hit_ratio60
Definition: InfoAction.h:46
unsigned int count
Definition: InfoAction.h:91
double request_hit_disk_ratio60
Definition: InfoAction.h:52
double client_http_clients
Definition: InfoAction.h:31
struct timeval squid_start
Definition: InfoAction.h:29
double request_hit_mem_ratio5
Definition: InfoAction.h:49
double request_hit_mem_ratio60
Definition: InfoAction.h:50
InfoActionData & operator+=(const InfoActionData &stats)
Definition: InfoAction.cc:37
const CommandPointer cmd
the command that caused this action
Definition: Action.h:86
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:41
double http_requests60
Definition: InfoAction.h:58
InfoAction(const CommandPointer &cmd)
Definition: InfoAction.cc:115
virtual void dump(StoreEntry *entry)
Definition: InfoAction.cc:145
virtual void unpack(const Ipc::TypedMsgHdr &msg)
unpack action info from the message received by Coordinator
Definition: InfoAction.cc:169
double unlink_requests
Definition: InfoAction.h:56
StoreInfoStats store
disk and memory cache statistics
Definition: InfoAction.h:54
double byte_hit_ratio60
Definition: InfoAction.h:48
virtual void add(const Action &action)
incrementally merge in remote information (of the same action type)
Definition: InfoAction.cc:122
double not_modified_replies5
Definition: InfoAction.h:65

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors