systeminformation 5.16.1 → 5.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/docker.js +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
[![Git Issues][issues-img]][issues-url]
|
|
25
25
|
[![Closed Issues][closed-issues-img]][closed-issues-url]
|
|
26
26
|
<img src="docs/assets/no-dependencies.svg" alt="no dependencies">
|
|
27
|
-
[![Caretaker][caretaker-image]][caretaker-url]
|
|
28
27
|
[![Sponsoring][sponsor-badge]][sponsor-url]
|
|
28
|
+
[![Caretaker][caretaker-image]][caretaker-url]
|
|
29
29
|
[![MIT license][license-img]][license-url]
|
|
30
30
|
|
|
31
31
|
This is amazing. Started as a small project just for myself, it now has > 15,000 lines of code, > 500 versions published, up to 5 mio downloads per month, > 100 mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who contributed to this project!
|
|
@@ -1057,7 +1057,7 @@ All other trademarks are the property of their respective owners.
|
|
|
1057
1057
|
[downloads-image]: https://img.shields.io/npm/dm/systeminformation.svg?style=flat-square
|
|
1058
1058
|
[downloads-url]: https://npmjs.org/package/systeminformation
|
|
1059
1059
|
|
|
1060
|
-
[sponsor-badge]: https://img.shields.io/badge
|
|
1060
|
+
[sponsor-badge]: https://img.shields.io/badge/Support-Buy%20me%20a%20coffee-brightgreen?style=flat-square
|
|
1061
1061
|
[sponsor-url]: https://www.buymeacoffee.com/systeminfo
|
|
1062
1062
|
|
|
1063
1063
|
[license-url]: https://github.com/sebhildebrandt/systeminformation/blob/master/LICENSE
|
package/lib/docker.js
CHANGED
|
@@ -361,7 +361,12 @@ function docker_calcCPUPercent(cpu_stats, precpu_stats) {
|
|
|
361
361
|
|
|
362
362
|
if (systemDelta > 0.0 && cpuDelta > 0.0) {
|
|
363
363
|
// calculate the change for the cpu usage of the container in between readings
|
|
364
|
-
|
|
364
|
+
if (precpu_stats.online_cpus) {
|
|
365
|
+
cpuPercent = (cpuDelta / systemDelta) * precpu_stats.online_cpus * 100.0;
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
cpuPercent = (cpuDelta / systemDelta) * cpu_stats.cpu_usage.percpu_usage.length * 100.0;
|
|
369
|
+
}
|
|
365
370
|
}
|
|
366
371
|
|
|
367
372
|
return cpuPercent;
|
|
@@ -706,6 +711,7 @@ function dockerVolumes(callback) {
|
|
|
706
711
|
}
|
|
707
712
|
|
|
708
713
|
exports.dockerVolumes = dockerVolumes;
|
|
714
|
+
|
|
709
715
|
function dockerAll(callback) {
|
|
710
716
|
return new Promise((resolve) => {
|
|
711
717
|
process.nextTick(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.16.
|
|
3
|
+
"version": "5.16.2",
|
|
4
4
|
"description": "Advanced, lightweight system and OS information library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
|