set LC_ALL to C in order to avoid number formatting problem.

pull/163/head
Shirou WAKAYAMA 9 years ago
parent 79f021f66e
commit 3166d41538

@ -3,6 +3,7 @@
package common
import (
"os"
"os/exec"
"strings"
"syscall"
@ -10,6 +11,7 @@ import (
)
func DoSysctrl(mib string) ([]string, error) {
os.Setenv("LC_ALL", "C")
out, err := exec.Command("/usr/sbin/sysctl", "-n", mib).Output()
if err != nil {
return []string{}, err

@ -3,6 +3,7 @@
package common
import (
"os"
"os/exec"
"strings"
"syscall"
@ -10,6 +11,7 @@ import (
)
func DoSysctrl(mib string) ([]string, error) {
os.Setenv("LC_ALL", "C")
out, err := exec.Command("/sbin/sysctl", "-n", mib).Output()
if err != nil {
return []string{}, err

Loading…
Cancel
Save