Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions cmd/traffic_manager/StatProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
#include "LocalManager.h"
#include "WebOverview.h"

#define _HEADER
#define _D(x)
#define _FOOTER
#include "DynamicStats.h"
#include "StatType.h"

#if HAVE_LIBEXPAT
Expand Down
12 changes: 1 addition & 11 deletions doc/admin-guide/files/records.config.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,6 @@ Value Effect
Metrics Variables
-----------------

.. ts:cv:: CONFIG proxy.config.stats.snap_frequency INT 60

Interval (in seconds) at which to snapshot persistent metrics.

.. ts:cv:: CONFIG proxy.config.stats.snap_file STRING "stats.snap"

Name of the file to use for snapshots of persistent metrics.

.. ts:cv:: proxy.config.stats.enable_lua INT 0

Whether to enable execution of the Lua-based custom metrics from
Expand Down Expand Up @@ -1989,7 +1981,7 @@ Customizable User Response Pages
To enable any enpoint there needs to be an entry in :file:`remap.config` which
specifically enables it. Such a line would look like: ::

map / http://{stat}
map / http://{cache}

The following are the cache endpoints:

Expand All @@ -2001,8 +1993,6 @@ Customizable User Response Pages
- ``hostdb`` = lookups against the hostdb
- ``http`` = HTTPSM details, this endpoint is also gated by `proxy.config.http.enable_http_info`
- ``net`` = lookup and listing of open connections
- ``stat`` = list of all records.config options and metrics
- ``test`` = test callback page

.. ts:cv:: CONFIG proxy.config.http.enable_http_info INT 0

Expand Down
2 changes: 0 additions & 2 deletions lib/perl/lib/Apache/TS/AdminClient.pm
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,6 @@ The Apache Traffic Server Administration Manual will explain what these strings
proxy.config.ssl.server.private_key.path
proxy.config.stat_collector.interval
proxy.config.stat_collector.port
proxy.config.stats.snap_file
proxy.config.stats.snap_frequency
proxy.config.syslog_facility
proxy.config.system.mmap_max
proxy.config.system.file_max_pct
Expand Down
2 changes: 0 additions & 2 deletions lib/records/I_RecCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,6 @@ int RecGetRecordSource(const char *name, RecSourceT *source, bool lock = true);
int RecGetRecordAccessType(const char *name, RecAccessT *secure, bool lock = true);
int RecSetRecordAccessType(const char *name, RecAccessT secure, bool lock = true);

int RecGetRecordPrefix_Xmalloc(char *prefix, char **result, int *result_len);

//------------------------------------------------------------------------
// Signal and Alarms
//------------------------------------------------------------------------
Expand Down
68 changes: 0 additions & 68 deletions lib/records/RecCore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1009,74 +1009,6 @@ RecDumpRecordsHt(RecT rec_type)
RecDumpRecords(rec_type, debug_record_callback, NULL);
}

//-------------------------------------------------------------------------
// RecGetRecordPrefix_Xmalloc
//
// mimics/replaces proxy/StatSystem.cc::stat_callback().
// returns the number of variables name match the prefix.
//-------------------------------------------------------------------------
int
RecGetRecordPrefix_Xmalloc(char *prefix, char **buf, int *buf_len)
{
int num_records = g_num_records;
int result_size = num_records * 256; /* estimate buffer size */
int num_matched = 0;
char *result = NULL;

result = (char *)ats_malloc(result_size * sizeof(char));
memset(result, 0, result_size * sizeof(char));

int i;
int total_bytes_written = 0;
int error = 0;
for (i = 0; !error && i < num_records; i++) {
int bytes_written = 0;
int bytes_avail = result_size - total_bytes_written;
RecRecord *r = &(g_records[i]);
if (strncmp(prefix, r->name, strlen(prefix)) == 0) {
rec_mutex_acquire(&(r->lock));
switch (r->data_type) {
case RECD_INT:
num_matched++;
bytes_written = snprintf(result + total_bytes_written, bytes_avail, "%s=%" PRId64 "\r\n", r->name, r->data.rec_int);
break;
case RECD_FLOAT:
num_matched++;
bytes_written = snprintf(result + total_bytes_written, bytes_avail, "%s=%f\r\n", r->name, r->data.rec_float);
break;
case RECD_STRING:
num_matched++;
bytes_written = snprintf(result + total_bytes_written, bytes_avail, "%s=%s\r\n", r->name,
r->data.rec_string ? r->data.rec_string : "NULL");
break;
case RECD_COUNTER:
num_matched++;
bytes_written = snprintf(result + total_bytes_written, bytes_avail, "%s=%" PRId64 "\r\n", r->name, r->data.rec_int);
break;
default:
break;
}

if (bytes_written <= 0 || bytes_written > bytes_avail) {
error = 1;
} else
total_bytes_written += bytes_written;

rec_mutex_release(&(r->lock));
}
}

if (error || total_bytes_written == result_size) {
RecLog(DL_Error, "Stat system was unable to fully generate stat list, size exceeded limit of %d", result_size);
}

*buf = result;
*buf_len = strlen(result);

return num_matched;
}


//-------------------------------------------------------------------------
// Backwards compatibility ... TODO: Should eliminate these
//-------------------------------------------------------------------------
Expand Down
6 changes: 0 additions & 6 deletions mgmt/RecordsConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1114,12 +1114,6 @@ static const RecordElement RecordsConfig[] =
// #########
// # Stats #
// #########
//# frequency is in seconds
{RECT_CONFIG, "proxy.config.stats.snap_frequency", RECD_INT, "60", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
,
// Jira TS-21
{RECT_CONFIG, "proxy.config.stats.snap_file", RECD_STRING, "stats.snap", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
,
{RECT_CONFIG, "proxy.config.stats.enable_lua", RECD_INT, "0", RECU_RESTART_TM, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
,

Expand Down
1 change: 0 additions & 1 deletion proxy/CacheControl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "ProxyConfig.h"
#include "HTTP.h"
#include "HttpConfig.h"
#include "StatSystem.h"
#include "P_Cache.h"
#include "ts/Regex.h"

Expand Down
103 changes: 0 additions & 103 deletions proxy/DynamicStats.h

This file was deleted.

1 change: 0 additions & 1 deletion proxy/IPAllow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "Main.h"
#include "IPAllow.h"
#include "ProxyConfig.h"
#include "StatSystem.h"
#include "P_EventSystem.h"
#include "P_Cache.h"
#include "hdrs/HdrToken.h"
Expand Down
1 change: 0 additions & 1 deletion proxy/InkAPI.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "P_Net.h"
#include "P_UDPNet.h"
#include "P_HostDB.h"
#include "StatSystem.h"
#include "P_Cache.h"
#include "I_RecCore.h"
#include "I_RecSignals.h"
Expand Down
1 change: 0 additions & 1 deletion proxy/InkAPIInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

#include "P_EventSystem.h"
#include "URL.h"
#include "StatSystem.h"
#include "P_Net.h"
#include "ts.h"
#include "experimental.h"
Expand Down
7 changes: 1 addition & 6 deletions proxy/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ extern "C" int plock(int);
#include "Main.h"
#include "ts/signals.h"
#include "Error.h"
#include "StatSystem.h"
#include "P_EventSystem.h"
#include "P_Net.h"
#include "P_UDPNet.h"
Expand Down Expand Up @@ -1072,7 +1071,7 @@ struct ShowStats : public Continuation {
(void)e;
if (!(cycle++ % 24))
printf("r:rr w:ww r:rbs w:wbs open polls\n");
ink_statval_t sval, cval;
int64_t sval, cval;

NET_READ_DYN_SUM(net_calls_to_readfromnet_stat, sval);
int64_t d_rb = sval - last_rb;
Expand Down Expand Up @@ -1700,9 +1699,6 @@ main(int /* argc ATS_UNUSED */, const char **argv)
}
Note("cache clustering %s", cache_clustering_enabled ? "enabled" : "disabled");

// Initialize New Stat system
initialize_all_global_stats();

num_of_net_threads = adjust_num_of_net_threads(num_of_net_threads);

size_t stacksize;
Expand Down Expand Up @@ -1819,7 +1815,6 @@ main(int /* argc ATS_UNUSED */, const char **argv)
// acc.start();
// pmgmt initialization moved up, needed by RecProcessInit
// pmgmt->start();
start_stats_snap();

// Initialize Response Body Factory
body_factory = new HttpBodyFactory;
Expand Down
5 changes: 1 addition & 4 deletions proxy/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ traffic_server_SOURCES = \
CoreUtils.cc \
CoreUtils.h \
Crash.cc \
DynamicStats.h \
EventName.cc \
FetchSM.cc \
HttpTransStats.h \
Expand All @@ -162,6 +161,7 @@ traffic_server_SOURCES = \
InkIOCoreAPI.cc \
Main.cc \
Main.h \
Milestones.h \
ParentConsistentHash.cc \
ParentConsistentHash.h \
ParentRoundRobin.cc \
Expand All @@ -181,8 +181,6 @@ traffic_server_SOURCES = \
SocksProxy.cc \
StatPages.cc \
StatPages.h \
StatSystem.cc \
StatSystem.h \
Transform.cc \
Transform.h \
TransformInternal.h
Expand Down Expand Up @@ -286,7 +284,6 @@ traffic_sac_SOURCES = \
ControlBase.cc \
ControlMatcher.cc \
CacheControl.cc \
StatSystem.cc \
ReverseProxy.cc \
EventName.cc \
StatPages.cc \
Expand Down
Loading