{"id":1579,"date":"2020-06-07T22:15:13","date_gmt":"2020-06-07T14:15:13","guid":{"rendered":"https:\/\/www.wesbytes.com\/guide\/?post_type=kb&#038;p=1579"},"modified":"2026-01-12T13:58:28","modified_gmt":"2026-01-12T05:58:28","slug":"how-to-enabling-railgun-statistics","status":"publish","type":"kb","link":"https:\/\/www.servergigabit.com\/guide\/kb\/how-to-enabling-railgun-statistics","title":{"rendered":"How to Enabling Railgun Statistics?"},"content":{"rendered":"<h3><strong>How to Enabling Railgun Statistics?<\/strong><\/h3>\n<p>Enabling railgun stats will record global statistics for the Railgun listener and setup a listening endpoint for HTTP connections. To enable statistics reporting set\u00a0<code>stats.log<\/code>\u00a0to\u00a0<code>1<\/code>.<\/p>\n<p>To enable reporting by use of an HTTP POST request of <a href=\"https:\/\/www.w3schools.com\/whatis\/whatis_json.asp\" rel=\"nofollow noopener\" target=\"_blank\">JSON<\/a> data to the specified URL, set\u00a0<code>stats.url<\/code>\u00a0to a valid\u00a0<code>URL.stats.interval<\/code>\u00a0determines how frequently stats will be logged or POSTed in minutes.<\/p>\n<p>Here is an example output from viewing stats:<\/p>\n<pre>{    \r\n\"delta_compression_ratio\": 4552,    \r\n\"memstats.Frees\": 78483728,    \r\n\"memstats.Mallocs\": 80708595,    \r\n\"memstats.alloc\": 2235213408,    \r\n\"memstats.heap_alloc\": 2235213408,    \r\n\"memstats.heap_idle\": 1157988352,    \r\n\"memstats.heap_in_use\": 2562883584,    \r\n\"memstats.heap_objects\": 2224867,    \r\n\"memstats.heap_released\": 1157890048,    \r\n\"memstats.heap_sys\": 3720871936,    \r\n\"memstats.lookups\": 1313043,    \r\n\"memstats.num_gc\": 92,    \r\n\"memstats.pause_ns\": 185276,    \r\n\"memstats.stack_in_use\": 46768128,    \r\n\"memstats.stack_sys\": 47841280,    \r\n\"memstats.sys\": 4026019808,    \r\n\"memstats.total_alloc\": 12652595080,    \r\n\"recycler_cleans_chunk\": 1,    \r\n\"recycler_cleans_hasher\": 1,    \r\n\"recycler_give\": 0,    \r\n\"recycler_queue_chunk\": 9815,    \r\n\"recycler_queue_hasher\": 2,    \r\n\"recycler_removed_chunk\": 0,    \r\n\"recycler_removed_hasher\": 0,    \r\n\"recycler_retained_chunk\": 96621416,    \r\n\"recycler_retained_hasher\": 173178,    \r\n\"recycler_tuned_chunk\": 11957,    \r\n\"recycler_tuned_hasher\": 81986,    \r\n\"requests_completed\": 17487,    \r\n\"requests_started\": 17589,    \r\n\"time\": 1416343217,    \r\n\"uncompressed_chunks\": 32601,    \r\n\"wan_bytes_sent\": 624557633,    \r\n\"wan_starts\": 667,    \r\n\"wan_stops\": 23 \r\n}<\/pre>\n<p>The\u00a0<code>memstats<\/code>\u00a0fields derived from Golang recorded statistics from the memory allocator. The recycler statistics are from Railgun\u2019s memory recycler, which frees up memory for reuse.<\/p>\n<p>*Note: Conveyor is no longer use in the current version of Railgun, so conveyor will no longer be present<\/p>\n<p><strong><br \/>\nLog fields<\/strong><br \/>\nThe below fields are important to review when troubleshooting Railgun issues.<\/p>\n<p><code>bytes_retrieved<\/code>: the number of bytes retrieved by the rg-listener from the origin web server for the request.<\/p>\n<p><code>delta_compression_ratio<\/code>: the average compression achieved for requests served by Railgun where a ratio of 1 means 99.99% and 10000 means 0% compression.<\/p>\n<p><code>requests_completed<\/code>: the number of HTTP requests successfully handled by the rg-listener.<\/p>\n<p><code>requests_started<\/code>: the number of HTTP requests received by the rg-listener.<\/p>\n<p><code>uncompressed_chunks<\/code>: Refers to data sent from the rg-listener to the rg-sender with no compression done by Railgun. This means the content either was previously compress, or no change was present so no data was sent.<\/p>\n<p><code>wan_bytes_sent<\/code>: the number of bytes sent from the rg-listener to the rg-sender. This includes both compressed and uncompressed data.<\/p>\n<p>&nbsp;<\/p>\n<p><span data-sheets-root=\"1\">Please refer to the following article to know more.<br \/>\nKnowledge Base: <a href=\"https:\/\/www.servergigabit.com\/guide\/kb\/use-railgun-with-origin-ca-certificates\">Step-by-step to Use Railgun with Origin CA Certificates<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Enabling Railgun Statistics? Enabling railgun stats will record global statistics for the Railgun listener and setup a listening endpoint for HTTP connections. To enable statistics reporting set\u00a0stats.log\u00a0to\u00a01. To enable reporting by use of an HTTP POST request of JSON data to the specified URL, set\u00a0stats.url\u00a0to a valid\u00a0URL.stats.interval\u00a0determines how frequently stats will be logged or POSTed in minutes. Here&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"kbtopic":[43],"kbtag":[1423],"class_list":["post-1579","kb","type-kb","status-publish","hentry","kbtopic-cloudflare","kbtag-railgun-statistics"],"_links":{"self":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/comments?post=1579"}],"version-history":[{"count":4,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1579\/revisions"}],"predecessor-version":[{"id":6024,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1579\/revisions\/6024"}],"wp:attachment":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/media?parent=1579"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=1579"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtag?post=1579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}