1Apache::TS::AdminClientU(s3e)r Contributed Perl DocumentaAtpiaocnhe::TS::AdminClient(3)
2
3
4

NAME:

6       Apache::TS::AdminClient - a perl interface to the statistics and
7       configuration settings stored within Apache Traffic Server.
8

SYNOPSIS

10         #!/usr/bin/perl
11         use Apache::TS::AdminClient;
12
13         my $cli = Apache::TS::AdminClient->new(%input);
14         my $string = $cli->get_stat("proxy.config.product_company");
15         print "$string\n";
16

DESCRIPTION:

18       AdminClient opens a TCP connection to a unix domain socket on local
19       disk.  When the connection is established, AdminClient will write
20       requests to the socket and wait for Apache Traffic Server to return a
21       response.  Valid request strings can be found in RecordsConfig.cc which
22       is included with Apache Traffic Server source.  A list of valid request
23       strings are included with this documentation, but this included list
24       may not be complete as future releases of Apache Traffic Server may
25       include new request strings or remove existing ones.
26

CONSTRUCTOR

28       When the object is created for this module, it assumes the 'Unix Domain
29       Socket' is at the default location from the Apache Traffic Server
30       installation. This can be changed when creating the object by setting
31       'socket_path'.  For example:
32
33       my $cli = AdminClient->new(socket_path=> "/var/trafficserver");
34           This would make the module look for the 'Unix Domain Socket' in the
35           directory '/var/trafficserver'. The path can optionally include the
36           name of the Socket file, without it the constructor defaults to
37           'mgmtapi.sock'.
38

PUBLIC METHODS

40       To read a single metric (or configuration), two APIs are available:
41
42       $cli->get_stat($stats_name);
43       $cli->get_config($config_name);
44           This will return a (scalar) value for this metric or configuration.
45

traffic_line

47       There is a command line tool included with Apache Traffic Server called
48       traffic_line which overlaps with this module.  traffic_line can be used
49       to read and write statistics or config settings that this module can.
50       Hence if you don't want to write a perl one-liner to get to this
51       information, traffic_line is your tool.
52

List of configurations

