snmp_agent.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2022 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 49 SNMP Interface */
10 
11 #include "squid.h"
12 #include "cache_snmp.h"
13 #include "CachePeer.h"
14 #include "globals.h"
15 #include "mem_node.h"
16 #include "neighbors.h"
17 #include "snmp_agent.h"
18 #include "snmp_core.h"
19 #include "SquidConfig.h"
20 #include "SquidMath.h"
21 #include "stat.h"
22 #include "StatCounters.h"
23 #include "StatHist.h"
24 #include "Store.h"
25 #include "tools.h"
26 #include "util.h"
27 
28 /************************************************************************
29 
30  SQUID MIB Implementation
31 
32  ************************************************************************/
33 
34 /*
35  * cacheSystem group
36  */
37 
40 {
41  variable_list *Answer = NULL;
42  MemBuf tmp;
43  debugs(49, 5, "snmp_sysFn: Processing request:" << snmpDebugOid(Var->name, Var->name_length, tmp));
44  *ErrP = SNMP_ERR_NOERROR;
45 
46  switch (Var->name[LEN_SQ_SYS]) {
47 
48  case SYSVMSIZ:
49  Answer = snmp_var_new_integer(Var->name, Var->name_length,
50  mem_node::StoreMemSize() >> 10,
51  ASN_INTEGER);
52  break;
53 
54  case SYSSTOR:
55  Answer = snmp_var_new_integer(Var->name, Var->name_length,
56  Store::Root().currentSize() >> 10,
57  ASN_INTEGER);
58  break;
59 
60  case SYS_UPTIME:
61  Answer = snmp_var_new_integer(Var->name, Var->name_length,
62  (int)(tvSubDsec(squid_start, current_time) * 100),
64  break;
65 
66  default:
67  *ErrP = SNMP_ERR_NOSUCHNAME;
68  break;
69  }
70 
71  return Answer;
72 }
73 
74 /*
75  * cacheConfig group
76  */
79 {
80  variable_list *Answer = NULL;
81  const char *cp = NULL;
82  debugs(49, 5, "snmp_confFn: Processing request with magic " << Var->name[8] << "!");
83  *ErrP = SNMP_ERR_NOERROR;
84 
85  switch (Var->name[LEN_SQ_CONF]) {
86 
87  case CONF_ADMIN:
88  Answer = snmp_var_new(Var->name, Var->name_length);
89  Answer->type = ASN_OCTET_STR;
90  Answer->val_len = strlen(Config.adminEmail);
91  Answer->val.string = (u_char *) xstrdup(Config.adminEmail);
92  break;
93 
94  case CONF_VERSION:
95  Answer = snmp_var_new(Var->name, Var->name_length);
96  Answer->type = ASN_OCTET_STR;
97  Answer->val_len = strlen(APP_SHORTNAME);
98  Answer->val.string = (u_char *) xstrdup(APP_SHORTNAME);
99  break;
100 
101  case CONF_VERSION_ID:
102  Answer = snmp_var_new(Var->name, Var->name_length);
103  Answer->type = ASN_OCTET_STR;
104  Answer->val_len = strlen(VERSION);
105  Answer->val.string = (u_char *) xstrdup(VERSION);
106  break;
107 
108  case CONF_STORAGE:
109 
110  switch (Var->name[LEN_SQ_CONF + 1]) {
111 
112  case CONF_ST_MMAXSZ:
113  Answer = snmp_var_new_integer(Var->name, Var->name_length,
114  (snint) (Config.memMaxSize >> 20),
115  ASN_INTEGER);
116  break;
117 
118  case CONF_ST_SWMAXSZ:
119  Answer = snmp_var_new_integer(Var->name, Var->name_length,
120  (snint) (Store::Root().maxSize() >> 20),
121  ASN_INTEGER);
122  break;
123 
124  case CONF_ST_SWHIWM:
125  Answer = snmp_var_new_integer(Var->name, Var->name_length,
127  ASN_INTEGER);
128  break;
129 
130  case CONF_ST_SWLOWM:
131  Answer = snmp_var_new_integer(Var->name, Var->name_length,
133  ASN_INTEGER);
134  break;
135 
136  default:
137  *ErrP = SNMP_ERR_NOSUCHNAME;
138  break;
139  }
140 
141  break;
142 
143  case CONF_LOG_FAC:
144  Answer = snmp_var_new(Var->name, Var->name_length);
145 
146  if (!(cp = Debug::debugOptions))
147  cp = "None";
148 
149  Answer->type = ASN_OCTET_STR;
150 
151  Answer->val_len = strlen(cp);
152 
153  Answer->val.string = (u_char *) xstrdup(cp);
154 
155  break;
156 
157  case CONF_UNIQNAME:
158  Answer = snmp_var_new(Var->name, Var->name_length);
159 
160  cp = uniqueHostname();
161 
162  Answer->type = ASN_OCTET_STR;
163 
164  Answer->val_len = strlen(cp);
165 
166  Answer->val.string = (u_char *) xstrdup(cp);
167 
168  break;
169 
170  default:
171  *ErrP = SNMP_ERR_NOSUCHNAME;
172 
173  break;
174  }
175 
176  return Answer;
177 }
178 
179 /*
180  * cacheMesh group
181  * - cachePeerTable
182  */
185 {
186  variable_list *Answer = NULL;
187 
188  Ip::Address laddr;
189  char *cp = NULL;
190  CachePeer *p = NULL;
191  int cnt = 0;
192  debugs(49, 5, "snmp_meshPtblFn: peer " << Var->name[LEN_SQ_MESH + 3] << " requested!");
193  *ErrP = SNMP_ERR_NOERROR;
194 
195  u_int index = Var->name[LEN_SQ_MESH + 3] ;
196  for (p = Config.peers; p != NULL; p = p->next, ++cnt) {
197  if (p->index == index) {
198  laddr = p->in_addr ;
199  break;
200  }
201  }
202 
203  if (p == NULL) {
204  *ErrP = SNMP_ERR_NOSUCHNAME;
205  return NULL;
206  }
207 
208  switch (Var->name[LEN_SQ_MESH + 2]) {
209  case MESH_PTBL_INDEX: { // XXX: Should be visible?
210  Answer = snmp_var_new_integer(Var->name, Var->name_length,
211  (snint)p->index, SMI_INTEGER);
212  }
213  break;
214 
215  case MESH_PTBL_NAME:
216  cp = p->host;
217  Answer = snmp_var_new(Var->name, Var->name_length);
218  Answer->type = ASN_OCTET_STR;
219  Answer->val_len = strlen(cp);
220  Answer->val.string = (u_char *) xstrdup(cp);
221 
222  break;
223 
224  case MESH_PTBL_ADDR_TYPE: {
225  int ival;
227  Answer = snmp_var_new_integer(Var->name, Var->name_length,
228  ival, SMI_INTEGER);
229  }
230  break;
231  case MESH_PTBL_ADDR: {
232  Answer = snmp_var_new(Var->name, Var->name_length);
233  // InetAddress doesn't have its own ASN.1 type,
234  // like IpAddr does (SMI_IPADDRESS)
235  // See: rfc4001.txt
236  Answer->type = ASN_OCTET_STR;
237  char host[MAX_IPSTRLEN];
238  laddr.toStr(host,MAX_IPSTRLEN);
239  Answer->val_len = strlen(host);
240  Answer->val.string = (u_char *) xstrdup(host);
241  }
242  break;
243 
244  case MESH_PTBL_HTTP:
245  Answer = snmp_var_new_integer(Var->name, Var->name_length,
246  (snint) p->http_port,
247  ASN_INTEGER);
248  break;
249 
250  case MESH_PTBL_ICP:
251  Answer = snmp_var_new_integer(Var->name, Var->name_length,
252  (snint) p->icp.port,
253  ASN_INTEGER);
254  break;
255 
256  case MESH_PTBL_TYPE:
257  Answer = snmp_var_new_integer(Var->name, Var->name_length,
258  (snint) p->type,
259  ASN_INTEGER);
260  break;
261 
262  case MESH_PTBL_STATE:
263  Answer = snmp_var_new_integer(Var->name, Var->name_length,
264  (snint) neighborUp(p),
265  ASN_INTEGER);
266  break;
267 
268  case MESH_PTBL_SENT:
269  Answer = snmp_var_new_integer(Var->name, Var->name_length,
270  p->stats.pings_sent,
271  SMI_COUNTER32);
272  break;
273 
274  case MESH_PTBL_PACKED:
275  Answer = snmp_var_new_integer(Var->name, Var->name_length,
276  p->stats.pings_acked,
277  SMI_COUNTER32);
278  break;
279 
280  case MESH_PTBL_FETCHES:
281  Answer = snmp_var_new_integer(Var->name, Var->name_length,
282  p->stats.fetches,
283  SMI_COUNTER32);
284  break;
285 
286  case MESH_PTBL_RTT:
287  Answer = snmp_var_new_integer(Var->name, Var->name_length,
288  p->stats.rtt,
289  ASN_INTEGER);
290  break;
291 
292  case MESH_PTBL_IGN:
293  Answer = snmp_var_new_integer(Var->name, Var->name_length,
295  SMI_COUNTER32);
296  break;
297 
298  case MESH_PTBL_KEEPAL_S:
299  Answer = snmp_var_new_integer(Var->name, Var->name_length,
301  SMI_COUNTER32);
302  break;
303 
304  case MESH_PTBL_KEEPAL_R:
305  Answer = snmp_var_new_integer(Var->name, Var->name_length,
307  SMI_COUNTER32);
308  break;
309 
310  default:
311  *ErrP = SNMP_ERR_NOSUCHNAME;
312  break;
313  }
314 
315  return Answer;
316 }
317 
320 {
321  variable_list *Answer = NULL;
322 
323  static struct rusage rusage;
324  debugs(49, 5, "snmp_prfSysFn: Processing request with magic " << Var->name[LEN_SQ_PRF + 1] << "!");
325  *ErrP = SNMP_ERR_NOERROR;
326 
327  switch (Var->name[LEN_SQ_PRF + 1]) {
328 
329  case PERF_SYS_PF:
331  Answer = snmp_var_new_integer(Var->name, Var->name_length,
333  SMI_COUNTER32);
334  break;
335 
336  case PERF_SYS_NUMR:
337  Answer = snmp_var_new_integer(Var->name, Var->name_length,
339  SMI_COUNTER32);
340  break;
341 
342  case PERF_SYS_MEMUSAGE:
343  Answer = snmp_var_new_integer(Var->name, Var->name_length,
344  (snint) statMemoryAccounted() >> 10,
345  ASN_INTEGER);
346  break;
347 
348  case PERF_SYS_CPUTIME:
350  Answer = snmp_var_new_integer(Var->name, Var->name_length,
352  ASN_INTEGER);
353  break;
354 
355  case PERF_SYS_CPUUSAGE:
357  Answer = snmp_var_new_integer(Var->name, Var->name_length,
359  ASN_INTEGER);
360  break;
361 
362  case PERF_SYS_MAXRESSZ:
364  Answer = snmp_var_new_integer(Var->name, Var->name_length,
366  ASN_INTEGER);
367  break;
368 
369  case PERF_SYS_CURLRUEXP:
370  /* No global LRU info anymore */
371  Answer = snmp_var_new_integer(Var->name, Var->name_length,
372  0,
373  SMI_TIMETICKS);
374  break;
375 
376  case PERF_SYS_CURUNLREQ:
377  Answer = snmp_var_new_integer(Var->name, Var->name_length,
379  SMI_GAUGE32);
380  break;
381 
383  Answer = snmp_var_new_integer(Var->name, Var->name_length,
385  SMI_GAUGE32);
386  break;
387 
389  Answer = snmp_var_new_integer(Var->name, Var->name_length,
390  (snint) RESERVED_FD,
391  SMI_GAUGE32);
392  break;
393 
394  case PERF_SYS_CURUSED_FD:
395  Answer = snmp_var_new_integer(Var->name, Var->name_length,
396  (snint) Number_FD,
397  SMI_GAUGE32);
398  break;
399 
400  case PERF_SYS_CURMAX_FD:
401  Answer = snmp_var_new_integer(Var->name, Var->name_length,
402  (snint) Biggest_FD,
403  SMI_GAUGE32);
404  break;
405 
406  case PERF_SYS_NUMOBJCNT:
407  Answer = snmp_var_new_integer(Var->name, Var->name_length,
409  SMI_GAUGE32);
410  break;
411 
412  default:
413  *ErrP = SNMP_ERR_NOSUCHNAME;
414  break;
415  }
416 
417  return Answer;
418 }
419 
422 {
423  variable_list *Answer = NULL;
424  static StatCounters *f = NULL;
425  static StatCounters *l = NULL;
426  double x;
427  int minutes;
428  debugs(49, 5, "snmp_prfProtoFn: Processing request with magic " << Var->name[LEN_SQ_PRF] << "!");
429  *ErrP = SNMP_ERR_NOERROR;
430 
431  switch (Var->name[LEN_SQ_PRF + 1]) {
432 
433  case PERF_PROTOSTAT_AGGR: /* cacheProtoAggregateStats */
434 
435  switch (Var->name[LEN_SQ_PRF + 2]) {
436 
438  Answer = snmp_var_new_integer(Var->name, Var->name_length,
440  SMI_COUNTER32);
441  break;
442 
444  Answer = snmp_var_new_integer(Var->name, Var->name_length,
446  SMI_COUNTER32);
447  break;
448 
450  Answer = snmp_var_new_integer(Var->name, Var->name_length,
452  SMI_COUNTER32);
453  break;
454 
456  Answer = snmp_var_new_integer(Var->name, Var->name_length,
458  SMI_COUNTER32);
459  break;
460 
462  Answer = snmp_var_new_integer(Var->name, Var->name_length,
464  SMI_COUNTER32);
465  break;
466 
468  Answer = snmp_var_new_integer(Var->name, Var->name_length,
470  SMI_COUNTER32);
471  break;
472 
474  Answer = snmp_var_new_integer(Var->name, Var->name_length,
476  SMI_COUNTER32);
477  break;
478 
480  Answer = snmp_var_new_integer(Var->name, Var->name_length,
482  SMI_COUNTER32);
483  break;
484 
486  Answer = snmp_var_new_integer(Var->name, Var->name_length,
488  SMI_COUNTER32);
489  break;
490 
492  Answer = snmp_var_new_integer(Var->name, Var->name_length,
493  (snint) statCounter.server.all.requests,
494  SMI_INTEGER);
495  break;
496 
498  Answer = snmp_var_new_integer(Var->name, Var->name_length,
499  (snint) statCounter.server.all.errors,
500  SMI_INTEGER);
501  break;
502 
504  Answer = snmp_var_new_integer(Var->name, Var->name_length,
505  (snint) statCounter.server.all.kbytes_in.kb,
506  SMI_COUNTER32);
507  break;
508 
510  Answer = snmp_var_new_integer(Var->name, Var->name_length,
511  (snint) statCounter.server.all.kbytes_out.kb,
512  SMI_COUNTER32);
513  break;
514 
516  Answer = snmp_var_new_integer(Var->name, Var->name_length,
517  (snint) Store::Root().currentSize() >> 10,
518  SMI_GAUGE32);
519  break;
520 
522  Answer = snmp_var_new_integer(Var->name, Var->name_length,
524  SMI_GAUGE32);
525  break;
526 
527  default:
528  *ErrP = SNMP_ERR_NOSUCHNAME;
529  break;
530  }
531 
532  return Answer;
533 
535 
536  if (Var->name_length == LEN_SQ_PRF + 5)
537  minutes = Var->name[LEN_SQ_PRF + 4];
538  else
539  break;
540 
541  if ((minutes < 1) || (minutes > 60))
542  break;
543 
544  f = snmpStatGet(0);
545 
546  l = snmpStatGet(minutes);
547 
548  debugs(49, 8, "median: min= " << minutes << ", " << Var->name[LEN_SQ_PRF + 3] << " l= " << l << " , f = " << f);
549  debugs(49, 8, "median: l= " << l << " , f = " << f);
550 
551  switch (Var->name[LEN_SQ_PRF + 3]) {
552 
553  case PERF_MEDIAN_TIME:
554  x = minutes;
555  break;
556 
560  break;
561 
565  break;
566 
567  case PERF_MEDIAN_HTTP_NM:
570  break;
571 
575  break;
576 
579  break;
580 
583  break;
584 
585  case PERF_MEDIAN_DNS:
587  break;
588 
589  case PERF_MEDIAN_RHR:
590  x = statRequestHitRatio(minutes);
591  break;
592 
593  case PERF_MEDIAN_BHR:
594  x = statByteHitRatio(minutes);
595  break;
596 
597  case PERF_MEDIAN_HTTP_NH:
600  break;
601 
602  default:
603  *ErrP = SNMP_ERR_NOSUCHNAME;
604  return NULL;
605  }
606 
607  return snmp_var_new_integer(Var->name, Var->name_length,
608  (snint) x,
609  SMI_INTEGER);
610  }
611 
612  *ErrP = SNMP_ERR_NOSUCHNAME;
613  return NULL;
614 }
615 
@ MESH_PTBL_RTT
Definition: cache_snmp.h:247
static char * debugOptions
Definition: Stream.h:84
@ PERF_SYS_CPUUSAGE
Definition: cache_snmp.h:117
static size_t StoreMemSize()
Definition: mem_node.cc:61
double tvSubDsec(struct timeval t1, struct timeval t2)
Definition: gadgets.cc:44
struct timeval squid_start
#define SMI_TIMETICKS
Definition: snmp_vars.h:79
const char * snmpDebugOid(oid *Name, snint Len, MemBuf &outbuf)
Definition: snmp_core.cc:1052
const char * uniqueHostname(void)
Definition: tools.cc:544
@ MESH_PTBL_HTTP
Definition: cache_snmp.h:240
int fetches
Definition: CachePeer.h:48
struct IoStats::@78 Http
@ MESH_PTBL_ADDR_TYPE
Definition: cache_snmp.h:238
u_int index
Definition: CachePeer.h:38
Ip::Address in_addr
Definition: CachePeer.h:43
@ PERF_MEDIAN_DNS
Definition: cache_snmp.h:168
@ PERF_PROTOSTAT_AGGR_ICP_RKB
Definition: cache_snmp.h:148
double statByteHitRatio(int minutes)
Definition: stat.cc:1762
@ PERF_SYS_NUMR
Definition: cache_snmp.h:114
int reads
Definition: IoStats.h:19
peer_t type
Definition: CachePeer.h:41
StatHist nearHitSvcTime
Definition: StatCounters.h:50
@ PERF_SYS_CURMAX_FD
Definition: cache_snmp.h:125
size_t memMaxSize
Definition: SquidConfig.h:89
#define ASN_OCTET_STR
Definition: asn1.h:54
StatHist replySvcTime
Definition: StatCounters.h:83
#define xstrdup
@ PERF_SYS_CURUNLREQ
Definition: cache_snmp.h:121
@ MESH_PTBL_STATE
Definition: cache_snmp.h:243
@ PERF_SYS_CURLRUEXP
Definition: cache_snmp.h:120
IoStats IOStats
unsigned short port
Definition: CachePeer.h:66
#define INETADDRESSTYPE_IPV4
Definition: snmp_vars.h:93
#define LEN_SQ_PRF
Definition: cache_snmp.h:47
@ PERF_SYS_MAXRESSZ
Definition: cache_snmp.h:118
bool isIPv4() const
Definition: Address.cc:158
struct StatCounters::@131 unlink
@ CONF_ST_MMAXSZ
Definition: cache_snmp.h:89
@ PERF_PROTOSTAT_AGGR_ERRORS
Definition: cache_snmp.h:150
@ PERF_PROTOSTAT_AGGR_HTTP_ERRORS
Definition: cache_snmp.h:142
@ MESH_PTBL_NAME
Definition: cache_snmp.h:237
variable_list * snmp_confFn(variable_list *Var, snint *ErrP)
Definition: snmp_agent.cc:78
@ PERF_PROTOSTAT_AGGR_HTTP_REQ
Definition: cache_snmp.h:140
int highWaterMark
Definition: SquidConfig.h:83
double statHistDeltaMedian(const StatHist &A, const StatHist &B)
Definition: StatHist.cc:91
@ PERF_SYS_NUMOBJCNT
Definition: cache_snmp.h:119
#define LEN_SQ_CONF
Definition: cache_snmp.h:45
char * toStr(char *buf, const unsigned int blen, int force=AF_UNSPEC) const
Definition: Address.cc:792
struct StatCounters::@128 server
size_t kb
Definition: ByteCounter.h:25
ByteCounter kbytes_sent
Definition: StatCounters.h:76
int name_length
Definition: snmp_vars.h:47
@ CONF_STORAGE
Definition: cache_snmp.h:76
#define APP_SHORTNAME
Definition: version.h:22
#define MAX_IPSTRLEN
Length of buffer that needs to be allocated to old a null-terminated IP-string.
Definition: forward.h:25
int pings_acked
Definition: CachePeer.h:47
oid * name
Definition: snmp_vars.h:46
variable_list * snmp_prfProtoFn(variable_list *Var, snint *ErrP)
Definition: snmp_agent.cc:421
@ MESH_PTBL_FETCHES
Definition: cache_snmp.h:246
double doublePercent(const double, const double)
Definition: SquidMath.cc:25
int64_t snint
Definition: cache_snmp.h:14
@ PERF_SYS_PF
Definition: cache_snmp.h:113
ByteCounter kbytes_in
Definition: StatCounters.h:45
StatHist nearMissSvcTime
Definition: StatCounters.h:49
struct timeval current_time
the current UNIX time in timeval {seconds, microseconds} format
Definition: gadgets.cc:17
StatHist svcTime
Definition: StatCounters.h:98
#define LEN_SQ_MESH
Definition: cache_snmp.h:51
#define NULL
Definition: types.h:166
int n_keepalives_sent
Definition: CachePeer.h:51
struct variable_list * snmp_var_new(oid *, int)
Definition: snmp_vars.c:109
#define LEN_SQ_SYS
Definition: cache_snmp.h:43
@ CONF_VERSION
Definition: cache_snmp.h:73
#define SMI_INTEGER
Definition: snmp_vars.h:71
struct StatCounters::@127 client_http
int rusage_pagefaults(struct rusage *r)
Definition: tools.cc:271
@ CONF_ST_SWMAXSZ
Definition: cache_snmp.h:90
@ MESH_PTBL_ADDR
Definition: cache_snmp.h:239
@ MESH_PTBL_ICP
Definition: cache_snmp.h:241
@ PERF_MEDIAN_HTTP_MISS
Definition: cache_snmp.h:163
variable_list * snmp_meshPtblFn(variable_list *Var, snint *ErrP)
Definition: snmp_agent.cc:184
@ PERF_PROTOSTAT_AGGR_CURSWAP
Definition: cache_snmp.h:153
u_char * string
Definition: snmp_vars.h:51
Definition: MemBuf.h:24
struct CachePeer::@28 stats
StatHist hitSvcTime
Definition: StatCounters.h:51
#define SMI_GAUGE32
Definition: snmp_vars.h:77
@ CONF_ADMIN
Definition: cache_snmp.h:72
struct variable_list * snmp_var_new_integer(oid *, int, int, unsigned char)
Definition: snmp_vars.c:151
char * adminEmail
Definition: SquidConfig.h:191
struct SquidConfig::@94 Swap
@ PERF_SYS_CURUSED_FD
Definition: cache_snmp.h:124
#define ASN_INTEGER
Definition: asn1.h:52
struct CachePeer::icp_ icp
static size_t inUseCount()
Definition: store.cc:196
StatHist missSvcTime
Definition: StatCounters.h:48
u_char type
Definition: snmp_vars.h:48
@ PERF_PROTOSTAT_AGGR_HTTP_HITS
Definition: cache_snmp.h:141
@ SYSVMSIZ
Definition: cache_snmp.h:58
void squid_getrusage(struct rusage *r)
Definition: tools.cc:177
@ PERF_PROTOSTAT_AGGR_ICP_S
Definition: cache_snmp.h:145
@ CONF_LOG_FAC
Definition: cache_snmp.h:75
@ PERF_MEDIAN_ICP_QUERY
Definition: cache_snmp.h:166
@ PERF_PROTOSTAT_AGGR_KBYTES_OUT
Definition: cache_snmp.h:152
@ CONF_ST_SWHIWM
Definition: cache_snmp.h:91
@ PERF_MEDIAN_ICP_REPLY
Definition: cache_snmp.h:167
union variable_list::@20 val
@ PERF_PROTOSTAT_AGGR_KBYTES_IN
Definition: cache_snmp.h:151
int Squid_MaxFD
@ PERF_PROTOSTAT_AGGR_CLIENTS
Definition: cache_snmp.h:154
int lowWaterMark
Definition: SquidConfig.h:84
virtual uint64_t currentSize() const override
current size
Definition: Controller.cc:173
@ PERF_MEDIAN_BHR
Definition: cache_snmp.h:170
virtual uint64_t maxSize() const override
Definition: Controller.cc:159
int rusage_maxrss(struct rusage *r)
Definition: tools.cc:250
double rusage_cputime(struct rusage *r)
Definition: tools.cc:235
int pings_sent
Definition: CachePeer.h:46
@ PERF_PROTOSTAT_AGGR_HTTP_KBYTES_OUT
Definition: cache_snmp.h:144
@ PERF_SYS_CPUTIME
Definition: cache_snmp.h:116
struct StatCounters::@129 icp
char * host
Definition: CachePeer.h:40
variable_list * snmp_sysFn(variable_list *Var, snint *ErrP)
Definition: snmp_agent.cc:39
StatHist allSvcTime
Definition: StatCounters.h:52
@ PERF_MEDIAN_HTTP_HIT
Definition: cache_snmp.h:165
@ PERF_SYS_CURRESERVED_FD
Definition: cache_snmp.h:123
@ PERF_PROTOSTAT_AGGR_REQ
Definition: cache_snmp.h:149
@ PERF_MEDIAN_HTTP_NH
Definition: cache_snmp.h:171
@ PERF_PROTOSTAT_AGGR_ICP_R
Definition: cache_snmp.h:146
@ PERF_SYS_MEMUSAGE
Definition: cache_snmp.h:115
@ PERF_MEDIAN_HTTP_ALL
Definition: cache_snmp.h:162
@ MESH_PTBL_SENT
Definition: cache_snmp.h:244
@ MESH_PTBL_IGN
Definition: cache_snmp.h:248
int rtt
Definition: CachePeer.h:49
@ MESH_PTBL_PACKED
Definition: cache_snmp.h:245
struct StatCounters::@128::@138 all
int RESERVED_FD
int statMemoryAccounted(void)
@ PERF_PROTOSTAT_AGGR_ICP_SKB
Definition: cache_snmp.h:147
@ PERF_MEDIAN_TIME
Definition: cache_snmp.h:161
@ MESH_PTBL_KEEPAL_S
Definition: cache_snmp.h:249
@ MESH_PTBL_TYPE
Definition: cache_snmp.h:242
StatHist querySvcTime
Definition: StatCounters.h:82
int neighborUp(const CachePeer *p)
Definition: neighbors.cc:1163
StatCounters * snmpStatGet(int minutes)
Definition: stat.cc:1711
CachePeer * peers
Definition: SquidConfig.h:252
@ PERF_SYS_CURUNUSED_FD
Definition: cache_snmp.h:122
#define INETADDRESSTYPE_IPV6
Definition: snmp_vars.h:94
int n_keepalives_recv
Definition: CachePeer.h:52
double statRequestHitRatio(int minutes)
Definition: stat.cc:1732
@ PERF_MEDIAN_RHR
Definition: cache_snmp.h:169
@ PERF_PROTOSTAT_AGGR_HTTP_KBYTES_IN
Definition: cache_snmp.h:143
int ignored_replies
Definition: CachePeer.h:50
#define SNMP_ERR_NOSUCHNAME
Definition: snmp_error.h:44
@ CONF_VERSION_ID
Definition: cache_snmp.h:74
#define VERSION
CachePeer * next
Definition: CachePeer.h:153
variable_list * snmp_prfSysFn(variable_list *Var, snint *ErrP)
Definition: snmp_agent.cc:319
@ MESH_PTBL_KEEPAL_R
Definition: cache_snmp.h:250
@ CONF_ST_SWLOWM
Definition: cache_snmp.h:92
@ PERF_MEDIAN_HTTP_NM
Definition: cache_snmp.h:164
ByteCounter kbytes_out
Definition: StatCounters.h:46
struct StatCounters::@132 dns
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Stream.h:196
ByteCounter kbytes_recv
Definition: StatCounters.h:79
@ CONF_UNIQNAME
Definition: cache_snmp.h:77
int Number_FD
unsigned short http_port
Definition: CachePeer.h:77
@ PERF_PROTOSTAT_MEDIAN
Definition: cache_snmp.h:133
@ SYS_UPTIME
Definition: cache_snmp.h:60
int Biggest_FD
#define SNMP_ERR_NOERROR
Definition: snmp_error.h:42
class SquidConfig Config
Definition: SquidConfig.cc:12
#define SMI_COUNTER32
Definition: snmp_vars.h:76
@ MESH_PTBL_INDEX
Definition: cache_snmp.h:236
StatCounters statCounter
Definition: StatCounters.cc:12
@ PERF_PROTOSTAT_AGGR
Definition: cache_snmp.h:132
@ SYSSTOR
Definition: cache_snmp.h:59
Controller & Root()
safely access controller singleton
Definition: Controller.cc:934

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors