{"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
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 To enable reporting by use of an HTTP POST request of JSON data to the specified URL, set\u00a0 Here is an example output from viewing stats:<\/p> The\u00a0 *Note: Conveyor is no longer use in the current version of Railgun, so conveyor will no longer be present<\/p> 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>\nstats.log<\/code>\u00a0to\u00a0
1<\/code>.\u00a0<\/p>
stats.url<\/code>\u00a0to a valid\u00a0
URL.stats.interval<\/code>\u00a0determines how frequently stats will be logged or POSTed in minutes.<\/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>
memstats<\/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>
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":"