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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors