stat.cc File Reference
#include "squid.h"
#include "CacheDigest.h"
#include "CachePeer.h"
#include "client_side.h"
#include "client_side_request.h"
#include "comm/Connection.h"
#include "comm/Loops.h"
#include "event.h"
#include "fde.h"
#include "format/Token.h"
#include "globals.h"
#include "http/Stream.h"
#include "HttpRequest.h"
#include "IoStats.h"
#include "mem/Pool.h"
#include "mem_node.h"
#include "MemBuf.h"
#include "MemObject.h"
#include "mgr/CountersAction.h"
#include "mgr/FunAction.h"
#include "mgr/InfoAction.h"
#include "mgr/IntervalAction.h"
#include "mgr/IoAction.h"
#include "mgr/Registration.h"
#include "mgr/ServiceTimesAction.h"
#include "neighbors.h"
#include "PeerDigest.h"
#include "SquidConfig.h"
#include "SquidMath.h"
#include "SquidTime.h"
#include "stat.h"
#include "StatCounters.h"
#include "Store.h"
#include "store_digest.h"
#include "StoreClient.h"
#include "tools.h"
#include "util.h"
#include "auth/UserRequest.h"
#include "DelayId.h"
#include "ssl/support.h"
#include "comm.h"
#include "StoreSearch.h"
Include dependency graph for stat.cc:

Go to the source code of this file.

Classes

class  StatObjectsState
 

Macros

#define DEBUG_OPENFD   1
 
#define XAVG(X)   (dt ? (double) (f->X - l->X) / dt : 0.0)
 

Typedefs

typedef int STOBJFLT (const StoreEntry *)
 

Functions

static const char * describeStatuses (const StoreEntry *)
 
static void statAvgTick (void *notused)
 
static void statAvgDump (StoreEntry *, int minutes, int hours)
 
static double statPctileSvc (double, int, int)
 
static void statStoreEntry (MemBuf *mb, StoreEntry *e)
 
static double statCPUUsage (int minutes)
 
void GetAvgStat (Mgr::IntervalActionData &stats, int minutes, int hours)
 
void DumpAvgStat (Mgr::IntervalActionData &stats, StoreEntry *sentry)
 
void GetInfo (Mgr::InfoActionData &stats)
 
void DumpInfo (Mgr::InfoActionData &stats, StoreEntry *sentry)
 
void DumpMallocStatistics (StoreEntry *sentry)
 
void GetCountersStats (Mgr::CountersActionData &stats)
 
void DumpCountersStats (Mgr::CountersActionData &stats, StoreEntry *sentry)
 
void GetServiceTimesStats (Mgr::ServiceTimesActionData &stats)
 
void DumpServiceTimesStats (Mgr::ServiceTimesActionData &stats, StoreEntry *sentry)
 
void GetIoStats (Mgr::IoActionData &stats)
 
void DumpIoStats (Mgr::IoActionData &stats, StoreEntry *sentry)
 
static void statUtilization (StoreEntry *e)
 
const char * storeEntryFlags (const StoreEntry *entry)
 
static void statObjects (void *data)
 
static void statObjectsStart (StoreEntry *sentry, STOBJFLT *filter)
 
static void stat_objects_get (StoreEntry *sentry)
 
static int statObjectsVmFilter (const StoreEntry *e)
 
static void stat_vmobjects_get (StoreEntry *sentry)
 
static int statObjectsOpenfdFilter (const StoreEntry *e)
 
static void statOpenfdObj (StoreEntry *sentry)
 
static void statRegisterWithCacheManager (void)
 
static void statCountersInitSpecial (StatCounters *C)
 
static void statCountersInit (StatCounters *C)
 
void statInit (void)
 
static void statCountersHistograms (StoreEntry *sentry)
 
static void statCountersDump (StoreEntry *sentry)
 
void statFreeMemory (void)
 
static void statPeerSelect (StoreEntry *sentry)
 
static void statDigestBlob (StoreEntry *sentry)
 
StatCounterssnmpStatGet (int minutes)
 
int stat5minClientRequests (void)
 
double statRequestHitRatio (int minutes)
 
double statRequestHitMemoryRatio (int minutes)
 
double statRequestHitDiskRatio (int minutes)
 
double statByteHitRatio (int minutes)
 
static void statClientRequests (StoreEntry *s)
 
int statMemoryAccounted (void)
 

Variables

static OBJH stat_objects_get
 
static OBJH stat_vmobjects_get
 
static OBJH statOpenfdObj
 
static EVH statObjects
 
static OBJH statCountersDump
 
static OBJH statPeerSelect
 
static OBJH statDigestBlob
 
static OBJH statUtilization
 
static OBJH statCountersHistograms
 
static OBJH statClientRequests
 
StatCounters CountHist [N_COUNT_HIST]
 
static int NCountHist = 0
 
static StatCounters CountHourHist [N_COUNT_HOUR_HIST]
 
static int NCountHourHist = 0
 
unsigned int mem_pool_alloc_calls
 
unsigned int mem_pool_free_calls
 

Macro Definition Documentation

#define DEBUG_OPENFD   1

Definition at line 66 of file stat.cc.

#define XAVG (   X)    (dt ? (double) (f->X - l->X) / dt : 0.0)

Definition at line 888 of file stat.cc.

Referenced by GetAvgStat().

Typedef Documentation

typedef int STOBJFLT(const StoreEntry *)

Definition at line 68 of file stat.cc.

Function Documentation

static const char * describeStatuses ( const StoreEntry entry)
static
void DumpAvgStat ( Mgr::IntervalActionData stats,
StoreEntry sentry 
)

Definition at line 1020 of file stat.cc.

References Mgr::IntervalActionData::aborted_requests, Mgr::IntervalActionData::average_select_fd_period, Mgr::IntervalActionData::client_http_all_median_svc_time, Mgr::IntervalActionData::client_http_errors, Mgr::IntervalActionData::client_http_hit_median_svc_time, Mgr::IntervalActionData::client_http_hits, Mgr::IntervalActionData::client_http_kbytes_in, Mgr::IntervalActionData::client_http_kbytes_out, Mgr::IntervalActionData::client_http_miss_median_svc_time, Mgr::IntervalActionData::client_http_nh_median_svc_time, Mgr::IntervalActionData::client_http_nm_median_svc_time, Mgr::IntervalActionData::client_http_requests, Mgr::IntervalActionData::count, Mgr::IntervalActionData::cpu_time, Mgr::IntervalActionData::dns_median_svc_time, Math::doublePercent(), Mgr::IntervalActionData::icp_kbytes_recv, Mgr::IntervalActionData::icp_kbytes_sent, Mgr::IntervalActionData::icp_pkts_recv, Mgr::IntervalActionData::icp_pkts_sent, Mgr::IntervalActionData::icp_q_kbytes_recv, Mgr::IntervalActionData::icp_q_kbytes_sent, Mgr::IntervalActionData::icp_queries_recv, Mgr::IntervalActionData::icp_queries_sent, Mgr::IntervalActionData::icp_query_median_svc_time, Mgr::IntervalActionData::icp_query_timeouts, Mgr::IntervalActionData::icp_r_kbytes_recv, Mgr::IntervalActionData::icp_r_kbytes_sent, Mgr::IntervalActionData::icp_replies_queued, Mgr::IntervalActionData::icp_replies_recv, Mgr::IntervalActionData::icp_replies_sent, Mgr::IntervalActionData::icp_reply_median_svc_time, Mgr::IntervalActionData::median_select_fds, mkrfc1123(), Mgr::IntervalActionData::page_faults, Mgr::IntervalActionData::sample_end_time, Mgr::IntervalActionData::sample_start_time, Mgr::IntervalActionData::select_fds, Mgr::IntervalActionData::select_loops, Mgr::IntervalActionData::server_all_errors, Mgr::IntervalActionData::server_all_kbytes_in, Mgr::IntervalActionData::server_all_kbytes_out, Mgr::IntervalActionData::server_all_requests, Mgr::IntervalActionData::server_ftp_errors, Mgr::IntervalActionData::server_ftp_kbytes_in, Mgr::IntervalActionData::server_ftp_kbytes_out, Mgr::IntervalActionData::server_ftp_requests, Mgr::IntervalActionData::server_http_errors, Mgr::IntervalActionData::server_http_kbytes_in, Mgr::IntervalActionData::server_http_kbytes_out, Mgr::IntervalActionData::server_http_requests, Mgr::IntervalActionData::server_other_errors, Mgr::IntervalActionData::server_other_kbytes_in, Mgr::IntervalActionData::server_other_kbytes_out, Mgr::IntervalActionData::server_other_requests, storeAppendPrintf(), Mgr::IntervalActionData::swap_files_cleaned, Mgr::IntervalActionData::swap_ins, Mgr::IntervalActionData::swap_outs, Mgr::IntervalActionData::syscalls_disk_closes, Mgr::IntervalActionData::syscalls_disk_opens, Mgr::IntervalActionData::syscalls_disk_reads, Mgr::IntervalActionData::syscalls_disk_seeks, Mgr::IntervalActionData::syscalls_disk_unlinks, Mgr::IntervalActionData::syscalls_disk_writes, Mgr::IntervalActionData::syscalls_selects, Mgr::IntervalActionData::syscalls_sock_accepts, Mgr::IntervalActionData::syscalls_sock_binds, Mgr::IntervalActionData::syscalls_sock_closes, Mgr::IntervalActionData::syscalls_sock_connects, Mgr::IntervalActionData::syscalls_sock_reads, Mgr::IntervalActionData::syscalls_sock_recvfroms, Mgr::IntervalActionData::syscalls_sock_sendtos, Mgr::IntervalActionData::syscalls_sock_sockets, Mgr::IntervalActionData::syscalls_sock_writes, Mgr::IntervalActionData::unlink_requests, and Mgr::IntervalActionData::wall_time.

Referenced by Mgr::IntervalAction::dump(), and statAvgDump().

void DumpCountersStats ( Mgr::CountersActionData stats,
StoreEntry sentry 
)

Definition at line 1442 of file stat.cc.

References Mgr::CountersActionData::aborted_requests, Mgr::CountersActionData::cd_kbytes_recv, Mgr::CountersActionData::cd_kbytes_sent, Mgr::CountersActionData::cd_local_memory, Mgr::CountersActionData::cd_memory, Mgr::CountersActionData::cd_msgs_recv, Mgr::CountersActionData::cd_msgs_sent, Mgr::CountersActionData::cd_times_used, Mgr::CountersActionData::client_http_errors, Mgr::CountersActionData::client_http_hit_kbytes_out, Mgr::CountersActionData::client_http_hits, Mgr::CountersActionData::client_http_kbytes_in, Mgr::CountersActionData::client_http_kbytes_out, Mgr::CountersActionData::client_http_requests, Mgr::CountersActionData::cpu_time, Mgr::CountersActionData::icp_kbytes_recv, Mgr::CountersActionData::icp_kbytes_sent, Mgr::CountersActionData::icp_pkts_recv, Mgr::CountersActionData::icp_pkts_sent, Mgr::CountersActionData::icp_q_kbytes_recv, Mgr::CountersActionData::icp_q_kbytes_sent, Mgr::CountersActionData::icp_queries_recv, Mgr::CountersActionData::icp_queries_sent, Mgr::CountersActionData::icp_query_timeouts, Mgr::CountersActionData::icp_r_kbytes_recv, Mgr::CountersActionData::icp_r_kbytes_sent, Mgr::CountersActionData::icp_replies_queued, Mgr::CountersActionData::icp_replies_recv, Mgr::CountersActionData::icp_replies_sent, Mgr::CountersActionData::icp_times_used, mkrfc1123(), Mgr::CountersActionData::page_faults, Mgr::CountersActionData::sample_time, Mgr::CountersActionData::select_loops, Mgr::CountersActionData::server_all_errors, Mgr::CountersActionData::server_all_kbytes_in, Mgr::CountersActionData::server_all_kbytes_out, Mgr::CountersActionData::server_all_requests, Mgr::CountersActionData::server_ftp_errors, Mgr::CountersActionData::server_ftp_kbytes_in, Mgr::CountersActionData::server_ftp_kbytes_out, Mgr::CountersActionData::server_ftp_requests, Mgr::CountersActionData::server_http_errors, Mgr::CountersActionData::server_http_kbytes_in, Mgr::CountersActionData::server_http_kbytes_out, Mgr::CountersActionData::server_http_requests, Mgr::CountersActionData::server_other_errors, Mgr::CountersActionData::server_other_kbytes_in, Mgr::CountersActionData::server_other_kbytes_out, Mgr::CountersActionData::server_other_requests, storeAppendPrintf(), Mgr::CountersActionData::swap_files_cleaned, Mgr::CountersActionData::swap_ins, Mgr::CountersActionData::swap_outs, Mgr::CountersActionData::unlink_requests, and Mgr::CountersActionData::wall_time.

Referenced by Mgr::CountersAction::dump(), and statCountersDump().

void DumpInfo ( Mgr::InfoActionData stats,
StoreEntry sentry 
)

Definition at line 581 of file stat.cc.

References APP_SHORTNAME, StoreEntry::append(), StoreInfoStats::Part::available(), Mgr::InfoActionData::avg_client_http_requests, Mgr::InfoActionData::avg_icp_messages, Mgr::InfoActionData::avg_loop_time, Mgr::InfoActionData::biggest_fd, Mgr::InfoActionData::byte_hit_ratio5, Mgr::InfoActionData::byte_hit_ratio60, Mgr::InfoActionData::cache_hits5, Mgr::InfoActionData::cache_hits60, Mgr::InfoActionData::cache_misses5, Mgr::InfoActionData::cache_misses60, StoreInfoStats::Part::capacity, SquidConfig::client_db, Mgr::InfoActionData::client_http_clients, Mgr::InfoActionData::client_http_requests, Config, StoreInfoStats::Part::count, Mgr::InfoActionData::count, Mgr::InfoActionData::cpu_time, Mgr::InfoActionData::cpu_usage, Mgr::InfoActionData::cpu_usage5, Mgr::InfoActionData::cpu_usage60, Mgr::InfoActionData::current_time, Mgr::InfoActionData::dns_lookups5, Mgr::InfoActionData::dns_lookups60, Math::doublePercent(), Mgr::InfoActionData::gb_freed_count, Mgr::InfoActionData::gb_saved_count, Mgr::InfoActionData::htcp_pkts_recv, Mgr::InfoActionData::htcp_pkts_sent, Mgr::InfoActionData::http_requests5, Mgr::InfoActionData::http_requests60, Mgr::InfoActionData::icp_pkts_recv, Mgr::InfoActionData::icp_pkts_sent, Mgr::InfoActionData::icp_queries5, Mgr::InfoActionData::icp_queries60, Mgr::InfoActionData::icp_replies_queued, Mgr::InfoActionData::max_fd, Mgr::InfoActionData::maxrss, StoreInfoStats::Part::meanObjectSize(), StoreInfoStats::mem, StoreInfoStats::mem_object_count, memPoolGetGlobalStats(), mkrfc1123(), Mgr::InfoActionData::near_hits5, Mgr::InfoActionData::near_hits60, Mgr::InfoActionData::not_modified_replies5, Mgr::InfoActionData::not_modified_replies60, Mgr::InfoActionData::num_fd_free, Mgr::InfoActionData::number_fd, SquidConfig::onoff, StoreInfoStats::Swap::open_disk_fd, Mgr::InfoActionData::opening_fd, Mgr::InfoActionData::page_faults, Mgr::InfoActionData::request_failure_ratio, Mgr::InfoActionData::request_hit_disk_ratio5, Mgr::InfoActionData::request_hit_disk_ratio60, Mgr::InfoActionData::request_hit_mem_ratio5, Mgr::InfoActionData::request_hit_mem_ratio60, Mgr::InfoActionData::request_hit_ratio5, Mgr::InfoActionData::request_hit_ratio60, Mgr::InfoActionData::reserved_fd, Mgr::InfoActionData::select_loops, service_name, StoreInfoStats::Part::size, Mgr::InfoActionData::squid_start, SQUIDSBUFPH, SQUIDSBUFPRINT, Mgr::InfoActionData::store, StoreInfoStats::store_entry_count, storeAppendPrintf(), StoreInfoStats::swap, Mgr::InfoActionData::total_accounted, Mgr::InfoActionData::unlink_requests, Mgr::InfoActionData::up_time, and version_string.

Referenced by Mgr::InfoAction::dump().

void DumpMallocStatistics ( StoreEntry sentry)

Definition at line 791 of file stat.cc.

References current_dtime, storeAppendPrintf(), xm_deltat, and xm_time.

Referenced by Mgr::InfoAction::dump().

void GetAvgStat ( Mgr::IntervalActionData stats,
int  minutes,
int  hours 
)

Definition at line 890 of file stat.cc.

References Mgr::IntervalActionData::aborted_requests, StatCounters::allSvcTime, assert, Mgr::IntervalActionData::average_select_fd_period, StatCounters::client_http, Mgr::IntervalActionData::client_http_all_median_svc_time, Mgr::IntervalActionData::client_http_errors, Mgr::IntervalActionData::client_http_hit_median_svc_time, Mgr::IntervalActionData::client_http_hits, Mgr::IntervalActionData::client_http_kbytes_in, Mgr::IntervalActionData::client_http_kbytes_out, Mgr::IntervalActionData::client_http_miss_median_svc_time, Mgr::IntervalActionData::client_http_nh_median_svc_time, Mgr::IntervalActionData::client_http_nm_median_svc_time, Mgr::IntervalActionData::client_http_requests, Mgr::IntervalActionData::cpu_time, StatCounters::cputime, DBG_IMPORTANT, debugs, StatCounters::dns, Mgr::IntervalActionData::dns_median_svc_time, StatCounters::hitSvcTime, StatCounters::icp, Mgr::IntervalActionData::icp_kbytes_recv, Mgr::IntervalActionData::icp_kbytes_sent, Mgr::IntervalActionData::icp_pkts_recv, Mgr::IntervalActionData::icp_pkts_sent, Mgr::IntervalActionData::icp_q_kbytes_recv, Mgr::IntervalActionData::icp_q_kbytes_sent, Mgr::IntervalActionData::icp_queries_recv, Mgr::IntervalActionData::icp_queries_sent, Mgr::IntervalActionData::icp_query_median_svc_time, Mgr::IntervalActionData::icp_query_timeouts, Mgr::IntervalActionData::icp_r_kbytes_recv, Mgr::IntervalActionData::icp_r_kbytes_sent, Mgr::IntervalActionData::icp_replies_queued, Mgr::IntervalActionData::icp_replies_recv, Mgr::IntervalActionData::icp_replies_sent, Mgr::IntervalActionData::icp_reply_median_svc_time, Mgr::IntervalActionData::median_select_fds, StatCounters::missSvcTime, N_COUNT_HIST, N_COUNT_HOUR_HIST, StatCounters::nearHitSvcTime, StatCounters::nearMissSvcTime, Mgr::IntervalActionData::page_faults, StatCounters::querySvcTime, StatCounters::replySvcTime, Mgr::IntervalActionData::sample_end_time, Mgr::IntervalActionData::sample_start_time, Mgr::IntervalActionData::select_fds, StatCounters::select_fds, StatCounters::select_fds_hist, Mgr::IntervalActionData::select_loops, StatCounters::select_time, server, Mgr::IntervalActionData::server_all_errors, Mgr::IntervalActionData::server_all_kbytes_in, Mgr::IntervalActionData::server_all_kbytes_out, Mgr::IntervalActionData::server_all_requests, Mgr::IntervalActionData::server_ftp_errors, Mgr::IntervalActionData::server_ftp_kbytes_in, Mgr::IntervalActionData::server_ftp_kbytes_out, Mgr::IntervalActionData::server_ftp_requests, Mgr::IntervalActionData::server_http_errors, Mgr::IntervalActionData::server_http_kbytes_in, Mgr::IntervalActionData::server_http_kbytes_out, Mgr::IntervalActionData::server_http_requests, Mgr::IntervalActionData::server_other_errors, Mgr::IntervalActionData::server_other_kbytes_in, Mgr::IntervalActionData::server_other_kbytes_out, Mgr::IntervalActionData::server_other_requests, statHistDeltaMedian(), StatCounters::svcTime, Mgr::IntervalActionData::swap_files_cleaned, Mgr::IntervalActionData::swap_ins, Mgr::IntervalActionData::swap_outs, Mgr::IntervalActionData::syscalls_disk_closes, Mgr::IntervalActionData::syscalls_disk_opens, Mgr::IntervalActionData::syscalls_disk_reads, Mgr::IntervalActionData::syscalls_disk_seeks, Mgr::IntervalActionData::syscalls_disk_unlinks, Mgr::IntervalActionData::syscalls_disk_writes, Mgr::IntervalActionData::syscalls_selects, Mgr::IntervalActionData::syscalls_sock_accepts, Mgr::IntervalActionData::syscalls_sock_binds, Mgr::IntervalActionData::syscalls_sock_closes, Mgr::IntervalActionData::syscalls_sock_connects, Mgr::IntervalActionData::syscalls_sock_reads, Mgr::IntervalActionData::syscalls_sock_recvfroms, Mgr::IntervalActionData::syscalls_sock_sendtos, Mgr::IntervalActionData::syscalls_sock_sockets, Mgr::IntervalActionData::syscalls_sock_writes, StatCounters::timestamp, tvSubDsec(), Mgr::IntervalActionData::unlink_requests, Mgr::IntervalActionData::wall_time, and XAVG.

Referenced by Mgr::IntervalAction::collect(), and statAvgDump().

void GetCountersStats ( Mgr::CountersActionData stats)

Definition at line 1366 of file stat.cc.

References Mgr::CountersActionData::aborted_requests, StatCounters::aborted_requests, StatCounters::all, StatCounters::cd, Mgr::CountersActionData::cd_kbytes_recv, Mgr::CountersActionData::cd_kbytes_sent, Mgr::CountersActionData::cd_local_memory, Mgr::CountersActionData::cd_memory, Mgr::CountersActionData::cd_msgs_recv, Mgr::CountersActionData::cd_msgs_sent, Mgr::CountersActionData::cd_times_used, StatCounters::client_http, Mgr::CountersActionData::client_http_errors, Mgr::CountersActionData::client_http_hit_kbytes_out, Mgr::CountersActionData::client_http_hits, Mgr::CountersActionData::client_http_kbytes_in, Mgr::CountersActionData::client_http_kbytes_out, Mgr::CountersActionData::client_http_requests, Mgr::CountersActionData::cpu_time, StatCounters::cputime, current_time, StatCounters::errors, StatCounters::files_cleaned, StatCounters::ftp, StatCounters::hit_kbytes_out, StatCounters::hits, StatCounters::http, StatCounters::icp, Mgr::CountersActionData::icp_kbytes_recv, Mgr::CountersActionData::icp_kbytes_sent, Mgr::CountersActionData::icp_pkts_recv, Mgr::CountersActionData::icp_pkts_sent, Mgr::CountersActionData::icp_q_kbytes_recv, Mgr::CountersActionData::icp_q_kbytes_sent, Mgr::CountersActionData::icp_queries_recv, Mgr::CountersActionData::icp_queries_sent, Mgr::CountersActionData::icp_query_timeouts, Mgr::CountersActionData::icp_r_kbytes_recv, Mgr::CountersActionData::icp_r_kbytes_sent, Mgr::CountersActionData::icp_replies_queued, Mgr::CountersActionData::icp_replies_recv, Mgr::CountersActionData::icp_replies_sent, Mgr::CountersActionData::icp_times_used, StatCounters::ins, ByteCounter::kb, StatCounters::kbytes_in, StatCounters::kbytes_out, StatCounters::kbytes_recv, StatCounters::kbytes_sent, CacheDigest::mask_size, StatCounters::memory, StatCounters::msgs_recv, StatCounters::msgs_sent, StatCounters::other, StatCounters::outs, Mgr::CountersActionData::page_faults, StatCounters::page_faults, StatCounters::pkts_recv, StatCounters::pkts_sent, StatCounters::q_kbytes_recv, StatCounters::q_kbytes_sent, StatCounters::queries_recv, StatCounters::queries_sent, StatCounters::query_timeouts, StatCounters::r_kbytes_recv, StatCounters::r_kbytes_sent, StatCounters::replies_queued, StatCounters::replies_recv, StatCounters::replies_sent, StatCounters::requests, rusage_cputime(), rusage_pagefaults(), Mgr::CountersActionData::sample_time, Mgr::CountersActionData::select_loops, StatCounters::select_loops, StatCounters::server, Mgr::CountersActionData::server_all_errors, Mgr::CountersActionData::server_all_kbytes_in, Mgr::CountersActionData::server_all_kbytes_out, Mgr::CountersActionData::server_all_requests, Mgr::CountersActionData::server_ftp_errors, Mgr::CountersActionData::server_ftp_kbytes_in, Mgr::CountersActionData::server_ftp_kbytes_out, Mgr::CountersActionData::server_ftp_requests, Mgr::CountersActionData::server_http_errors, Mgr::CountersActionData::server_http_kbytes_in, Mgr::CountersActionData::server_http_kbytes_out, Mgr::CountersActionData::server_http_requests, Mgr::CountersActionData::server_other_errors, Mgr::CountersActionData::server_other_kbytes_in, Mgr::CountersActionData::server_other_kbytes_out, Mgr::CountersActionData::server_other_requests, squid_getrusage(), statCounter, store_digest, StatCounters::swap, Mgr::CountersActionData::swap_files_cleaned, Mgr::CountersActionData::swap_ins, Mgr::CountersActionData::swap_outs, StatCounters::times_used, StatCounters::timestamp, tvSubDsec(), StatCounters::unlink, Mgr::CountersActionData::unlink_requests, and Mgr::CountersActionData::wall_time.

Referenced by Mgr::CountersAction::collect(), and statCountersDump().

void GetInfo ( Mgr::InfoActionData stats)

Definition at line 457 of file stat.cc.

References Mgr::InfoActionData::avg_client_http_requests, Mgr::InfoActionData::avg_icp_messages, Mgr::InfoActionData::avg_loop_time, Biggest_FD, Mgr::InfoActionData::biggest_fd, Mgr::InfoActionData::byte_hit_ratio5, Mgr::InfoActionData::byte_hit_ratio60, Mgr::InfoActionData::cache_hits5, Mgr::InfoActionData::cache_hits60, Mgr::InfoActionData::cache_misses5, Mgr::InfoActionData::cache_misses60, StatCounters::client_http, Mgr::InfoActionData::client_http_clients, Mgr::InfoActionData::client_http_requests, StatCounters::clients, mgb_t::count, Mgr::InfoActionData::cpu_time, Mgr::InfoActionData::cpu_usage, Mgr::InfoActionData::cpu_usage5, Mgr::InfoActionData::cpu_usage60, current_time, Mgr::InfoActionData::current_time, Mgr::InfoActionData::dns_lookups5, Mgr::InfoActionData::dns_lookups60, Math::doublePercent(), fdNFree(), MemPoolMeter::gb_freed, Mgr::InfoActionData::gb_freed_count, MemPoolMeter::gb_saved, Mgr::InfoActionData::gb_saved_count, Store::Controller::getStats(), StatCounters::htcp, Mgr::InfoActionData::htcp_pkts_recv, Mgr::InfoActionData::htcp_pkts_sent, Mgr::InfoActionData::http_requests5, Mgr::InfoActionData::http_requests60, StatCounters::icp, Mgr::InfoActionData::icp_pkts_recv, Mgr::InfoActionData::icp_pkts_sent, Mgr::InfoActionData::icp_queries5, Mgr::InfoActionData::icp_queries60, Mgr::InfoActionData::icp_replies_queued, Mgr::InfoActionData::max_fd, Mgr::InfoActionData::maxrss, memPoolGetGlobalStats(), Mgr::InfoActionData::near_hits5, Mgr::InfoActionData::near_hits60, Mgr::InfoActionData::not_modified_replies5, Mgr::InfoActionData::not_modified_replies60, Mgr::InfoActionData::num_fd_free, Number_FD, Mgr::InfoActionData::number_fd, Opening_FD, Mgr::InfoActionData::opening_fd, Mgr::InfoActionData::page_faults, PCTILE_DNS, PCTILE_HIT, PCTILE_HTTP, PCTILE_ICP_QUERY, PCTILE_MISS, PCTILE_NH, PCTILE_NM, StatCounters::pkts_recv, StatCounters::pkts_sent, StatCounters::replies_queued, Mgr::InfoActionData::request_failure_ratio, request_failure_ratio, Mgr::InfoActionData::request_hit_disk_ratio5, Mgr::InfoActionData::request_hit_disk_ratio60, Mgr::InfoActionData::request_hit_mem_ratio5, Mgr::InfoActionData::request_hit_mem_ratio60, Mgr::InfoActionData::request_hit_ratio5, Mgr::InfoActionData::request_hit_ratio60, StatCounters::requests, RESERVED_FD, Mgr::InfoActionData::reserved_fd, Store::Root(), rusage_cputime(), rusage_maxrss(), rusage_pagefaults(), Mgr::InfoActionData::select_loops, StatCounters::select_loops, squid_getrusage(), Squid_MaxFD, Mgr::InfoActionData::squid_start, squid_start, statByteHitRatio(), statCounter, statCPUUsage(), statMemoryAccounted(), statPctileSvc(), statRequestHitDiskRatio(), statRequestHitMemoryRatio(), statRequestHitRatio(), Mgr::InfoActionData::store, _MemPoolGlobalStats::TheMeter, Mgr::InfoActionData::total_accounted, tvSubDsec(), StatCounters::unlink, Mgr::InfoActionData::unlink_requests, and Mgr::InfoActionData::up_time.

Referenced by Mgr::InfoAction::collect().

StatCounters* snmpStatGet ( int  minutes)

Definition at line 1685 of file stat.cc.

Referenced by snmp_prfProtoFn().

int stat5minClientRequests ( void  )

Definition at line 1691 of file stat.cc.

References assert, StatCounters::client_http, N_COUNT_HIST, StatCounters::requests, and statCounter.

