minor fix (removed console.log)
This commit is contained in:
parent
45dd78b5d2
commit
f344f45f91
@ -94,6 +94,7 @@ Other changes
|
||||
|
||||
| Version | Date | Comment |
|
||||
| -------------- | -------------- | -------- |
|
||||
| 3.17.2 | 2017-04-24 | minor fix (removed console.log) |
|
||||
| 3.17.1 | 2017-04-23 | fixed bugs fsSize(win), si.processes (command), si.osinfo(win) |
|
||||
| 3.17.0 | 2017-02-19 | windows support for some first functions, extended process list (linux)|
|
||||
| 3.16.0 | 2017-01-19 | blockDevices: added removable attribute + fix |
|
||||
|
||||
@ -36,7 +36,7 @@ function dockerContainers(all, callback) {
|
||||
* @namespace
|
||||
* @property {string} Id
|
||||
*/
|
||||
return (obj.Id && (obj.Id == id))
|
||||
return (obj.Id && (obj.Id === id))
|
||||
});
|
||||
return (filtered.length > 0);
|
||||
}
|
||||
|
||||
@ -82,6 +82,7 @@
|
||||
// --------------------------------
|
||||
//
|
||||
// version date comment
|
||||
// 3.17.2 2017-04-24 minor fix (removed console.log)
|
||||
// 3.17.1 2017-04-23 fixed bugs fsSize(win), si.processes (command), si.osinfo(win)
|
||||
// 3.17.0 2017-02-19 windows support for some first functions
|
||||
// 3.16.0 2017-01-19 blockDevices: added removable attribute + fix
|
||||
|
||||
@ -164,31 +164,31 @@ function processes(callback) {
|
||||
// }
|
||||
}
|
||||
|
||||
checkColumn(0)
|
||||
checkColumn(0);
|
||||
let pid = parseInt(line.substring(parsedhead[0].from + offset, parsedhead[0].to + offset2));
|
||||
checkColumn(1)
|
||||
checkColumn(1);
|
||||
let pcpu = parseFloat(line.substring(parsedhead[1].from + offset, parsedhead[1].to + offset2).replace(/,/g, "."));
|
||||
checkColumn(2)
|
||||
checkColumn(2);
|
||||
let pmem = parseFloat(line.substring(parsedhead[2].from + offset, parsedhead[2].to + offset2).replace(/,/g, "."));
|
||||
checkColumn(3)
|
||||
checkColumn(3);
|
||||
let priority = parseInt(line.substring(parsedhead[3].from + offset, parsedhead[3].to + offset2));
|
||||
checkColumn(4)
|
||||
checkColumn(4);
|
||||
let vsz = parseInt(line.substring(parsedhead[4].from + offset, parsedhead[4].to + offset2));
|
||||
checkColumn(5)
|
||||
checkColumn(5);
|
||||
let rss = parseInt(line.substring(parsedhead[5].from + offset, parsedhead[5].to + offset2));
|
||||
checkColumn(6)
|
||||
checkColumn(6);
|
||||
let nice = parseInt(line.substring(parsedhead[6].from + offset, parsedhead[6].to + offset2));
|
||||
checkColumn(7)
|
||||
checkColumn(7);
|
||||
let started = line.substring(parsedhead[7].from + offset, parsedhead[7].to + offset2).trim();
|
||||
checkColumn(8)
|
||||
checkColumn(8);
|
||||
let state = line.substring(parsedhead[8].from + offset, parsedhead[8].to + offset2).trim();
|
||||
state = (state[0] === 'R' ? 'running' : (state[0] === 'S' ? 'sleeping' : (state[0] === 'T' ? 'stopped' : (state[0] === 'W' ? 'paging' : (state[0] === 'X' ? 'dead' : (state[0] === 'Z' ? 'zombie' : ((state[0] === 'D' || state[0] === 'U') ? 'blocked' : 'unknown')))))));
|
||||
checkColumn(9)
|
||||
checkColumn(9);
|
||||
let tty = line.substring(parsedhead[9].from + offset, parsedhead[9].to + offset2).trim();
|
||||
if (tty === '?' || tty === '??') tty = '';
|
||||
checkColumn(10)
|
||||
checkColumn(10);
|
||||
let user = line.substring(parsedhead[10].from + offset, parsedhead[10].to + offset2).trim();
|
||||
checkColumn(11)
|
||||
checkColumn(11);
|
||||
let command = line.substring(parsedhead[11].from + offset, parsedhead[11].to + offset2).trim().replace(/\[/g, "").replace(/]/g, "");
|
||||
|
||||
return ({
|
||||
@ -214,7 +214,6 @@ function processes(callback) {
|
||||
if (lines.length > 1) {
|
||||
let head = lines[0];
|
||||
parsedhead = parseHead(head, 8);
|
||||
console.log(parsedhead)
|
||||
lines.shift();
|
||||
lines.forEach(function (line) {
|
||||
if (line.trim() !== '') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user