snmp_agent.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2020 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 "SquidTime.h"
22 #include "stat.h"
23 #include "StatCounters.h"
24 #include "StatHist.h"
25 #include "Store.h"
26 #include "tools.h"
27 // for tvSubDsec() which should be in SquidTime.h
28 #include "util.h"
29 
30 /************************************************************************
31 
32  SQUID MIB Implementation
33 
34  ************************************************************************/
35 
36 /*
37  * cacheSystem group
38  */
39 
42 {
43  variable_list *Answer = NULL;
44  MemBuf tmp;
45  debugs(49, 5, "snmp_sysFn: Processing request:" << snmpDebugOid(Var->name, Var->name_length, tmp));
46  *ErrP = SNMP_ERR_NOERROR;
47 
48  switch (Var->name[LEN_SQ_SYS]) {
49 
50  case SYSVMSIZ:
51  Answer = snmp_var_new_integer(Var->name, Var->name_length,
52  mem_node::StoreMemSize() >> 10,
53  ASN_INTEGER);
54  break;
55 
56  case SYSSTOR:
57  Answer = snmp_var_new_integer(Var->name, Var->name_length,
58  Store::Root().currentSize() >> 10,
59  ASN_INTEGER);
60  break;
61 
62  case SYS_UPTIME:
63  Answer = snmp_var_new_integer(Var->name, Var->name_length,
64  (int)(tvSubDsec(squid_start, current_time) * 100),
66  break;
67 
68  default:
69  *ErrP = SNMP_ERR_NOSUCHNAME;
70  break;
71  }
72 
73  return Answer;
74 }
75 
76 /*
77  * cacheConfig group
78  */
81 {
82  variable_list *Answer = NULL;
83  const char *cp = NULL;
84  debugs(49, 5, "snmp_confFn: Processing request with magic " << Var->name[8] << "!");
85  *ErrP = SNMP_ERR_NOERROR;
86 
87  switch (Var->name[LEN_SQ_CONF]) {
88 
89  case CONF_ADMIN:
90  Answer = snmp_var_new(Var->name, Var->name_length);
91  Answer->type = ASN_OCTET_STR;
92  Answer->val_len = strlen(Config.adminEmail);
93  Answer->val.string = (u_char *) xstrdup(Config.adminEmail);
94  break;
95 
96  case CONF_VERSION:
97  Answer = snmp_var_new(Var->name, Var->name_length);
98  Answer->type = ASN_OCTET_STR;
99  Answer->val_len = strlen(APP_SHORTNAME);
100  Answer->val.string = (u_char *) xstrdup(APP_SHORTNAME);
101  break;
102 
103  case CONF_VERSION_ID:
104  Answer = snmp_var_new(Var->name, Var->name_length);
105  Answer->type = ASN_OCTET_STR;
106  Answer->val_len = strlen(VERSION);
107  Answer->val.string = (u_char *) xstrdup(VERSION);
108  break;
109 
110  case CONF_STORAGE:
111 
112  switch (Var->name[LEN_SQ_CONF + 1]) {
113 
114  case CONF_ST_MMAXSZ:
115  Answer = snmp_var_new_integer(Var->name, Var->name_length,
116  (snint) (Config.memMaxSize >> 20),
117  ASN_INTEGER);
118  break;
119 
120  case CONF_ST_SWMAXSZ:
121  Answer = snmp_var_new_integer(Var->name, Var->name_length,
122  (snint) (Store::Root().maxSize() >> 20),
123  ASN_INTEGER);
124  break;
125 
126  case CONF_ST_SWHIWM:
127  Answer = snmp_var_new_integer(Var->name, Var->name_length,
129  ASN_INTEGER);
130  break;
131 
132  case CONF_ST_SWLOWM:
133  Answer = snmp_var_new_integer(Var->name, Var->name_length,
135  ASN_INTEGER);
136  break;
137 
138  default:
139  *ErrP = SNMP_ERR_NOSUCHNAME;
140  break;
141  }
142 
143  break;
144 
145  case CONF_LOG_FAC:
146  Answer = snmp_var_new(Var->name, Var->name_length);
147 
148  if (!(cp = Debug::debugOptions))
149  cp = "None";
150 
151  Answer->type = ASN_OCTET_STR;
152 
153  Answer->val_len = strlen(cp);
154 
155  Answer->val.string = (u_char *) xstrdup(cp);
156 
157  break;
158 
159  case CONF_UNIQNAME:
160  Answer = snmp_var_new(Var->name, Var->name_length);
161 
162  cp = uniqueHostname();
163 
164  Answer->type = ASN_OCTET_STR;
165 
166  Answer->val_len = strlen(cp);
167 
168  Answer->val.string = (u_char *) xstrdup(cp);
169 
170  break;
171 
172  default:
173  *ErrP = SNMP_ERR_NOSUCHNAME;
174 
175  break;
176  }
177 
178  return Answer;
179 }
180 
181 /*
182  * cacheMesh group
183  * - cachePeerTable
184  */
187 {
188  variable_list *Answer = NULL;
189 
190  Ip::Address laddr;
191  char *cp = NULL;
192  CachePeer *p = NULL;
193  int cnt = 0;
194  debugs(49, 5, "snmp_meshPtblFn: peer " << Var->name[LEN_SQ_MESH + 3] << " requested!");
195  *ErrP = SNMP_ERR_NOERROR;
196 
197  u_int index = Var->name[LEN_SQ_MESH + 3] ;
198  for (p = Config.peers; p != NULL; p = p->next, ++cnt) {
199  if (p->index == index) {
200  laddr = p->in_addr ;
201  break;
202  }
203  }
204 
205  if (p == NULL) {
206  *ErrP = SNMP_ERR_NOSUCHNAME;
207  return NULL;
208  }
209 
210  switch (Var->name[LEN_SQ_MESH + 2]) {
211  case MESH_PTBL_INDEX: { // XXX: Should be visible?
212  Answer = snmp_var_new_integer(Var->name, Var->name_length,
213  (snint)p->index, SMI_INTEGER);
214  }
215  break;
216 
217  case MESH_PTBL_NAME:
218  cp = p->host;
219  Answer = snmp_var_new(Var->name, Var->name_length);
220  Answer->type = ASN_OCTET_STR;
221  Answer->val_len = strlen(cp);
222  Answer->val.string = (u_char *) xstrdup(cp);
223 
224  break;
225 
226  case MESH_PTBL_ADDR_TYPE: {
227  int ival;
229  Answer = snmp_var_new_integer(Var->name, Var->name_length,
230  ival, SMI_INTEGER);
231  }
232  break;
233  case MESH_PTBL_ADDR: {
234  Answer = snmp_var_new(Var->name, Var->name_length);
235  // InetAddress doesn't have its own ASN.1 type,
236  // like IpAddr does (SMI_IPADDRESS)
237  // See: rfc4001.txt
238  Answer->type = ASN_OCTET_STR;
239  char host[MAX_IPSTRLEN];
240  laddr.toStr(host,MAX_IPSTRLEN);
241  Answer->val_len = strlen(host);
242  Answer->val.string = (u_char *) xstrdup(host);
243  }
244  break;
245 
246  case MESH_PTBL_HTTP:
247  Answer = snmp_var_new_integer(Var->name, Var->name_length,
248  (snint) p->http_port,
249  ASN_INTEGER);
250  break;
251 
252  case MESH_PTBL_ICP:
253  Answer = snmp_var_new_integer(Var->name, Var->name_length,
254  (snint) p->icp.port,
255  ASN_INTEGER);
256  break;
257 
258  case MESH_PTBL_TYPE:
259  Answer = snmp_var_new_integer(Var->name, Var->name_length,
260  (snint) p->type,
261  ASN_INTEGER);
262  break;
263 
264  case MESH_PTBL_STATE:
265  Answer = snmp_var_new_integer(Var->name, Var->name_length,
266  (snint) neighborUp(p),
267  ASN_INTEGER);
268  break;
269 
270  case MESH_PTBL_SENT:
271  Answer = snmp_var_new_integer(Var->name, Var->name_length,
272  p->stats.pings_sent,
273  SMI_COUNTER32);
274  break;
275 
276  case MESH_PTBL_PACKED:
277  Answer = snmp_var_new_integer(Var->name, Var->name_length,
278  p->stats.pings_acked,
279  SMI_COUNTER32);
280  break;
281 
282  case MESH_PTBL_FETCHES:
283  Answer = snmp_var_new_integer(Var->name, Var->name_length,
284  p->stats.fetches,
285  SMI_COUNTER32);
286  break;
287 
288  case MESH_PTBL_RTT:
289  Answer = snmp_var_new_integer(Var->name, Var->name_length,
290  p->stats.rtt,
291  ASN_INTEGER);
292  break;
293 
294  case MESH_PTBL_IGN:
295  Answer = snmp_var_new_integer(Var->name, Var->name_length,
297  SMI_COUNTER32);
298  break;
299 
300  case MESH_PTBL_KEEPAL_S:
301  Answer = snmp_var_new_integer(Var->name, Var->name_length,
303  SMI_COUNTER32);
304  break;
305 
306  case MESH_PTBL_KEEPAL_R:
307  Answer = snmp_var_new_integer(Var->name, Var->name_length,
309  SMI_COUNTER32);
310  break;
311 
312  default:
313  *ErrP = SNMP_ERR_NOSUCHNAME;
314  break;
315  }
316 
317  return Answer;
318 }
319 
322 {
323  variable_list *Answer = NULL;
324 
325  static struct rusage rusage;
326  debugs(49, 5, "snmp_prfSysFn: Processing request with magic " << Var->name[LEN_SQ_PRF + 1] << "!");
327  *ErrP = SNMP_ERR_NOERROR;
328 
329  switch (Var->name[LEN_SQ_PRF + 1]) {
330 
331  case PERF_SYS_PF:
333  Answer = snmp_var_new_integer(Var->name, Var->name_length,
335  SMI_COUNTER32);
336  break;
337 
338  case PERF_SYS_NUMR:
339  Answer = snmp_var_new_integer(Var->name, Var->name_length,
341  SMI_COUNTER32);
342  break;
343 
344  case PERF_SYS_MEMUSAGE:
345  Answer = snmp_var_new_integer(Var->name, Var->name_length,
346  (snint) statMemoryAccounted() >> 10,
347  ASN_INTEGER);
348  break;
349 
350  case PERF_SYS_CPUTIME:
352  Answer = snmp_var_new_integer(Var->name, Var->name_length,
354  ASN_INTEGER);
355  break;
356 
357  case PERF_SYS_CPUUSAGE:
359  Answer = snmp_var_new_integer(Var->name, Var->name_length,
361  ASN_INTEGER);
362  break;
363 
364  case PERF_SYS_MAXRESSZ:
366  Answer = snmp_var_new_integer(Var->name, Var->name_length,
368  ASN_INTEGER);
369  break;
370 
371  case PERF_SYS_CURLRUEXP:
372  /* No global LRU info anymore */
373  Answer = snmp_var_new_integer(Var->name, Var->name_length,
374  0,
375  SMI_TIMETICKS);
376  break;
377 
378  case PERF_SYS_CURUNLREQ:
379  Answer = snmp_var_new_integer(Var->name, Var->name_length,
381  SMI_GAUGE32);
382  break;
383 
385  Answer = snmp_var_new_integer(Var->name, Var->name_length,
387  SMI_GAUGE32);
388  break;
389 
391  Answer = snmp_var_new_integer(Var->name, Var->name_length,
392  (snint) RESERVED_FD,
393  SMI_GAUGE32);
394  break;
395 
396  case PERF_SYS_CURUSED_FD:
397  Answer = snmp_var_new_integer(Var->name, Var->name_length,
398  (snint) Number_FD,
399  SMI_GAUGE32);
400  break;
401 
402  case PERF_SYS_CURMAX_FD:
403  Answer = snmp_var_new_integer(Var->name, Var->name_length,
404  (snint) Biggest_FD,
405  SMI_GAUGE32);
406  break;
407 
408  case PERF_SYS_NUMOBJCNT:
409  Answer = snmp_var_new_integer(Var->name, Var->name_length,
411  SMI_GAUGE32);
412  break;
413 
414  default:
415  *ErrP = SNMP_ERR_NOSUCHNAME;
416  break;
417  }
418 
419  return Answer;
420 }
421 
424 {
425  variable_list *Answer = NULL;
426  static StatCounters *f = NULL;
427  static StatCounters *l = NULL;
428  double x;
429  int minutes;
430  debugs(49, 5, "snmp_prfProtoFn: Processing request with magic " << Var->name[LEN_SQ_PRF] << "!");
431  *ErrP = SNMP_ERR_NOERROR;
432 
433  switch (Var->name[LEN_SQ_PRF + 1]) {
434 
435  case PERF_PROTOSTAT_AGGR: /* cacheProtoAggregateStats */
436 
437  switch (Var->name[LEN_SQ_PRF + 2]) {
438 
440  Answer = snmp_var_new_integer(Var->name, Var->name_length,
442  SMI_COUNTER32);
443  break;
444 
446  Answer = snmp_var_new_integer(Var->name, Var->name_length,
448  SMI_COUNTER32);
449  break;
450 
452  Answer = snmp_var_new_integer(Var->name, Var->name_length,
454  SMI_COUNTER32);
455  break;
456 
458  Answer = snmp_var_new_integer(Var->name, Var->name_length,
460  SMI_COUNTER32);
461  break;
462 
464  Answer = snmp_var_new_integer(Var->name, Var->name_length,
466  SMI_COUNTER32);
467  break;
468 
470  Answer = snmp_var_new_integer(Var->name, Var->name_length,
472  SMI_COUNTER32);
473  break;
474 
476  Answer = snmp_var_new_integer(Var->name, Var->name_length,
478  SMI_COUNTER32);
479  break;
480 
482  Answer = snmp_var_new_integer(Var->name, Var->name_length,
484  SMI_COUNTER32);
485  break;
486 
488  Answer = snmp_var_new_integer(Var->name, Var->name_length,
490  SMI_COUNTER32);
491  break;
492 
494  Answer = snmp_var_new_integer(Var->name, Var->name_length,
495  (snint) statCounter.server.all.requests,
496  SMI_INTEGER);
497  break;
498 
500  Answer = snmp_var_new_integer(Var->name, Var->name_length,
501  (snint) statCounter.server.all.errors,
502  SMI_INTEGER);
503  break;
504 
506  Answer = snmp_var_new_integer(Var->name, Var->name_length,
507  (snint) statCounter.server.all.kbytes_in.kb,
508  SMI_COUNTER32);
509  break;
510 
512  Answer = snmp_var_new_integer(Var->name, Var->name_length,
513  (snint) statCounter.server.all.kbytes_out.kb,
514  SMI_COUNTER32);
515  break;
516 
518  Answer = snmp_var_new_integer(Var->name, Var->name_length,
519  (snint) Store::Root().currentSize() >> 10,
520  SMI_GAUGE32);
521  break;
522 
524  Answer = snmp_var_new_integer(Var->name, Var->name_length,
526  SMI_GAUGE32);
527  break;
528 
529  default:
530  *ErrP = SNMP_ERR_NOSUCHNAME;
531  break;
532  }
533 
534  return Answer;
535 
537 
538  if (Var->name_length == LEN_SQ_PRF + 5)
539  minutes = Var->name[LEN_SQ_PRF + 4];
540  else
541  break;
542 
543  if ((minutes < 1) || (minutes > 60))
544  break;
545 
546  f = snmpStatGet(0);
547 
548  l = snmpStatGet(minutes);
549 
550  debugs(49, 8, "median: min= " << minutes << ", " << Var->name[LEN_SQ_PRF + 3] << " l= " << l << " , f = " << f);
551  debugs(49, 8, "median: l= " << l << " , f = " << f);
552 
553  switch (Var->name[LEN_SQ_PRF + 3]) {
554 
555  case PERF_MEDIAN_TIME:
556  x = minutes;
557  break;
558 
562  break;
563 
567  break;
568 
569  case PERF_MEDIAN_HTTP_NM:
572  break;
573 
577  break;
578 
581  break;
582 
585  break;
586 
587  case PERF_MEDIAN_DNS:
589  break;
590 
591  case PERF_MEDIAN_RHR:
592  x = statRequestHitRatio(minutes);
593  break;
594 
595  case PERF_MEDIAN_BHR:
596  x = statByteHitRatio(minutes);
597  break;
598 
599  case PERF_MEDIAN_HTTP_NH:
602  break;
603 
604  default:
605  *ErrP = SNMP_ERR_NOSUCHNAME;
606  return NULL;
607  }
608 
609  return snmp_var_new_integer(Var->name, Var->name_length,
610  (snint) x,
611  SMI_INTEGER);
612  }
613 
614  *ErrP = SNMP_ERR_NOSUCHNAME;
615  return NULL;
616 }
617 
@ MESH_PTBL_RTT
Definition: cache_snmp.h:247
static char * debugOptions
Definition: Debug.h:80
@ PERF_SYS_CPUUSAGE
Definition: cache_snmp.h:117
static size_t StoreMemSize()
Definition: mem_node.cc:61
struct timeval squid_start
struct StatCounters::@130::@140 all
#define SMI_TIMETICKS
Definition: snmp_vars.h:79
struct StatCounters::@131 icp
const char * snmpDebugOid(oid *Name, snint Len, MemBuf &outbuf)
Definition: snmp_core.cc:1052
const char * uniqueHostname(void)
Definition: tools.cc:492
@ MESH_PTBL_HTTP
Definition: cache_snmp.h:240
int fetches
Definition: CachePeer.h:48
struct SquidConfig::@96 Swap
@ 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:1771
@ 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
SQUIDCEXTERN double tvSubDsec(struct timeval, struct timeval)
Definition: util.c:46
@ PERF_SYS_CURMAX_FD
Definition: cache_snmp.h:125
size_t memMaxSize
Definition: SquidConfig.h:88
#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
@ 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
struct StatCounters::@133 unlink
variable_list * snmp_confFn(variable_list *Var, snint *ErrP)
Definition: snmp_agent.cc:80
@ PERF_PROTOSTAT_AGGR_HTTP_REQ
Definition: cache_snmp.h:140
int highWaterMark
Definition: SquidConfig.h:82
double statHistDeltaMedian(const StatHist &A, const StatHist &B)
Definition: StatHist.cc:93
@ 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:802
size_t kb
Definition: ByteCounter.h:25
ByteCounter kbytes_sent
Definition: StatCounters.h:76
int name_length
Definition: snmp_vars.h:71
@ 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:23
int pings_acked
Definition: CachePeer.h:47
oid * name
Definition: snmp_vars.h:70
variable_list * snmp_prfProtoFn(variable_list *Var, snint *ErrP)
Definition: snmp_agent.cc:423
@ 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
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:112
#define LEN_SQ_SYS
Definition: cache_snmp.h:43
@ CONF_VERSION
Definition: cache_snmp.h:73
#define SMI_INTEGER
Definition: snmp_vars.h:71
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Debug.h:128
int rusage_pagefaults(struct rusage *r)
Definition: tools.cc:264
@ CONF_ST_SWMAXSZ
Definition: cache_snmp.h:90
@ MESH_PTBL_ADDR
Definition: cache_snmp.h:239
@ MESH_PTBL_ICP
Definition: cache_snmp.h:241
struct IoStats::@81 Http
@ PERF_MEDIAN_HTTP_MISS
Definition: cache_snmp.h:163
variable_list * snmp_meshPtblFn(variable_list *Var, snint *ErrP)
Definition: snmp_agent.cc:186
@ PERF_PROTOSTAT_AGGR_CURSWAP
Definition: cache_snmp.h:153
u_char * string
Definition: snmp_vars.h:75
Definition: MemBuf.h:23
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:154
char * adminEmail
Definition: SquidConfig.h:189
@ 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:197
StatHist missSvcTime
Definition: StatCounters.h:48
u_char type
Definition: snmp_vars.h:72
@ 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:170
@ 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:83
virtual uint64_t currentSize() const override
current size
Definition: Controller.cc:177
struct StatCounters::@130 server
@ PERF_MEDIAN_BHR
Definition: cache_snmp.h:170
virtual uint64_t maxSize() const override
Definition: Controller.cc:163
int rusage_maxrss(struct rusage *r)
Definition: tools.cc:243
double rusage_cputime(struct rusage *r)
Definition: tools.cc:228
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
char * host
Definition: CachePeer.h:40
variable_list * snmp_sysFn(variable_list *Var, snint *ErrP)
Definition: snmp_agent.cc:41
struct timeval current_time
Definition: stub_time.cc:15
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
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:1155
StatCounters * snmpStatGet(int minutes)
Definition: stat.cc:1720
CachePeer * peers
Definition: SquidConfig.h:250
@ 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:1741
@ 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
struct StatCounters::@129 client_http
variable_list * snmp_prfSysFn(variable_list *Var, snint *ErrP)
Definition: snmp_agent.cc:321
struct StatCounters::@134 dns
@ 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
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
struct CachePeer::@29 stats
@ 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:938

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors