소스 검색

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

tunefish 1 년 전
부모
커밋
85b0cfa53f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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, ' ');