Przeglądaj źródła

Merge branch 'hotfix/top-locale' of hostbbq/hostbbq-monitoring into master

tunefish 1 rok temu
rodzic
commit
85b0cfa53f
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      daemon/src/top-tty.ts

+ 1 - 1
daemon/src/top-tty.ts

@@ -23,7 +23,7 @@ export class TopTTY {
   public async runloop() {
     while (true) {
       try {
-        await execTTY('top -d 0.5', { cols: 100, rows: 10 }, (line: string) => {
+        await execTTY('top -d 0.5', { cols: 100, rows: 10, env: { LC_ALL: 'C' } }, (line: string) => {
           if (line.includes('Cpu')) {
             line = line.replace(/\u001b(\[|\()([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGKB]/g, ''); // get rid of tty color format codes
             line = line.replace(/:/g, ' ');