Referenced by peerRefreshDNS().

static void stat_objects_get ( StoreEntry sentry)
static

Definition at line 405 of file stat.cc.

References NULL, and statObjectsStart().

static void stat_vmobjects_get ( StoreEntry sentry)
static

Definition at line 417 of file stat.cc.

References statObjectsStart(), and statObjectsVmFilter().

static void statAvgDump ( StoreEntry sentry,
int  minutes,
int  hours 
)
static

Definition at line 881 of file stat.cc.

References DumpAvgStat(), GetAvgStat(), and Ping::stats.

Referenced by statDigestBlob(), and statUtilization().

static void statCountersDump ( StoreEntry sentry)
static

Definition at line 1358 of file stat.cc.

References DumpCountersStats(), GetCountersStats(), and Ping::stats.

static void statCountersInit ( StatCounters C)
static

Definition at line 1250 of file stat.cc.

References assert, and statCountersInitSpecial().

Referenced by statInit().

static double statCPUUsage ( int  minutes)
static

Definition at line 1698 of file stat.cc.

References assert, Math::doublePercent(), N_COUNT_HIST, and tvSubDsec().

Referenced by GetInfo().

static void statDigestBlob ( StoreEntry sentry)
static
void statFreeMemory ( void  )

Definition at line 1567 of file stat.cc.

References i, N_COUNT_HIST, and N_COUNT_HOUR_HIST.

Referenced by SquidShutdown().

int statMemoryAccounted ( void  )

Definition at line 1926 of file stat.cc.

References memPoolsTotalAllocated().

Referenced by GetInfo(), and snmp_prfSysFn().

static int statObjectsOpenfdFilter ( const StoreEntry e)
static

Definition at line 424 of file stat.cc.

References StoreEntry::mem_obj, NULL, MemObject::SwapOut::sio, and MemObject::swapout.

Referenced by statOpenfdObj().

static int statObjectsVmFilter ( const StoreEntry e)
static

Definition at line 411 of file stat.cc.

References StoreEntry::mem_obj.

Referenced by stat_vmobjects_get().

static void statOpenfdObj ( StoreEntry sentry)
static

Definition at line 436 of file stat.cc.

References statObjectsOpenfdFilter(), and statObjectsStart().

double statRequestHitDiskRatio ( int  minutes)
double statRequestHitMemoryRatio ( int  minutes)
double statRequestHitRatio ( int  minutes)
static void statUtilization ( StoreEntry e)
static

Definition at line 130 of file stat.cc.

References NCountHist, NCountHourHist, statAvgDump(), statCountersDump, and storeAppendPrintf().

Variable Documentation

Definition at line 120 of file stat.cc.

StatCounters CountHourHist[N_COUNT_HOUR_HIST]
static

Definition at line 122 of file stat.cc.

unsigned int mem_pool_alloc_calls
unsigned int mem_pool_free_calls
int NCountHist = 0
static

Definition at line 121 of file stat.cc.

Referenced by statAvgTick(), and statUtilization().

int NCountHourHist = 0
static

Definition at line 123 of file stat.cc.

Referenced by statAvgTick(), and statUtilization().

OBJH stat_objects_get
static

Definition at line 90 of file stat.cc.

Referenced by statRegisterWithCacheManager().

OBJH stat_vmobjects_get
static

Definition at line 91 of file stat.cc.

Referenced by statRegisterWithCacheManager().

OBJH statClientRequests
static

Definition at line 101 of file stat.cc.

Referenced by statRegisterWithCacheManager().

OBJH statCountersDump
static

Definition at line 96 of file stat.cc.

Referenced by statDigestBlob(), and statUtilization().

OBJH statCountersHistograms
static

Definition at line 100 of file stat.cc.

Referenced by statDigestBlob(), and statRegisterWithCacheManager().

OBJH statDigestBlob
static

Definition at line 98 of file stat.cc.

Referenced by statRegisterWithCacheManager().

EVH statObjects
static

Definition at line 95 of file stat.cc.

Referenced by statObjects(), and statObjectsStart().

OBJH statOpenfdObj
static

Definition at line 93 of file stat.cc.

Referenced by statRegisterWithCacheManager().

OBJH statPeerSelect
static

Definition at line 97 of file stat.cc.

Referenced by statDigestBlob(), and statRegisterWithCacheManager().

OBJH statUtilization
static

Definition at line 99 of file stat.cc.

Referenced by statRegisterWithCacheManager().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors