InfoAction.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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
17namespace Mgr
18{
19
23{
24public:
26
27public:
28 struct timeval squid_start = {};
29 struct timeval current_time = {};
30 double client_http_clients = 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
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;
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;
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
94class InfoAction: public Action
95{
96protected:
98
99public:
100 static Pointer Create(const CommandPointer &cmd);
101 /* Action API */
102 void add(const Action& action) override;
103 void respond(const Request& request) override;
104 void pack(Ipc::TypedMsgHdr& msg) const override;
105 void unpack(const Ipc::TypedMsgHdr& msg) override;
106
107protected:
108 /* Action API */
109 void collect() override;
110 void dump(StoreEntry* entry) override;
111
112private:
114};
115
116} // namespace Mgr
117
118#endif /* SQUID_MGR_INFO_ACTION_H */
119
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:35
const CommandPointer cmd
the command that caused this action
Definition: Action.h:86
double avg_icp_messages
Definition: InfoAction.h:41
double client_http_clients
Definition: InfoAction.h:30
double not_modified_replies60
Definition: InfoAction.h:65
double request_hit_mem_ratio5
Definition: InfoAction.h:48
double request_hit_disk_ratio60
Definition: InfoAction.h:51
double request_hit_mem_ratio60
Definition: InfoAction.h:49
double request_failure_ratio
Definition: InfoAction.h:39
double request_hit_ratio60
Definition: InfoAction.h:45
double avg_client_http_requests
Definition: InfoAction.h:40
double request_hit_ratio5
Definition: InfoAction.h:44
double client_http_requests
Definition: InfoAction.h:31
struct timeval squid_start
Definition: InfoAction.h:28
double not_modified_replies5
Definition: InfoAction.h:64
double byte_hit_ratio5
Definition: InfoAction.h:46
double unlink_requests
Definition: InfoAction.h:55
double icp_replies_queued
Definition: InfoAction.h:34
double request_hit_disk_ratio5
Definition: InfoAction.h:50
double byte_hit_ratio60
Definition: InfoAction.h:47
StoreInfoStats store
disk and memory cache statistics
Definition: InfoAction.h:53
struct timeval current_time
Definition: InfoAction.h:29
double total_accounted
Definition: InfoAction.h:81
double http_requests60
Definition: InfoAction.h:57
unsigned int count
Definition: InfoAction.h:90
InfoActionData & operator+=(const InfoActionData &stats)
Definition: InfoAction.cc:32
implement aggregated 'info' action
Definition: InfoAction.h:95
static Pointer Create(const CommandPointer &cmd)
Definition: InfoAction.cc:105
void dump(StoreEntry *entry) override
Definition: InfoAction.cc:140
void respond(const Request &request) override
respond to Coordinator request; default is to collect and sendResponse
Definition: InfoAction.cc:124
void pack(Ipc::TypedMsgHdr &msg) const override
pack collected action info into a message to be sent to Coordinator
Definition: InfoAction.cc:157
InfoAction(const CommandPointer &cmd)
Definition: InfoAction.cc:110
void add(const Action &action) override
incrementally merge in remote information (of the same action type)
Definition: InfoAction.cc:117
void unpack(const Ipc::TypedMsgHdr &msg) override
unpack action info from the message received by Coordinator
Definition: InfoAction.cc:164
void collect() override
calculate and keep local action-specific information
Definition: InfoAction.cc:134
InfoActionData data
Definition: InfoAction.h:113
cache manager request
Definition: Request.h:24
High-level store statistics used by mgr:info action. Used inside PODs!
Definition: StoreStats.h:14
Cache Manager API.
Definition: Action.h:20
class Ping::pingStats_ stats
static bool action(int fd, size_t metasize, const char *fn, const char *url, const SquidMetaList &meta)
Definition: purge.cc:315

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors