Apache:...inClient(3)
π NAME π
Apache::TS::AdminClient β a perl interface to the statistics and configuration settings stored within Apache Traffic Server. π«Ά
This is the Apache::TS::AdminClient manual page from User Contributed Perl Documentation, bestie. We're doing it in parts, and this part is lowkey stacking all the essentials. β¨
π SYNOPSIS π
okay so here's the whole starter pack:
#!/usr/bin/perl
use Apache::TS::AdminClient;
my $cli = Apache::TS::AdminClient->new(%input);
my $string = $cli->get_stat("proxy.config.product_company");
print "$string\n";
π DESCRIPTION π
AdminClient opens a TCP connection to a unix domain socket on local disk. When the connection is established, AdminClient will write requests to the socket and wait for Apache Traffic Server to return a response. π
Valid request strings can be found in RecordsConfig.cc which is included with Apache Traffic Server source. A list of valid request strings are included with this documentation, but this included list may not be complete as future releases of Apache Traffic Server may include new request strings or remove existing ones. periodt β future versions can absolutely change the menu, so don't treat the list like it's frozen forever. π
π οΈ CONSTRUCTOR π οΈ
When the object is created for this module, it assumes the 'Unix Domain Socket' is at the default location from the Apache Traffic Server installation. This can be changed when creating the object by setting socket_path. For example:
my $cli = AdminClient->new(socket_path=> "/var/trafficserver");
This would make the module look for the 'Unix Domain Socket' in the directory /var/trafficserver. The path can optionally include the name of the Socket file; without it, the constructor defaults to mgmtapi.sock. π¦
β¨ PUBLIC METHODS β¨
To read a single metric (or configuration), two APIs are available:
$cli->get_stat($stats_name);
$cli->get_config($config_name);
This will return a (scalar) value for this metric or configuration. π
π¦ traffic_ctl π¦
There is a command line tool included with Apache Traffic Server called traffic_ctl which overlaps with this module. traffic_ctl can be used to read and write statistics or config settings that this module can. Hence if you don't want to write a perl one-liner to get to this information, traffic_ctl is your tool. slay β sometimes the CLI is literally right there, bestie. π
π List of configurations π
The Apache Traffic Server Administration Manual will explain what these strings represent. (https://docs.trafficserver.apache.org/en/latest/) πΈ
okay so, continuing the big list β this is the part where it's just names, one after another, and honestly bestie the way this list goes on is giving "the config file that ate the world" π but every single one is here, no skips, no merges, we do not skip lines in this house π
proxy.config.accept_threadsproxy.config.task_threadsproxy.config.admin.synthetic_portproxy.config.admin.cli_pathproxy.config.admin.user_idproxy.config.alarm.abs_pathproxy.config.alarm.binproxy.config.alarm.script_runtimeproxy.config.bandwidth_mgmt.filenameproxy.config.bin_pathproxy.config.body_factory.enable_customizationsproxy.config.body_factory.enable_loggingproxy.config.body_factory.response_max_sizeproxy.config.body_factory.response_suppression_modeproxy.config.body_factory.template_sets_dirproxy.config.cache.agg_write_backlogproxy.config.cache.alt_rewrite_max_sizeproxy.config.cache.control.filenameproxy.config.cache.dir.sync_frequencyproxy.config.cache.enable_checksumproxy.config.cache.enable_read_while_writerproxy.config.cache.hostdb.disable_reverse_lookupproxy.config.cache.hostdb.sync_frequencyproxy.config.cache.hosting_filenameproxy.config.cache.ip_allow.filenameproxy.config.cache.limits.http.max_altsproxy.config.cache.log.alternate.evictionproxy.config.cache.max_disk_errorsproxy.config.cache.max_doc_sizeproxy.config.cache.min_average_object_sizeproxy.config.cache.volume_filenameproxy.config.cache.permit.pinningproxy.config.cache.ram_cache_cutoffproxy.config.cache.ram_cache.sizeproxy.config.cache.select_alternateproxy.config.cache.threads_per_diskproxy.config.cache.mutex_retry_delayproxy.config.cop.core_signalproxy.config.cop.linux_min_memfree_kbproxy.config.cop.linux_min_swapfree_kbproxy.config.core_limitproxy.config.diags.action.enabledproxy.config.diags.action.tagsproxy.config.diags.debug.enabledproxy.config.diags.debug.tagsproxy.config.diags.output.alertproxy.config.diags.output.debugproxy.config.diags.output.diagproxy.config.diags.output.emergencyproxy.config.diags.output.errorproxy.config.diags.output.fatalproxy.config.diags.output.noteproxy.config.diags.output.statusproxy.config.diags.output.warningproxy.config.diags.show_locationproxy.config.dns.failover_numberproxy.config.dns.failover_periodproxy.config.dns.lookup_timeoutproxy.config.dns.max_dns_in_flightproxy.config.dns.nameserversproxy.config.dns.resolv_confproxy.config.dns.retriesproxy.config.dns.round_robin_nameserversproxy.config.dns.search_default_domainsproxy.config.dns.splitDNS.enabledproxy.config.dns.splitdns.filenameproxy.config.dump_mem_info_frequencyproxy.config.env_prepproxy.config.exec_thread.autoconfigproxy.config.exec_thread.autoconfig.scaleproxy.config.exec_thread.limitproxy.config.header.parse.no_host_url_redirectproxy.config.hostdbproxy.config.hostdb.fail.timeoutproxy.config.hostdb.filenameproxy.config.hostdb.lookup_timeoutproxy.config.hostdb.migrate_on_demandproxy.config.hostdb.re_dns_on_reloadproxy.config.hostdb.serve_stale_forproxy.config.hostdb.sizeproxy.config.hostdb.storage_pathproxy.config.hostdb.storage_sizeproxy.config.hostdb.strict_round_robinproxy.config.hostdb.timeoutproxy.config.hostdb.ttl_modeproxy.config.hostdb.verify_afterproxy.config.http.accept_encoding_filter.filenameproxy.config.http.accept_no_activity_timeoutproxy.config.http.insert_client_ipproxy.config.http.anonymize_other_header_listproxy.config.http.anonymize_remove_client_ipproxy.config.http.anonymize_remove_cookieproxy.config.http.anonymize_remove_fromproxy.config.http.anonymize_remove_refererproxy.config.http.anonymize_remove_user_agentproxy.config.http.background_fill_active_timeoutproxy.config.http.background_fill_completed_thresholdproxy.config.http.cache.cache_responses_to_cookiesproxy.config.http.cache.cache_urls_that_look_dynamicproxy.config.http.cache.guaranteed_max_lifetimeproxy.config.http.cache.guaranteed_min_lifetimeproxy.config.http.cache.heuristic_lm_factorproxy.config.http.cache.heuristic_max_lifetimeproxy.config.http.cache.heuristic_min_lifetimeproxy.config.http.cache.httpproxy.config.http.cache.ignore_accept_charset_mismatchproxy.config.http.cache.ignore_accept_encoding_mismatchproxy.config.http.cache.ignore_accept_language_mismatchproxy.config.http.cache.ignore_accept_mismatchproxy.config.http.cache.ignore_authenticationproxy.config.http.cache.ignore_client_cc_max_ageproxy.config.http.cache.ignore_client_no_cacheproxy.config.http.cache.ignore_server_no_cacheproxy.config.http.cache.ims_on_client_no_cacheproxy.config.http.cache.max_open_read_retriesproxy.config.http.cache.max_open_write_retriesproxy.config.http.cache.max_stale_ageproxy.config.http.cache.open_read_retry_timeproxy.config.http.cache.range.lookupproxy.config.http.cache.range.writeproxy.config.http.cache.required_headersproxy.config.http.cache.when_to_revalidateproxy.config.http.chunking_enabledproxy.config.http.connect_attempts_max_retriesproxy.config.http.connect_attempts_max_retries_dead_serverproxy.config.http.connect_attempts_rr_retriesproxy.config.http.connect_attempts_timeoutproxy.config.http.connect_portsproxy.config.http.default_buffer_sizeproxy.config.http.default_buffer_water_markproxy.config.http.doc_in_cache_skip_dnsproxy.config.http.down_server.cache_timeproxy.config.http.enabledproxy.config.http.enable_http_infoproxy.config.http.enable_http_statsproxy.config.http.errors.log_error_pagesproxy.config.http.forward.proxy_auth_to_parentproxy.config.http.global_user_agent_headerproxy.config.http.insert_age_in_responseproxy.config.http.insert_request_via_strproxy.config.http.insert_response_via_strproxy.config.http.insert_squid_x_forwarded_forproxy.config.http.keep_alive_enabled_inproxy.config.http.keep_alive_enabled_outproxy.config.http.keep_alive_no_activity_timeout_inproxy.config.http.keep_alive_no_activity_timeout_outproxy.config.http.keep_alive_post_outproxy.config.http.negative_caching_enabledproxy.config.http.negative_caching_listproxy.config.http.negative_caching_lifetimeproxy.config.http.negative_revalidating_enabledproxy.config.http.negative_revalidating_lifetimeproxy.config.http.no_dns_just_forward_to_parentproxy.config.http.no_origin_server_dnsproxy.config.http.normalize_ae_gzipproxy.config.http.number_of_redirectionsproxy.config.http.per_server.connection.maxproxy.config.http.origin_min_keep_alive_connectionsproxy.config.http.parent_proxiesproxy.config.http.parent_proxy.connect_attempts_timeoutproxy.config.http.parent_proxy.fail_thresholdproxy.config.http.parent_proxy.fileproxy.config.http.parent_proxy.per_parent_connect_attemptsproxy.config.http.parent_proxy.retry_timeproxy.config.http.parent_proxy.total_connect_attemptsproxy.config.http.post_connect_attempts_timeoutproxy.config.http.post_copy_sizeproxy.config.http.push_method_enabledproxy.config.http.quick_filter.maskproxy.config.http.record_heartbeatproxy.config.http.referer_default_redirectproxy.config.http.referer_filterproxy.config.http.referer_format_redirectproxy.config.http.request_header_max_sizeproxy.config.http.request_via_strproxy.config.http.response_header_max_sizeproxy.config.http.response_server_enabledproxy.config.http.response_server_strproxy.config.http.response_via_strproxy.config.http.send_http11_requestsproxy.config.http.server_max_connectionsproxy.config.http.server_portproxy.config.http.slow.log.thresholdproxy.config.http.connect_portsproxy.config.http.transaction_active_timeout_inproxy.config.http.transaction_active_timeout_outproxy.config.http.transaction_no_activity_timeout_inproxy.config.http.transaction_no_activity_timeout_outproxy.config.http_ui_enabledproxy.config.http.uncacheable_requests_bypass_parentproxy.config.io.max_buffer_sizeproxy.config.lm.pserver_timeout_msecsproxy.config.lm.pserver_timeout_secsproxy.config.local_state_dirproxy.config.log.ascii_buffer_sizeproxy.config.log.auto_delete_rolled_filesproxy.config.log.file_stat_frequencyproxy.config.log.hostnameproxy.config.log.log_buffer_sizeproxy.config.log.logfile_dirproxy.config.log.logfile_permproxy.config.log.logging_enabledproxy.config.log.max_line_sizeproxy.config.log.max_secs_per_bufferproxy.config.log.max_space_mb_for_logsproxy.config.log.max_space_mb_headroomproxy.config.log.overspill_report_countproxy.config.log.rolling_enabledproxy.config.log.rolling_interval_secproxy.config.log.rolling_offset_hrproxy.config.log.rolling_size_mbproxy.config.log.sampling_frequencyproxy.config.log.space_used_frequencyproxy.config.log.config.filenameproxy.config.manager_binaryproxy.config.net.connections_throttleproxy.config.net.listen_backlogproxy.config.net.sock_mss_inproxy.config.net.sock_option_flag_inproxy.config.net.sock_option_flag_outproxy.config.net.sock_recv_buffer_size_inproxy.config.net.sock_recv_buffer_size_outproxy.config.net.sock_send_buffer_size_inproxy.config.net.sock_send_buffer_size_outproxy.config.net.defer_acceptproxy.config.output.logfileproxy.config.plugin.plugin_dirproxy.config.process_manager.mgmt_portproxy.config.process_manager.timeoutproxy.config.product_companyproxy.config.product_nameproxy.config.product_vendorproxy.config.proxy.authenticate.basic.realmproxy.config.proxy_binaryproxy.config.proxy_binary_optsproxy.config.proxy_nameproxy.config.remap.num_remap_threadsproxy.config.res_track_memoryproxy.config.reverse_proxy.enabledproxy.config.reverse_proxy.oldasxbehaviorproxy.config.socks.accept_enabledproxy.config.socks.accept_portproxy.config.socks.connection_attemptsproxy.config.socks.default_serversproxy.config.socks.http_portproxy.config.socks.per_server_connection_attemptsproxy.config.socks.server_connect_timeoutproxy.config.socks.server_fail_thresholdproxy.config.socks.server_retry_timeproxy.config.socks.server_retry_timeoutproxy.config.socks.socks_config_fileproxy.config.socks.socks_neededproxy.config.socks.socks_timeoutproxy.config.socks.socks_versionproxy.config.srv_enabledproxy.config.ssl.CA.cert.filenameproxy.config.ssl.CA.cert.pathproxy.config.ssl.client.CA.cert.filenameproxy.config.ssl.client.CA.cert.pathproxy.config.ssl.client.cert.filename
real talk though: yes,proxy.config.http.connect_portsshows up twice in this list (once up near the buffer stuff, once right afterproxy.config.http.slow.log.threshold). that's not me being messy, that's literally how it's written. we reproduce, we do not editorialize π
and that's where this chunk runs out β more list incoming, so like, stretch your thumbs or whatever π«Ά
...and we're back, bestie β final stretch of the config list π no skips, no skimming, every single one is right here:
proxy.config.ssl.client.certification_levelproxy.config.ssl.client.cert.pathproxy.config.ssl.client.private_key.filenameproxy.config.ssl.client.private_key.pathproxy.config.ssl.server.cert_chain.filenameproxy.config.ssl.server.cert.pathproxy.config.ssl.server.cipher_suiteproxy.config.ssl.server.honor_cipher_orderproxy.config.ssl.server.dhparams_fileproxy.config.ssl.TLSv1proxy.config.ssl.TLSv1_1proxy.config.ssl.TLSv1_2proxy.config.ssl.TLSv1_3proxy.config.ssl.server.multicert.filenameproxy.config.ssl.server.private_key.pathproxy.config.ssl.keylog_fileproxy.config.stat_collector.intervalproxy.config.stat_collector.portproxy.config.syslog_facilityproxy.config.system.file_max_pctproxy.config.thread.default.stacksizeproxy.config.udp.free_cancelled_pkts_secproxy.config.udp.periodic_cleanupproxy.config.udp.send_retriesproxy.config.url_remap.filenameproxy.config.url_remap.pristine_host_hdrproxy.config.url_remap.remap_required
That's the whole list, start to finish β you ate that πβ¨
π LICENSE π
Simple Apache Traffic Server client object, to communicate with the local manager.
Okay so this part is the legal bit and I'm keeping it exactly as written, because nobody β and I mean nobody β wants me paraphrasing a license π read it, it's important:
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
<tulip>like yes it's the boring part but it's also the part that makes all of this legally slay π</tulip>
And that's a wrap on the whole page, bestie β go forth and configure iconically π π β¨
Sign-off time π this one's from the perl v5.42.3 docs, dated 1980-01-01, page title Apache:...inClient(3) β screenshot it, cite it, love it π«Ά
π¦ where this page comes from
- nixos 26.05: trafficserver 9.2.11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms