Ein Modul zur Erfassen von diversen RPi/Linux-Statistiken (SYSMON)

Begonnen von hexenmeister, 06 Dezember 2013, 17:44:38

Vorheriges Thema - Nächstes Thema

volschin

Hallo Alexander,
bei mir aktualisiert es seit dem Update 15.9. die cpu_diff Werte nicht mehr. Bin ich damit allein?

Gruß
Veit
Intel NUC+Ubuntu 24.04+Docker+FHEM6
HomeMatic: HM-MOD-RPI-PCB+HM-USB-CFG2+hmland+diverse, HUE: Hue-Bridge, RaspBee+deCONZ+diverse
Amzn Dash-Buttons, Siro Rollos
4xRPi, 4xCO20, OWL+USB, HarmonyHub, FRITZ!Box 7590, Echo Dots+Show8, HomeBridge

moonsorrox

Zitat von: Wernieman am 16 September 2015, 08:45:39
naja .. einfach "free" eingeben und uns die Ausgabe geben ;o)

htop hat große Vorteile .. aber auch große Nachteile .. ;o)

so da ich grad heute wieder diese Meldungen im Log habe:
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $val in addition (+) at ./FHEM/42_SYSMON.pm line 1467.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $val in numeric lt (<) at ./FHEM/42_SYSMON.pm line 1466.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $val in numeric gt (>) at ./FHEM/42_SYSMON.pm line 1465.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $val in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 1462.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_present in string eq at ./FHEM/42_SYSMON.pm line 3661.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_voltage in multiplication (*) at ./FHEM/42_SYSMON.pm line 3659.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_current in multiplication (*) at ./FHEM/42_SYSMON.pm line 3659.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_current in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3659.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_voltage in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3659.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_online in string eq at ./FHEM/42_SYSMON.pm line 3659.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_present in string eq at ./FHEM/42_SYSMON.pm line 3659.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_current in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3658.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_voltage in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3658.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_present in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3658.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_online in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3658.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_present in string ne at ./FHEM/42_SYSMON.pm line 3651.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_voltage in multiplication (*) at ./FHEM/42_SYSMON.pm line 3629.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_current in multiplication (*) at ./FHEM/42_SYSMON.pm line 3629.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_current in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3629.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_voltage in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3629.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_online in string eq at ./FHEM/42_SYSMON.pm line 3629.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_present in string eq at ./FHEM/42_SYSMON.pm line 3629.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_current in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3628.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_voltage in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3628.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_present in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3628.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_online in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3628.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $string in substitution (s///) at ./FHEM/99_Utils.pm line 132.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $string in substitution (s///) at ./FHEM/99_Utils.pm line 131.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_voltage in multiplication (*) at ./FHEM/42_SYSMON.pm line 3604.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_voltage in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3604.
2015.09.17 13:49:52 1: PERL WARNING: Use of uninitialized value $d_voltage in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3603.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $val in addition (+) at ./FHEM/42_SYSMON.pm line 1467.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $val in numeric lt (<) at ./FHEM/42_SYSMON.pm line 1466.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $val in numeric gt (>) at ./FHEM/42_SYSMON.pm line 1465.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $val in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 1462.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_present in string eq at ./FHEM/42_SYSMON.pm line 3661.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_voltage in multiplication (*) at ./FHEM/42_SYSMON.pm line 3659.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_current in multiplication (*) at ./FHEM/42_SYSMON.pm line 3659.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_current in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3659.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_voltage in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3659.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_online in string eq at ./FHEM/42_SYSMON.pm line 3659.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_present in string eq at ./FHEM/42_SYSMON.pm line 3659.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_current in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3658.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_voltage in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3658.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_present in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3658.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_online in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3658.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_present in string ne at ./FHEM/42_SYSMON.pm line 3651.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_voltage in multiplication (*) at ./FHEM/42_SYSMON.pm line 3629.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_current in multiplication (*) at ./FHEM/42_SYSMON.pm line 3629.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_current in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3629.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_voltage in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3629.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_present in string eq at ./FHEM/42_SYSMON.pm line 3629.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_current in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3628.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_voltage in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3628.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $d_present in concatenation (.) or string at ./FHEM/42_SYSMON.pm line 3628.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $string in substitution (s///) at ./FHEM/99_Utils.pm line 132.
2015.09.17 13:47:50 1: PERL WARNING: Use of uninitialized value $string in substitution (s///) at ./FHEM/99_Utils.pm line 131.



hier die Ausgabe von free:
root@cubietruck:~# free
             total       used       free     shared    buffers     cached
Mem:       2046940    1646528     400412      89100     146384     467528
-/+ buffers/cache:    1032616    1014324
Swap:            0          0          0
Intel-NUC i5: FHEM-Server 6.1 :: Perl v5.18.2

Homematic: HM-USB-CFG2,HM-CFG-LAN Adapter, HM-LC-BL1-FM, HM-LC-Sw1PBU-FM, HM-LC-Sw1-PI-2, HM-WDS10-TH-O, HM-CC-TC, HM-LC-SW2-FM

hexenmeister

Zitat von: volschin am 17 September 2015, 09:04:36
bei mir aktualisiert es seit dem Update 15.9. die cpu_diff Werte nicht mehr. Bin ich damit allein?

Stimmt, war kaput. Habe repariert ;)

hexenmeister

@moonsorrox
Hm... recht voll, aber ganz alle auch wieder nicht. Evtl. kein Stück, der groß genug wäre (wegen Fragmentierung), aber da bin ich nicht fit genug. Ich würde probeweise SWAP aktivieren.

Wernieman

Auf Mangel von SWAP bin ich auch gekommen .. weiß nur nicht, wie es mit dem RasPi dazu aussieht ...
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

hexenmeister

Zitat von: Wernieman am 18 September 2015, 08:13:55
wie es mit dem RasPi dazu aussieht ...

Muss Cubietruck sein (steht in Signatur), Raspi hat auch keine 2 GB RAM (meines Wissens).
Dennoch SWAP ist da so eine Sache... auf der SD-Card nicht ganz so günstig. Es sei denn, da hängt eine HDD dran... Testweise würde ich dennoch aktivieren. Langfristig sollte man aber zusehen, dass keine Speicherfresser unterwegt sind. Sollte das bei der Nutzung 'normal' sein, dann ist die Hardware mit der Aufgabe überfordert. Was läuft da eigentlich alles außer FHEM?


moonsorrox

Zitat von: hexenmeister am 18 September 2015, 10:16:03
Muss Cubietruck sein (steht in Signatur), Raspi hat auch keine 2 GB RAM (meines Wissens).
Dennoch SWAP ist da so eine Sache... auf der SD-Card nicht ganz so günstig. Es sei denn, da hängt eine HDD dran... Testweise würde ich dennoch aktivieren. Langfristig sollte man aber zusehen, dass keine Speicherfresser unterwegt sind. Sollte das bei der Nutzung 'normal' sein, dann ist die Hardware mit der Aufgabe überfordert. Was läuft da eigentlich alles außer FHEM?
ja richtig, ich habe einen Cubie.. SD Karte setze ich nicht ein, bei mir ist die Boot Partition im Nand und der Rest auf einer SSD
Bei mir läuft nur FHEM drauf weiter nichts, also reiner Hausautomationsserver...

Wie aktiviere ich denn SWAP  :-\
Sollte eiegntlich auch flüssig laufen aber oftmals braucht er richtig lange wenn ich mal einen Neustart über FHEM mache...
Intel-NUC i5: FHEM-Server 6.1 :: Perl v5.18.2

Homematic: HM-USB-CFG2,HM-CFG-LAN Adapter, HM-LC-BL1-FM, HM-LC-Sw1PBU-FM, HM-LC-Sw1-PI-2, HM-WDS10-TH-O, HM-CC-TC, HM-LC-SW2-FM

Wernieman

#1087
Hast Du noch etwas Platz auf der SSD?

Ansonsten ... müstest Du eine SWAP-Datei einrichten ... das habe ich (meinereiner) aber noch nicht gmacht ...

Edit:
Ist zwar nicht Cubi, aber Trotzdem vergleichbar:
https://wiki.ubuntuusers.de/SWAP
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

PeMue

Zitat von: hexenmeister am 13 September 2015, 17:25:06
Nein, userReadings ist ein FHEM-Mechanismus und hat mit SYSMON nicht direkt was zu tun. SYSMON bietet abereine ähnliche Möglichkeit: user-fn
Funktioniert, danke für de Hinweis.

Gruß PeMue
RPi3Bv1.2 rpiaddon 1.66 6.0 1xHM-CC-RT-DN 1.4 1xHM-TC-IT-WM 1.1 2xHB-UW-Sen-THPL-O 0.15 1x-I 0.14OTAU  1xCUNO2 1.67 2xEM1000WZ 2xUniroll 1xASH2200 3xHMS100T(F) 1xRFXtrx 90 1xWT440H 3xTFA30.3150 5xFA21
RPi1Bv2 LCDCSM 1.63 5.8 2xMAX HKT 1xMAX RT V200KW1 Heizung Wasser

kvo1

Hallo Alex,

ich habe in meinem Log folgende Meldung ......

Zitatkeys on reference is experimental at ./FHEM/42_SYSMON.pm line 4322, <$fh> line 63.
keys on reference is experimental at ./FHEM/42_SYSMON.pm line 4600, <$fh> line 63.

was könnte das sein ?

gruss + Danke !
klaus
RPi1: mit CUL: HM-CC-RT-DN,HM-ES-PMSw1-Pl,HM-LC-BL1-FM,HM-LC-Bl1PBU-FM,HM-LC-SW1-PL2,HM-SCI-3-FM,HM-SEC-SC-2,KFM-Sensor
RPi2: Viessmann(optolink) mit 99_VCONTROL.pm,
Cubietruck: Wheezy / Apache / Owncloud
Cubietruck: Armbian(Jessie) / fhem 5.7 / LMS 7.9
RPi3: (Test) mit 7" Touch  &  HM-MOD-RPI-PCB

hexenmeister

Hi,

ist nur eine Warnung, keine weitere Auswirkung. Wenn Du barCharts nicht verwendest, kannst die Version ohne nehmen, habe vor kurzen hier angehängt.

kvo1

Zitat von: hexenmeister am 28 September 2015, 14:25:11
Hi,

ist nur eine Warnung, keine weitere Auswirkung. Wenn Du barCharts nicht verwendest, kannst die Version ohne nehmen, habe vor kurzen hier angehängt.
barCharts  ?? sagt nur grad nix.

Meinst Du die Version aus « Antwort #1053 am: 31 August 2015, 22:01:14 » ?

Derzeit verwende ich # $Id: 42_SYSMON.pm 9269 2015-09-17 19:39:41Z hexenmeister $
... und einige Deiner Plots !


RPi1: mit CUL: HM-CC-RT-DN,HM-ES-PMSw1-Pl,HM-LC-BL1-FM,HM-LC-Bl1PBU-FM,HM-LC-SW1-PL2,HM-SCI-3-FM,HM-SEC-SC-2,KFM-Sensor
RPi2: Viessmann(optolink) mit 99_VCONTROL.pm,
Cubietruck: Wheezy / Apache / Owncloud
Cubietruck: Armbian(Jessie) / fhem 5.7 / LMS 7.9
RPi3: (Test) mit 7" Touch  &  HM-MOD-RPI-PCB

hexenmeister

Zitat von: kvo1 am 28 September 2015, 17:30:07
barCharts  ?? sagt nur grad nix.

Meinst Du die Version aus « Antwort #1053 am: 31 August 2015, 22:01:14 » ?

Derzeit verwende ich # $Id: 42_SYSMON.pm 9269 2015-09-17 19:39:41Z hexenmeister $
... und einige Deiner Plots !
Ja, die meine ich. Das ist eine leicht ältere Version ohne Chart-Methoden. Funktioniert genau so gut, wenn Dich die Warnungen wirklich stören.

PeMue

Hallo Alexander,

ich habe mir eine Übersicht mit SYSMON_ShowValuesHTMLTitled gebaut. Jetzt würde ich gerne die Temperatur mit einer Kommastelle und °C anzeigen lassen. Gibt es da auch so ein schönes Attribut ValueFormat wie bei ReadingsGroup? Habe gesucht, aber leider nichts gefunden.
Die Alternative wäre ein UserReading zu machen ...

Danke + Gruß

PeMue
RPi3Bv1.2 rpiaddon 1.66 6.0 1xHM-CC-RT-DN 1.4 1xHM-TC-IT-WM 1.1 2xHB-UW-Sen-THPL-O 0.15 1x-I 0.14OTAU  1xCUNO2 1.67 2xEM1000WZ 2xUniroll 1xASH2200 3xHMS100T(F) 1xRFXtrx 90 1xWT440H 3xTFA30.3150 5xFA21
RPi1Bv2 LCDCSM 1.63 5.8 2xMAX HKT 1xMAX RT V200KW1 Heizung Wasser

hexenmeister

Hallo Peter,

habe gerade so was in der Art eingebaut. Nach dem Update (morgen, oder heute aus SVN herausholen) kann man Format-String (intern wird sprintf benutzt) mitangeben (%.1f bei cpu_temp):

htmlCode {SYSMON_ShowValuesHTMLTitled('sysmon','<b>CubieTruck</b>', ('date','cpu_temp:CPU temperature:&deg;C:%.1f','cpu_freq:CPU frequency: MHz','cpu_bogomips','uptime_text','fhemuptime_text','loadavg','ram','swap','power_ac_text','power_usb_text','power_battery_text','fhem_version:FHEM version'))}

Hilft Dir da weiter?

Grüße,

Alexander