54       The Apache Traffic Server Administration Manual will explain what these
55       strings represent.  (http://trafficserver.apache.org/docs/)
56
57        proxy.config.accept_threads
58        proxy.config.task_threads
59        proxy.config.admin.admin_user
60        proxy.config.admin.autoconf.localhost_only
61        proxy.config.admin.autoconf.pac_filename
62        proxy.config.admin.autoconf_port
63        proxy.config.admin.autoconf.doc_root
64        proxy.config.admin.cli_path
65        proxy.config.admin.number_config_bak
66        proxy.config.admin.user_id
67        proxy.config.alarm.abs_path
68        proxy.config.alarm.bin
69        proxy.config.alarm_email
70        proxy.config.alarm.script_runtime
71        proxy.config.bandwidth_mgmt.filename
72        proxy.config.bin_path
73        proxy.config.body_factory.enable_customizations
74        proxy.config.body_factory.enable_logging
75        proxy.config.body_factory.response_suppression_mode
76        proxy.config.body_factory.template_sets_dir
77        proxy.config.cache.agg_write_backlog
78        proxy.config.cache.alt_rewrite_max_size
79        proxy.config.cache.control.filename
80        proxy.config.cache.dir.sync_frequency
81        proxy.config.cache.enable_checksum
82        proxy.config.cache.enable_read_while_writer
83        proxy.config.cache.hostdb.disable_reverse_lookup
84        proxy.config.cache.hostdb.sync_frequency
85        proxy.config.cache.hosting_filename
86        proxy.config.cache.ip_allow.filename
87        proxy.config.cache.limits.http.max_alts
88        proxy.config.cache.max_disk_errors
89        proxy.config.cache.max_doc_size
90        proxy.config.cache.min_average_object_size
91        proxy.config.cache.volume_filename
92        proxy.config.cache.permit.pinning
93        proxy.config.cache.ram_cache_cutoff
94        proxy.config.cache.ram_cache.size
95        proxy.config.cache.select_alternate
96        proxy.config.cache.storage_filename
97        proxy.config.cache.threads_per_disk
98        proxy.config.cache.url_hash_method
99        proxy.config.cache.mutex_retry_delay
100        proxy.config.cluster.cluster_configuration
101        proxy.config.cluster.cluster_load_clear_duration
102        proxy.config.cluster.cluster_load_exceed_duration
103        proxy.config.cluster.cluster_port
104        proxy.config.cluster.delta_thresh
105        proxy.config.cluster.enable_monitor
106        proxy.config.cluster.ethernet_interface
107        proxy.config.cluster.load_compute_interval_msecs
108        proxy.config.cluster.load_monitor_enabled
109        proxy.config.cluster.log_bogus_mc_msgs
110        proxy.config.cluster.mc_group_addr
111        proxy.config.cluster.mcport
112        proxy.config.cluster.mc_ttl
113        proxy.config.cluster.monitor_interval_secs
114        proxy.config.cluster.msecs_per_ping_response_bucket
115        proxy.config.cluster.peer_timeout
116        proxy.config.cluster.periodic_timer_interval_msecs
117        proxy.config.cluster.ping_history_buf_length
118        proxy.config.cluster.ping_latency_threshold_msecs
119        proxy.config.cluster.ping_response_buckets
120        proxy.config.cluster.ping_send_interval_msecs
121        proxy.config.cluster.receive_buffer_size
122        proxy.config.cluster.rpc_cache_cluster
123        proxy.config.cluster.rsport
124        proxy.config.cluster.send_buffer_size
125        proxy.config.cluster.sock_option_flag
126        proxy.config.cluster.startup_timeout
127        proxy.config.cluster.threads
128        proxy.config.config_dir
129        proxy.config.cop.core_signal
130        proxy.config.cop.linux_min_memfree_kb
131        proxy.config.cop.linux_min_swapfree_kb
132        proxy.config.core_limit
133        proxy.config.diags.action.enabled
134        proxy.config.diags.action.tags
135        proxy.config.diags.debug.enabled
136        proxy.config.diags.debug.tags
137        proxy.config.diags.output.alert
138        proxy.config.diags.output.debug
139        proxy.config.diags.output.diag
140        proxy.config.diags.output.emergency
141        proxy.config.diags.output.error
142        proxy.config.diags.output.fatal
143        proxy.config.diags.output.note
144        proxy.config.diags.output.status
145        proxy.config.diags.output.warning
146        proxy.config.diags.show_location
147        proxy.config.dns.failover_number
148        proxy.config.dns.failover_period
149        proxy.config.dns.lookup_timeout
150        proxy.config.dns.max_dns_in_flight
151        proxy.config.dns.nameservers
152        proxy.config.dns.resolv_conf
153        proxy.config.dns.retries
154        proxy.config.dns.round_robin_nameservers
155        proxy.config.dns.search_default_domains
156        proxy.config.dns.splitDNS.enabled
157        proxy.config.dns.splitdns.filename
158        proxy.config.dns.url_expansions
159        proxy.config.dump_mem_info_frequency
160        proxy.config.env_prep
161        proxy.config.exec_thread.autoconfig
162        proxy.config.exec_thread.autoconfig.scale
163        proxy.config.exec_thread.limit
164        proxy.config.header.parse.no_host_url_redirect
165        proxy.config.hostdb
166        proxy.config.hostdb.cluster
167        proxy.config.hostdb.cluster.round_robin
168        proxy.config.hostdb.fail.timeout
169        proxy.config.hostdb.filename
170        proxy.config.hostdb.lookup_timeout
171        proxy.config.hostdb.migrate_on_demand
172        proxy.config.hostdb.re_dns_on_reload
173        proxy.config.hostdb.serve_stale_for
174        proxy.config.hostdb.size
175        proxy.config.hostdb.storage_path
176        proxy.config.hostdb.storage_size
177        proxy.config.hostdb.strict_round_robin
178        proxy.config.hostdb.timeout
179        proxy.config.hostdb.ttl_mode
180        proxy.config.hostdb.verify_after
181        proxy.config.http.accept_encoding_filter.filename
182        proxy.config.http.accept_no_activity_timeout
183        proxy.config.http.anonymize_insert_client_ip
184        proxy.config.http.anonymize_other_header_list
185        proxy.config.http.anonymize_remove_client_ip
186        proxy.config.http.anonymize_remove_cookie
187        proxy.config.http.anonymize_remove_from
188        proxy.config.http.anonymize_remove_referer
189        proxy.config.http.anonymize_remove_user_agent
190        proxy.config.http.background_fill_active_timeout
191        proxy.config.http.background_fill_completed_threshold
192        proxy.config.http.cache.cache_responses_to_cookies
193        proxy.config.http.cache.cache_urls_that_look_dynamic
194        proxy.config.http.cache.enable_default_vary_headers
195        proxy.config.http.cache.fuzz.min_time
196        proxy.config.http.cache.fuzz.probability
197        proxy.config.http.cache.fuzz.time
198        proxy.config.http.cache.guaranteed_max_lifetime
199        proxy.config.http.cache.guaranteed_min_lifetime
200        proxy.config.http.cache.heuristic_lm_factor
201        proxy.config.http.cache.heuristic_max_lifetime
202        proxy.config.http.cache.heuristic_min_lifetime
203        proxy.config.http.cache.http
204        proxy.config.http.cache.ignore_accept_charset_mismatch
205        proxy.config.http.cache.ignore_accept_encoding_mismatch
206        proxy.config.http.cache.ignore_accept_language_mismatch
207        proxy.config.http.cache.ignore_accept_mismatch
208        proxy.config.http.cache.ignore_authentication
209        proxy.config.http.cache.ignore_client_cc_max_age
210        proxy.config.http.cache.cluster_cache_local
211        proxy.config.http.cache.ignore_client_no_cache
212        proxy.config.http.cache.ignore_server_no_cache
213        proxy.config.http.cache.ims_on_client_no_cache
214        proxy.config.http.cache.max_open_read_retries
215        proxy.config.http.cache.max_open_write_retries
216        proxy.config.http.cache.max_stale_age
217        proxy.config.http.cache.open_read_retry_time
218        proxy.config.http.cache.range.lookup
219        proxy.config.http.cache.range.write
220        proxy.config.http.cache.required_headers
221        proxy.config.http.cache.vary_default_images
222        proxy.config.http.cache.vary_default_other
223        proxy.config.http.cache.vary_default_text
224        proxy.config.http.cache.when_to_revalidate
225        proxy.config.http.chunking_enabled
226        proxy.config.http.congestion_control.default.client_wait_interval
227        proxy.config.http.congestion_control.default.congestion_scheme
228        proxy.config.http.congestion_control.default.dead_os_conn_retries
229        proxy.config.http.congestion_control.default.dead_os_conn_timeout
230        proxy.config.http.congestion_control.default.error_page
231        proxy.config.http.congestion_control.default.fail_window
232        proxy.config.http.congestion_control.default.live_os_conn_retries
233        proxy.config.http.congestion_control.default.live_os_conn_timeout
234        proxy.config.http.congestion_control.default.max_connection
235        proxy.config.http.congestion_control.default.max_connection_failures
236        proxy.config.http.congestion_control.default.proxy_retry_interval
237        proxy.config.http.congestion_control.default.wait_interval_alpha
238        proxy.config.http.congestion_control.enabled
239        proxy.config.http.congestion_control.filename
240        proxy.config.http.congestion_control.localtime
241        proxy.config.http.connect_attempts_max_retries
242        proxy.config.http.connect_attempts_max_retries_dead_server
243        proxy.config.http.connect_attempts_rr_retries
244        proxy.config.http.connect_attempts_timeout
245        proxy.config.http.connect_ports
246        proxy.config.http.default_buffer_size
247        proxy.config.http.default_buffer_water_mark
248        proxy.config.http.doc_in_cache_skip_dns
249        proxy.config.http.down_server.abort_threshold
250        proxy.config.http.down_server.cache_time
251        proxy.config.http.enabled
252        proxy.config.http.enable_http_info
253        proxy.config.http.enable_http_stats
254        proxy.config.http.enable_url_expandomatic
255        proxy.config.http.errors.log_error_pages
256        proxy.config.http.forward.proxy_auth_to_parent
257        proxy.config.http.global_user_agent_header
258        proxy.config.http.insert_age_in_response
259        proxy.config.http.insert_request_via_str
260        proxy.config.http.insert_response_via_str
261        proxy.config.http.insert_squid_x_forwarded_for
262        proxy.config.http.keep_alive_enabled_in
263        proxy.config.http.keep_alive_enabled_out
264        proxy.config.http.keep_alive_no_activity_timeout_in
265        proxy.config.http.keep_alive_no_activity_timeout_out
266        proxy.config.http.keep_alive_post_out
267        proxy.config.http.negative_caching_enabled
268        proxy.config.http.negative_caching_lifetime
269        proxy.config.http.negative_revalidating_enabled
270        proxy.config.http.negative_revalidating_lifetime
271        proxy.config.http.no_dns_just_forward_to_parent
272        proxy.config.http.no_origin_server_dns
273        proxy.config.http.normalize_ae_gzip
274        proxy.config.http.number_of_redirections
275        proxy.config.http.origin_max_connections
276        proxy.config.http.origin_min_keep_alive_connections
277        proxy.config.http.parent_proxies
278        proxy.config.http.parent_proxy.connect_attempts_timeout
279        proxy.config.http.parent_proxy.fail_threshold
280        proxy.config.http.parent_proxy.file
281        proxy.config.http.parent_proxy.per_parent_connect_attempts
282        proxy.config.http.parent_proxy.retry_time
283        proxy.config.http.parent_proxy_routing_enable
284        proxy.config.http.parent_proxy.total_connect_attempts
285        proxy.config.http.post_connect_attempts_timeout
286        proxy.config.http.post_copy_size
287        proxy.config.http.push_method_enabled
288        proxy.config.http.quick_filter.mask
289        proxy.config.http.record_heartbeat
290        proxy.config.http.redirection_enabled
291        proxy.config.http.referer_default_redirect
292        proxy.config.http.referer_filter
293        proxy.config.http.referer_format_redirect
294        proxy.config.http.request_header_max_size
295        proxy.config.http.request_via_str
296        proxy.config.http.response_header_max_size
297        proxy.config.http.response_server_enabled
298        proxy.config.http.response_server_str
299        proxy.config.http.response_via_str
300        proxy.config.http.send_http11_requests
301        proxy.config.http.server_max_connections
302        proxy.config.http.server_port
303        proxy.config.http.share_server_sessions
304        proxy.config.http.slow.log.threshold
305        proxy.config.http.connect_ports
306        proxy.config.http.transaction_active_timeout_in
307        proxy.config.http.transaction_active_timeout_out
308        proxy.config.http.transaction_no_activity_timeout_in
309        proxy.config.http.transaction_no_activity_timeout_out
310        proxy.config.http_ui_enabled
311        proxy.config.http.uncacheable_requests_bypass_parent
312        proxy.config.icp.default_reply_port
313        proxy.config.icp.enabled
314        proxy.config.icp.icp_configuration
315        proxy.config.icp.icp_interface
316        proxy.config.icp.icp_port
317        proxy.config.icp.lookup_local
318        proxy.config.icp.multicast_enabled
319        proxy.config.icp.query_timeout
320        proxy.config.icp.reply_to_unknown_peer
321        proxy.config.icp.stale_icp_enabled
322        proxy.config.io.max_buffer_size
323        proxy.config.lm.pserver_timeout_msecs
324        proxy.config.lm.pserver_timeout_secs
325        proxy.config.lm.sem_id
326        proxy.config.local_state_dir
327        proxy.config.log.ascii_buffer_size
328        proxy.config.log.auto_delete_rolled_files
329        proxy.config.log.collation_host
330        proxy.config.log.collation_host_tagged
331        proxy.config.log.collation_max_send_buffers
332        proxy.config.log.collation_port
333        proxy.config.log.collation_retry_sec
334        proxy.config.log.collation_secret
335        proxy.config.log.common_log_enabled
336        proxy.config.log.common_log_header
337        proxy.config.log.common_log_is_ascii
338        proxy.config.log.common_log_name
339        proxy.config.log.custom_logs_enabled
340        proxy.config.log.extended2_log_enabled
341        proxy.config.log.extended2_log_header
342        proxy.config.log.extended2_log_is_ascii
343        proxy.config.log.extended2_log_name
344        proxy.config.log.extended_log_enabled
345        proxy.config.log.extended_log_header
346        proxy.config.log.extended_log_is_ascii
347        proxy.config.log.extended_log_name
348        proxy.config.log.file_stat_frequency
349        proxy.config.log.hostname
350        proxy.config.log.hosts_config_file
351        proxy.config.log.log_buffer_size
352        proxy.config.log.logfile_dir
353        proxy.config.log.logfile_perm
354        proxy.config.log.logging_enabled
355        proxy.config.log.max_line_size
356        proxy.config.log.max_secs_per_buffer
357        proxy.config.log.max_space_mb_for_logs
358        proxy.config.log.max_space_mb_for_orphan_logs
359        proxy.config.log.max_space_mb_headroom
360        proxy.config.log.overspill_report_count
361        proxy.config.log.rolling_enabled
362        proxy.config.log.rolling_interval_sec
363        proxy.config.log.rolling_offset_hr
364        proxy.config.log.rolling_size_mb
365        proxy.config.log.sampling_frequency
366        proxy.config.log.search_log_enabled
367        proxy.config.log.search_log_filters
368        proxy.config.log.search_rolling_interval_sec
369        proxy.config.log.search_server_ip_addr
370        proxy.config.log.search_server_port
371        proxy.config.log.search_top_sites
372        proxy.config.log.search_url_filter
373        proxy.config.log.separate_host_logs
374        proxy.config.log.separate_icp_logs
375        proxy.config.log.space_used_frequency
376        proxy.config.log.squid_log_enabled
377        proxy.config.log.squid_log_header
378        proxy.config.log.squid_log_is_ascii
379        proxy.config.log.squid_log_name
380        proxy.config.log.xml_config_file
381        proxy.config.manager_binary
382        proxy.config.net.connections_throttle
383        proxy.config.net.listen_backlog
384        proxy.config.net.sock_mss_in
385        proxy.config.net.sock_option_flag_in
386        proxy.config.net.sock_option_flag_out
387        proxy.config.net.sock_recv_buffer_size_in
388        proxy.config.net.sock_recv_buffer_size_out
389        proxy.config.net.sock_send_buffer_size_in
390        proxy.config.net.sock_send_buffer_size_out
391        proxy.config.net.defer_accept
392        proxy.config.output.logfile
393        proxy.config.ping.npacks_to_trans
394        proxy.config.ping.timeout_sec
395        proxy.config.plugin.plugin_dir
396        proxy.config.prefetch.child_port
397        proxy.config.prefetch.config_file
398        proxy.config.prefetch.default_data_proto
399        proxy.config.prefetch.default_url_proto
400        proxy.config.prefetch.keepalive_timeout
401        proxy.config.prefetch.max_object_size
402        proxy.config.prefetch.max_recursion
403        proxy.config.prefetch.prefetch_enabled
404        proxy.config.prefetch.push_cached_objects
405        proxy.config.prefetch.redirection
406        proxy.config.prefetch.url_buffer_size
407        proxy.config.prefetch.url_buffer_timeout
408        proxy.config.process_manager.enable_mgmt_port
409        proxy.config.process_manager.mgmt_port
410        proxy.config.process_manager.timeout
411        proxy.config.product_company
412        proxy.config.product_name
413        proxy.config.product_vendor
414        proxy.config.proxy.authenticate.basic.realm
415        proxy.config.proxy_binary
416        proxy.config.proxy_binary_opts
417        proxy.config.proxy_name
418        proxy.config.remap.num_remap_threads
419        proxy.config.res_track_memory
420        proxy.config.reverse_proxy.enabled
421        proxy.config.reverse_proxy.oldasxbehavior
422        proxy.config.snapshot_dir
423        proxy.config.socks.accept_enabled
424        proxy.config.socks.accept_port
425        proxy.config.socks.connection_attempts
426        proxy.config.socks.default_servers
427        proxy.config.socks.http_port
428        proxy.config.socks.per_server_connection_attempts
429        proxy.config.socks.server_connect_timeout
430        proxy.config.socks.server_fail_threshold
431        proxy.config.socks.server_retry_time
432        proxy.config.socks.server_retry_timeout
433        proxy.config.socks.socks_config_file
434        proxy.config.socks.socks_needed
435        proxy.config.socks.socks_timeout
436        proxy.config.socks.socks_version
437        proxy.config.srv_enabled
438        proxy.config.ssl.CA.cert.filename
439        proxy.config.ssl.CA.cert.path
440        proxy.config.ssl.client.CA.cert.filename
441        proxy.config.ssl.client.CA.cert.path
442        proxy.config.ssl.client.cert.filename
443        proxy.config.ssl.client.certification_level
444        proxy.config.ssl.client.cert.path
445        proxy.config.ssl.client.private_key.filename
446        proxy.config.ssl.client.private_key.path
447        proxy.config.ssl.client.verify.server
448        proxy.config.ssl.enabled
449        proxy.config.ssl.number.threads
450        proxy.config.ssl.server.cert_chain.filename
451        proxy.config.ssl.server.cert.path
452        proxy.config.ssl.server.cipher_suite
453        proxy.config.ssl.server.honor_cipher_order
454        proxy.config.ssl.server.dhparams_file
455        proxy.config.ssl.SSLv2
456        proxy.config.ssl.SSLv3
457        proxy.config.ssl.TLSv1
458        proxy.config.ssl.compression
459        proxy.config.ssl.server.multicert.filename
460        proxy.config.ssl.server_port
461        proxy.config.ssl.server.private_key.path
462        proxy.config.stat_collector.interval
463        proxy.config.stat_collector.port
464        proxy.config.stats.config_file
465        proxy.config.stats.snap_file
466        proxy.config.stats.snap_frequency
467        proxy.config.syslog_facility
468        proxy.config.system.mmap_max
469        proxy.config.system.file_max_pct
470        proxy.config.thread.default.stacksize
471        proxy.config.udp.free_cancelled_pkts_sec
472        proxy.config.udp.periodic_cleanup
473        proxy.config.udp.send_retries
474        proxy.config.update.concurrent_updates
475        proxy.config.update.enabled
476        proxy.config.update.force
477        proxy.config.update.max_update_state_machines
478        proxy.config.update.memory_use_mb
479        proxy.config.update.retry_count
480        proxy.config.update.retry_interval
481        proxy.config.update.update_configuration
482        proxy.config.url_remap.default_to_server_pac
483        proxy.config.url_remap.default_to_server_pac_port
484        proxy.config.url_remap.filename
485        proxy.config.url_remap.pristine_host_hdr
486        proxy.config.url_remap.remap_required
487        proxy.config.user_name
488        proxy.config.vmap.addr_file
489        proxy.config.vmap.down_up_timeout
490        proxy.config.vmap.enabled
491

LICENSE

493        Simple Apache Traffic Server client object, to communicate with the local manager.
494
495        Licensed to the Apache Software Foundation (ASF) under one or more
496        contributor license agreements.  See the NOTICE file distributed with
497        this work for additional information regarding copyright ownership.
498        The ASF licenses this file to You under the Apache License, Version 2.0
499        (the "License"); you may not use this file except in compliance with
500        the License.  You may obtain a copy of the License at
501
502            http://www.apache.org/licenses/LICENSE-2.0
503
504        Unless required by applicable law or agreed to in writing, software
505        distributed under the License is distributed on an "AS IS" BASIS,
506        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
507        See the License for the specific language governing permissions and
508        limitations under the License.
509
510
511
512perl v5.22.1                      2015-05-05        Apache::TS::AdminClient(3)
Impressum