postgresqltuner icon indicating copy to clipboard operation
postgresqltuner copied to clipboard

Unable to get memory infos when other lang than Englisch

Open Bender1983 opened this issue 2 years ago • 0 comments

Hi

I just wanna let you know, when the language other than English is set by example de_CH or whaterever. The memory infos are not get. Its arround Line 321. An easy & very dirty fix could be, to set the language in the os_cmd a few lines before. Of course there are many other better ways to do it. $os_mem=os_cmd("LANGUAGE=en && free -b"); } ($os->{mem_total},$os->{mem_used},$os->{mem_free},$os->{mem_shared},$os->{mem_buffers},$os->{mem_cached})=($os_mem =~ /Mem:\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)/); ($os->{swap_total},$os->{swap_used},$os->{swap_free})=($os_mem =~ /Swap:\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)/);

regards

Bender1983 avatar Sep 21 '23 15:09 Bender1983