{"id":2739,"date":"2019-10-23T11:00:59","date_gmt":"2019-10-23T03:00:59","guid":{"rendered":"https:\/\/www.mondoze.com\/guide\/?post_type=kb&p=2739"},"modified":"2022-10-05T08:02:00","modified_gmt":"2022-10-05T00:02:00","slug":"enabling-railgun-stats","status":"publish","type":"kb","link":"https:\/\/www.mondoze.com\/guide\/kb\/enabling-railgun-stats","title":{"rendered":"How to Enabling Railgun Statistics?"},"content":{"rendered":"\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t

How To Enable Railgun Statistics<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t

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<\/code>\u00a0to\u00a01<\/code>.\u00a0<\/p>

To enable reporting by use of an HTTP POST request of JSON data to the specified URL, set\u00a0stats.url<\/code>\u00a0to a valid\u00a0URL.stats.interval<\/code>\u00a0determines how frequently stats will be logged or POSTed in minutes.<\/p>

Here is an example output from viewing stats:<\/p>

{    \n\"delta_compression_ratio\": 4552,    \n\"memstats.Frees\": 78483728,    \n\"memstats.Mallocs\": 80708595,    \n\"memstats.alloc\": 2235213408,    \n\"memstats.heap_alloc\": 2235213408,    \n\"memstats.heap_idle\": 1157988352,    \n\"memstats.heap_in_use\": 2562883584,    \n\"memstats.heap_objects\": 2224867,    \n\"memstats.heap_released\": 1157890048,    \n\"memstats.heap_sys\": 3720871936,    \n\"memstats.lookups\": 1313043,    \n\"memstats.num_gc\": 92,    \n\"memstats.pause_ns\": 185276,    \n\"memstats.stack_in_use\": 46768128,    \n\"memstats.stack_sys\": 47841280,    \n\"memstats.sys\": 4026019808,    \n\"memstats.total_alloc\": 12652595080,    \n\"recycler_cleans_chunk\": 1,    \n\"recycler_cleans_hasher\": 1,    \n\"recycler_give\": 0,    \n\"recycler_queue_chunk\": 9815,    \n\"recycler_queue_hasher\": 2,    \n\"recycler_removed_chunk\": 0,    \n\"recycler_removed_hasher\": 0,    \n\"recycler_retained_chunk\": 96621416,    \n\"recycler_retained_hasher\": 173178,    \n\"recycler_tuned_chunk\": 11957,    \n\"recycler_tuned_hasher\": 81986,    \n\"requests_completed\": 17487,    \n\"requests_started\": 17589,    \n\"time\": 1416343217,    \n\"uncompressed_chunks\": 32601,    \n\"wan_bytes_sent\": 624557633,    \n\"wan_starts\": 667,    \n\"wan_stops\": 23 \n}<\/pre>

The\u00a0memstats<\/code>\u00a0fields derived from Golang recorded statistics from the memory allocator. The recycler statistics are from Railgun’s memory recycler, which frees up memory for reuse.<\/p>

*Note: Conveyor is no longer use in the current version of Railgun, so conveyor will no longer be present<\/p>


Log fields<\/strong>
The below fields are important to review when troubleshooting Railgun issues.<\/p>

bytes_retrieved<\/code>: the number of bytes retrieved by the rg-listener from the origin web server for the request.<\/p>

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>

requests_completed<\/code>: the number of HTTP requests successfully handled by the rg-listener.<\/p>

requests_started<\/code>: the number of HTTP requests received by the rg-listener.<\/p>

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>

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>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"

How To Enable 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.\u00a0 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 …<\/p>\n

How to Enabling Railgun Statistics?<\/span> Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}}},"kbtopic":[53],"kbtag":[110],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/2739"}],"collection":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/comments?post=2739"}],"version-history":[{"count":6,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/2739\/revisions"}],"predecessor-version":[{"id":18785,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/2739\/revisions\/18785"}],"wp:attachment":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/media?parent=2739"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=2739"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtag?post=2739"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=2739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}