bug-fix (cpu-speed)
This commit is contained in:
parent
e147db757e
commit
3093bbc21a
@ -1,6 +1,6 @@
|
|||||||
# systeminfo
|
# systeminfo
|
||||||
|
|
||||||
Simple system monitoring library for node.js - Version 0.0.2
|
Simple system monitoring library for node.js - Version 0.0.3
|
||||||
|
|
||||||
## Core concept
|
## Core concept
|
||||||
|
|
||||||
@ -49,6 +49,7 @@ systeminfo.cpu(function(data) {
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| -------------- | -------------- | -------- |
|
| -------------- | -------------- | -------- |
|
||||||
|
| 0.0.3 | 2014-04-14 | bug-fix (cpu_speed) |
|
||||||
| 0.0.2 | 2014-03-14 | Optimization FS-Speed & CPU current speed |
|
| 0.0.2 | 2014-03-14 | Optimization FS-Speed & CPU current speed |
|
||||||
| 0.0.1 | 2014-03-13 | initial release |
|
| 0.0.1 | 2014-03-13 | initial release |
|
||||||
|
|
||||||
|
|||||||
@ -220,9 +220,9 @@ exports.cpu_speed = function(callback) {
|
|||||||
} else {
|
} else {
|
||||||
var output = "";
|
var output = "";
|
||||||
if (fs.existsSync("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq")) {
|
if (fs.existsSync("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq")) {
|
||||||
output = fs.readFileSync("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq");
|
output = fs.readFileSync("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq").toString();
|
||||||
} else if (fs.existsSync("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq")) {
|
} else if (fs.existsSync("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq")) {
|
||||||
output = fs.readFileSync("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq");
|
output = fs.readFileSync("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq").toString();
|
||||||
}
|
}
|
||||||
if (output.trim()) {
|
if (output.trim()) {
|
||||||
var lines = output.toString().split('\n');
|
var lines = output.toString().split('\n');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user