processes() fix alpine linux

This commit is contained in:
Sebastian Hildebrandt
2021-09-01 00:51:24 +02:00
parent 20686814b0
commit 9edbb44308
5 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -689,7 +689,7 @@ function processes(callback) {
if (_darwin) { cmd = 'export LC_ALL=C; ps -axo pid,ppid,pcpu,pmem,pri,vsz,rss,nice,lstart,state,tty,user,command -r; unset LC_ALL'; }
if (_sunos) { cmd = 'ps -Ao pid,ppid,pcpu,pmem,pri,vsz,rss,nice,stime,s,tty,user,comm'; }
exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) {
if (!error) {
if (!error && stdout.toString().trim()) {
result.list = (parseProcesses(stdout.toString().split('\n'))).slice();
result.all = result.list.length;
result.running = result.list.filter(function (e) {