nmostovoy / signalk-raspberry-pi-monitoring Goto Github PK
View Code? Open in Web Editor NEWSignal K Node Server Plugin for Raspberry PI monitoring (based on signalk-raspberry-pi-temperature)
License: Apache License 2.0
Signal K Node Server Plugin for Raspberry PI monitoring (based on signalk-raspberry-pi-temperature)
License: Apache License 2.0
Sysstat was installed, but environment.rpi.cpu.utilisation just reports 1.
This is on an RPi 4.
pi@GuldenDraak:~ $ uname -r
5.4.51-v7l+
pi@GuldenDraak:~ $ sudo mpstat -P ALL
Linux 5.4.51-v7l+ (GuldenDraak) 09/11/2020 _armv7l_ (4 CPU)
11:16:48 AM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
11:16:48 AM all 3.00 0.00 2.61 0.02 0.00 0.18 0.00 0.00 0.00 94.19
11:16:48 AM 0 3.19 0.00 2.83 0.04 0.00 0.21 0.00 0.00 0.00 93.73
11:16:48 AM 1 2.98 0.00 2.59 0.02 0.00 0.18 0.00 0.00 0.00 94.24
11:16:48 AM 2 2.95 0.00 2.59 0.02 0.00 0.17 0.00 0.00 0.00 94.27
11:16:48 AM 3 2.87 0.00 2.43 0.02 0.00 0.17 0.00 0.00 0.00 94.51
I think this is the same problem as issue #2, which was closed without being resolved.
The problem is the locale dependent presentation of the time of day. In the USA, the time is shown as a 12 hour time with a separate column for AM and PM, while other locales use a 24 hour clock.
This shifted all the columns and messed up the parsing.
By specifying the environment variable as part of the command, the time presentation will be consistent across all systems.
In addition, the sudo is not required for execution of the mpstat command. It just slows things down, so I removed it.
Units should be incorporated into plugin so users don't have manually add them.
Hi,
first, thanks for this great project. The raspberry stats are very useful in Signalk.
However the path "environment.rpi.sd.utilisation" shows just NaN.
First analysis when executing the stored command
df / | grep -v Used | awk '{print $5}' |awk 'gsub("%","")'
(after removing the escaping character "")
in Terminal, the following output is shown:
Verw
71
This might be connected to the 'de_DE.UTF-8' locale I'm using, but it seems like the title column is not removed and therefore a type casting from string to int fails.
Raspbian stats (cat /etc/os-release):
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Best regards
hailigsbleche
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.