#include "squid.h"
#include "cache_snmp.h"
#include "CachePeer.h"
#include "CachePeers.h"
#include "globals.h"
#include "mem/Meter.h"
#include "mem/Stats.h"
#include "mem_node.h"
#include "neighbors.h"
#include "snmp_agent.h"
#include "snmp_core.h"
#include "SquidConfig.h"
#include "SquidMath.h"
#include "stat.h"
#include "StatCounters.h"
#include "StatHist.h"
#include "Store.h"
#include "tools.h"
#include "util.h"
Go to the source code of this file.
Functions | |
variable_list * | snmp_sysFn (variable_list *Var, snint *ErrP) |
variable_list * | snmp_confFn (variable_list *Var, snint *ErrP) |
variable_list * | snmp_meshPtblFn (variable_list *Var, snint *ErrP) |
variable_list * | snmp_prfSysFn (variable_list *Var, snint *ErrP) |
variable_list * | snmp_prfProtoFn (variable_list *Var, snint *ErrP) |
Function Documentation
◆ snmp_confFn()
variable_list * snmp_confFn | ( | variable_list * | Var, |
snint * | ErrP | ||
) |
Definition at line 81 of file snmp_agent.cc.
References SquidConfig::adminEmail, APP_SHORTNAME, ASN_INTEGER, ASN_OCTET_STR, CONF_ADMIN, CONF_LOG_FAC, CONF_ST_MMAXSZ, CONF_ST_SWHIWM, CONF_ST_SWLOWM, CONF_ST_SWMAXSZ, CONF_STORAGE, CONF_UNIQNAME, CONF_VERSION, CONF_VERSION_ID, Config, Debug::debugOptions, debugs, SquidConfig::highWaterMark, LEN_SQ_CONF, SquidConfig::lowWaterMark, Store::Controller::maxSize(), SquidConfig::memMaxSize, variable_list::name, variable_list::name_length, Store::Root(), SNMP_ERR_NOERROR, SNMP_ERR_NOSUCHNAME, snmp_var_new(), snmp_var_new_integer(), variable_list::string, SquidConfig::Swap, variable_list::type, uniqueHostname(), variable_list::val, variable_list::val_len, VERSION, and xstrdup.
Referenced by snmpInit().
◆ snmp_meshPtblFn()
variable_list * snmp_meshPtblFn | ( | variable_list * | Var, |
snint * | ErrP | ||
) |
Definition at line 187 of file snmp_agent.cc.
References ASN_INTEGER, ASN_OCTET_STR, CurrentCachePeers(), debugs, CachePeer::fetches, CachePeer::host, CachePeer::http_port, CachePeer::icp, CachePeer::ignored_replies, CachePeer::index, INETADDRESSTYPE_IPV4, INETADDRESSTYPE_IPV6, Ip::Address::isIPv4(), LEN_SQ_MESH, MAX_IPSTRLEN, MESH_PTBL_ADDR, MESH_PTBL_ADDR_TYPE, MESH_PTBL_FETCHES, MESH_PTBL_HTTP, MESH_PTBL_ICP, MESH_PTBL_IGN, MESH_PTBL_INDEX, MESH_PTBL_KEEPAL_R, MESH_PTBL_KEEPAL_S, MESH_PTBL_NAME, MESH_PTBL_PACKED, MESH_PTBL_RTT, MESH_PTBL_SENT, MESH_PTBL_STATE, MESH_PTBL_TYPE, CachePeer::n_keepalives_recv, CachePeer::n_keepalives_sent, variable_list::name, variable_list::name_length, neighborUp(), CachePeer::pings_acked, CachePeer::pings_sent, CachePeer::icp_::port, CachePeer::rtt, SMI_COUNTER32, SMI_INTEGER, SNMP_ERR_NOERROR, SNMP_ERR_NOSUCHNAME, snmp_var_new(), snmp_var_new_integer(), CachePeer::stats, variable_list::string, Ip::Address::toStr(), variable_list::type, CachePeer::type, variable_list::val, variable_list::val_len, and xstrdup.
Referenced by snmpInit().
◆ snmp_prfProtoFn()
variable_list * snmp_prfProtoFn | ( | variable_list * | Var, |
snint * | ErrP | ||
) |
Definition at line 427 of file snmp_agent.cc.
References StatCounters::all, StatCounters::allSvcTime, StatCounters::client_http, StatCounters::clients, Store::Controller::currentSize(), debugs, StatCounters::dns, StatCounters::errors, StatCounters::hits, StatCounters::hitSvcTime, StatCounters::icp, ByteCounter::kb, StatCounters::kbytes_in, StatCounters::kbytes_out, StatCounters::kbytes_recv, StatCounters::kbytes_sent, LEN_SQ_PRF, StatCounters::missSvcTime, variable_list::name, variable_list::name_length, StatCounters::nearHitSvcTime, StatCounters::nearMissSvcTime, PERF_MEDIAN_BHR, PERF_MEDIAN_DNS, PERF_MEDIAN_HTTP_ALL, PERF_MEDIAN_HTTP_HIT, PERF_MEDIAN_HTTP_MISS, PERF_MEDIAN_HTTP_NH, PERF_MEDIAN_HTTP_NM, PERF_MEDIAN_ICP_QUERY, PERF_MEDIAN_ICP_REPLY, PERF_MEDIAN_RHR, PERF_MEDIAN_TIME, PERF_PROTOSTAT_AGGR, PERF_PROTOSTAT_AGGR_CLIENTS, PERF_PROTOSTAT_AGGR_CURSWAP, PERF_PROTOSTAT_AGGR_ERRORS, PERF_PROTOSTAT_AGGR_HTTP_ERRORS, PERF_PROTOSTAT_AGGR_HTTP_HITS, PERF_PROTOSTAT_AGGR_HTTP_KBYTES_IN, PERF_PROTOSTAT_AGGR_HTTP_KBYTES_OUT, PERF_PROTOSTAT_AGGR_HTTP_REQ, PERF_PROTOSTAT_AGGR_ICP_R, PERF_PROTOSTAT_AGGR_ICP_RKB, PERF_PROTOSTAT_AGGR_ICP_S, PERF_PROTOSTAT_AGGR_ICP_SKB, PERF_PROTOSTAT_AGGR_KBYTES_IN, PERF_PROTOSTAT_AGGR_KBYTES_OUT, PERF_PROTOSTAT_AGGR_REQ, PERF_PROTOSTAT_MEDIAN, StatCounters::pkts_recv, StatCounters::pkts_sent, StatCounters::querySvcTime, StatCounters::replySvcTime, StatCounters::requests, Store::Root(), StatCounters::server, SMI_COUNTER32, SMI_GAUGE32, SMI_INTEGER, SNMP_ERR_NOERROR, SNMP_ERR_NOSUCHNAME, snmp_var_new_integer(), snmpStatGet(), statByteHitRatio(), statCounter, statHistDeltaMedian(), statRequestHitRatio(), and StatCounters::svcTime.
Referenced by snmpInit().
◆ snmp_prfSysFn()
variable_list * snmp_prfSysFn | ( | variable_list * | Var, |
snint * | ErrP | ||
) |
Definition at line 322 of file snmp_agent.cc.
References ASN_INTEGER, Biggest_FD, current_time, debugs, Math::doublePercent(), Mem::GlobalStats(), IoStats::Http, StoreEntry::inUseCount(), IOStats, LEN_SQ_PRF, variable_list::name, variable_list::name_length, Number_FD, PERF_SYS_CPUTIME, PERF_SYS_CPUUSAGE, PERF_SYS_CURLRUEXP, PERF_SYS_CURMAX_FD, PERF_SYS_CURRESERVED_FD, PERF_SYS_CURUNLREQ, PERF_SYS_CURUNUSED_FD, PERF_SYS_CURUSED_FD, PERF_SYS_MAXRESSZ, PERF_SYS_MEMUSAGE, PERF_SYS_NUMOBJCNT, PERF_SYS_NUMR, PERF_SYS_PF, IoStats::reads, StatCounters::requests, RESERVED_FD, rusage_cputime(), rusage_maxrss(), rusage_pagefaults(), SMI_COUNTER32, SMI_GAUGE32, SMI_TIMETICKS, SNMP_ERR_NOERROR, SNMP_ERR_NOSUCHNAME, snmp_var_new_integer(), squid_getrusage(), Squid_MaxFD, squid_start, statCounter, Ping::stats, tvSubDsec(), and StatCounters::unlink.
Referenced by snmpInit().
◆ snmp_sysFn()
variable_list * snmp_sysFn | ( | variable_list * | Var, |
snint * | ErrP | ||
) |
Definition at line 42 of file snmp_agent.cc.
References ASN_INTEGER, current_time, Store::Controller::currentSize(), debugs, LEN_SQ_SYS, variable_list::name, variable_list::name_length, Store::Root(), SMI_TIMETICKS, SNMP_ERR_NOERROR, SNMP_ERR_NOSUCHNAME, snmp_var_new_integer(), snmpDebugOid(), squid_start, mem_node::StoreMemSize(), SYS_UPTIME, SYSSTOR, SYSVMSIZ, and tvSubDsec().
Referenced by snmpInit().