Freien SD-Kartenspeicher auslesen ?

Begonnen von cs-online, 07 Februar 2018, 09:24:36

Vorheriges Thema - Nächstes Thema

cs-online

FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266/32 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20+S26,Shelly1/2/2.5, Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV+Speicher, alles auf einem RPI und da geht noch mehr

Helmi55

Das hätte ich auch gern - habe das attr so gesetzt w.o. aber keine Anzeige
hier ein list von meinem sysmon
Internals:
   DEF        1 1 1 10
   INTERVAL_BASE 60
   INTERVAL_MULTIPLIERS 1 1 1 10
   MODE       local
   NAME       sysmon
   NR         176
   STATE      Initialized
   TYPE       SYSMON
   READINGS:
     2018-02-07 18:31:07   SD_free         
     2018-02-07 18:31:07   cpu0_freq       600
     2018-02-07 18:31:07   cpu0_freq_stat  600.00 1200.00 600.01
     2018-02-07 18:31:07   cpu0_idle_stat  0.17 104.02 98.31
     2018-02-07 18:31:07   cpu1_freq       600
     2018-02-07 18:31:07   cpu1_freq_stat  600.00 1200.00 600.01
     2018-02-07 18:31:07   cpu1_idle_stat  0.17 102.44 95.46
     2018-02-07 18:31:07   cpu2_freq       600
     2018-02-07 18:31:07   cpu2_freq_stat  600.00 1200.00 600.01
     2018-02-07 18:31:07   cpu2_idle_stat  0.22 100.00 98.12
     2018-02-07 18:31:07   cpu3_freq       600
     2018-02-07 18:31:07   cpu3_freq_stat  600.00 1200.00 600.01
     2018-02-07 18:31:07   cpu3_idle_stat  0.13 100.88 99.19
     2018-02-07 18:30:07   cpu_bogomips    38.40
     2018-02-07 18:31:07   cpu_core_count  4
     2018-02-07 18:31:07   cpu_freq        600
     2018-02-07 18:31:07   cpu_freq_stat   600.00 1200.00 600.01
     2018-02-07 18:31:07   cpu_idle_stat   40.17 99.69 97.76
     2018-02-07 18:30:07   cpu_model_name  ARMv7 Processor rev 4 (v7l)
     2018-02-07 18:31:07   cpu_temp        47.24
     2018-02-07 18:31:07   cpu_temp_avg    47.7
     2018-02-07 18:31:07   cpu_temp_stat   38.63 90.28 47.64
     2018-02-07 18:31:07   eth0            RX: 0.00 MB, TX: 0.00 MB, Total: 0 MB
     2018-02-07 18:31:07   eth0_diff       RX: 0.00 MB, TX: 0.00 MB, Total: 0.00 MB
     2017-05-21 12:20:41   eth0_ip6        fe80::8cb2:246d:9e09:8d53/64
     2018-02-07 18:31:07   eth0_rx         0
     2018-02-07 18:31:07   eth0_speed      10
     2018-02-07 18:31:07   eth0_tx         0
     2018-02-07 18:31:07   fhemstarttime   1517593840
     2018-02-07 18:31:07   fhemstarttime_text 02.02.2018 18:50:40
     2018-02-07 18:31:07   fhemuptime      430827
     2018-02-07 18:31:07   fhemuptime_text 4 days, 23 hours, 40 minutes
     2018-02-07 18:30:07   fs_boot         Total: 63 MB, Used: 22 MB, 35 %, Available: 42 MB at /boot
     2018-02-07 18:30:07   fs_root         Total: 29972 MB, Used: 15513 MB, 54 %, Available: 13215 MB at /
     2018-02-07 18:31:07   idletime        421205 97.77 %
     2018-02-07 18:31:07   idletime_text   4 days, 21 hours, 00 minutes (97.77 %)
     2018-02-07 18:31:07   loadavg         0.00 0.02 0.00
     2018-02-07 18:30:07   perl_version    v5.20.2
     2018-02-07 18:31:07   ram             Total: 923.35 MB, Used: 156.09 MB, 16.90 %, Free: 767.26 MB
     2018-02-07 18:31:07   ram_used_stat   75.66 188.62 157.70
     2018-02-07 18:31:07   starttime       1517593837
     2018-02-07 18:31:07   starttime_text  02.02.2018 18:50:37
     2018-02-07 18:31:07   stat_cpu        901244 0 821971 168482039 129093 0 11546
     2018-02-07 18:31:07   stat_cpu0       209825 0 196149 40742360 76329 0 5816
     2018-02-07 18:31:07   stat_cpu0_diff  59 0 22 5665 2 0 1
     2018-02-07 18:31:07   stat_cpu0_percent 1.03 0.00 0.38 98.54 0.03 0.00 0.02
     2018-02-07 18:31:07   stat_cpu0_text  user: 1.03 %, nice: 0.00 %, sys: 0.38 %, idle: 98.54 %, io: 0.03 %, irq: 0.00 %, sirq: 0.02 %
     2018-02-07 18:31:07   stat_cpu1       160460 0 185998 42678849 13953 0 584
     2018-02-07 18:31:07   stat_cpu1_diff  6 0 27 5961 1 0 0
     2018-02-07 18:31:07   stat_cpu1_percent 0.10 0.00 0.45 99.43 0.02 0.00 0.00
     2018-02-07 18:31:07   stat_cpu1_text  user: 0.10 %, nice: 0.00 %, sys: 0.45 %, idle: 99.43 %, io: 0.02 %, irq: 0.00 %, sirq: 0.00 %
     2018-02-07 18:31:07   stat_cpu2       358903 0 222477 42417979 26710 0 4329
     2018-02-07 18:31:07   stat_cpu2_diff  56 0 20 5896 13 0 0
     2018-02-07 18:31:07   stat_cpu2_percent 0.94 0.00 0.33 98.51 0.22 0.00 0.00
     2018-02-07 18:31:07   stat_cpu2_text  user: 0.94 %, nice: 0.00 %, sys: 0.33 %, idle: 98.51 %, io: 0.22 %, irq: 0.00 %, sirq: 0.00 %
     2018-02-07 18:31:07   stat_cpu3       172056 0 217347 42642851 12101 0 817
     2018-02-07 18:31:07   stat_cpu3_diff  3 0 33 5960 0 0 0
     2018-02-07 18:31:07   stat_cpu3_percent 0.05 0.00 0.55 99.40 0.00 0.00 0.00
     2018-02-07 18:31:07   stat_cpu3_text  user: 0.05 %, nice: 0.00 %, sys: 0.55 %, idle: 99.40 %, io: 0.00 %, irq: 0.00 %, sirq: 0.00 %
     2018-02-07 18:31:07   stat_cpu_diff   124 0 102 23482 16 0 1
     2018-02-07 18:31:07   stat_cpu_percent 0.52 0.00 0.43 98.98 0.07 0.00 0.00
     2018-02-07 18:31:07   stat_cpu_text   user: 0.52 %, nice: 0.00 %, sys: 0.43 %, idle: 98.98 %, io: 0.07 %, irq: 0.00 %, sirq: 0.00 %
     2018-02-07 18:31:07   swap            Total: 100.00 MB, Used: 0.00 MB,  0.00 %, Free: 100.00 MB
     2018-02-07 18:31:07   swap_used_stat  0.00 4.97 0.01
     2018-02-07 18:31:07   uptime          430830
     2018-02-07 18:31:07   uptime_text     4 days, 23 hours, 40 minutes
     2018-02-07 18:31:07   wlan0           RX: 163.16 MB, TX: 94.37 MB, Total: 257.53 MB
     2018-02-07 18:31:07   wlan0_diff      RX: 0.01 MB, TX: 0.01 MB, Total: 0.02 MB
     2018-02-07 18:31:07   wlan0_ip        10.0.0.10
     2018-02-07 18:31:07   wlan0_rx        171088848
     2018-02-07 18:31:07   wlan0_speed     72.2
     2018-02-07 18:31:07   wlan0_tx        98956209
   helper:
     net_eth0_stat_class 1
     net_wlan0_stat_class 1
     proc_fs    1
     sys_cpu0_freq 1
     sys_cpu0_temp 0
     sys_cpu1_freq 1
     sys_cpu1_temp 0
     sys_cpu2_freq 1
     sys_cpu2_temp 0
     sys_cpu3_freq 1
     sys_cpu3_temp 0
     sys_cpu4_freq 0
     sys_cpu4_temp 0
     sys_cpu5_freq 0
     sys_cpu5_temp 0
     sys_cpu6_freq 0
     sys_cpu6_temp 0
     sys_cpu7_freq 0
     sys_cpu7_temp 0
     sys_cpu_core_num 4
     sys_cpu_freq_rpi_bbb 1
     sys_cpu_num 1
     sys_cpu_temp_bbb 0
     sys_cpu_temp_rpi 1
     sys_fb     0
     sys_power_ac 0
     sys_power_bat 0
     sys_power_usb 0
     u_first_mark 1
     cur_readings_map:
       cpu0_freq  CPU frequency (core 0)
       cpu0_freq_stat CPU frequency (core 0) stat
       cpu0_idle_stat CPU0 min/max/avg (idle)
       cpu1_freq  CPU frequency (core 1)
       cpu1_freq_stat CPU frequency (core 1) stat
       cpu1_idle_stat CPU1 min/max/avg (idle)
       cpu2_freq  CPU frequency (core 2)
       cpu2_freq_stat CPU frequency (core 2) stat
       cpu2_idle_stat CPU2 min/max/avg (idle)
       cpu3_freq  CPU frequency (core 3)
       cpu3_freq_stat CPU frequency (core 3) stat
       cpu3_idle_stat CPU3 min/max/avg (idle)
       cpu4_idle_stat CPU4 min/max/avg (idle)
       cpu5_idle_stat CPU5 min/max/avg (idle)
       cpu6_idle_stat CPU6 min/max/avg (idle)
       cpu7_idle_stat CPU7 min/max/avg (idle)
       cpu_bogomips BogoMIPS
       cpu_core_count Number of CPU cores
       cpu_freq   CPU frequency
       cpu_freq_stat CPU frequency stat
       cpu_idle_stat CPU min/max/avg (idle)
       cpu_model_name CPU model name
       cpu_temp   CPU temperature
       cpu_temp_avg Average CPU temperature
       cpu_temp_stat CPU temperature stat
       date       Date
       eth0       Network adapter eth0
       eth0_diff  Network adapter eth0 (diff)
       eth0_ip    Network adapter eth0 (IP)
       eth0_ip6   Network adapter eth0 (IP6)
       eth0_rx    Network adapter eth0 (RX)
       eth0_speed Network adapter eth0 (speed)
       eth0_tx    Network adapter eth0 (TX)
       fhemstarttime Fhem start time
       fhemstarttime_text Fhem start time
       fhemuptime System up time
       fhemuptime_text FHEM up time
       fs_boot    Filesystem /boot
       fs_boot_free Filesystem /boot (free)
       fs_boot_used Filesystem /boot (used)
       fs_boot_used_percent Filesystem /boot (used %)
       fs_root    Root
       fs_root_free Root (free)
       fs_root_used Root (used)
       fs_root_used_percent Root (used %)
       idletime   Idle time
       idletime_text Idle time
       io_sda     TEST
       io_sda_diff TEST
       io_sda_raw TEST
       loadavg    Load average
       loadavg_1  Load average 1
       loadavg_15 Load average 15
       loadavg_5  Load average 5
       perl_version Perl Version
       ram        RAM
       ram_free   RAM free
       ram_free_percent RAM free %
       ram_total  RAM total
       ram_used   RAM used
       ram_used_stat RAM used stat
       starttime  System start time
       starttime_text System start time
       stat_cpu   CPU statistics
       stat_cpu0  CPU0 statistics
       stat_cpu0_diff CPU0 statistics (diff)
       stat_cpu0_percent CPU0 statistics (diff, percent)
       stat_cpu0_text CPU0 statistics (text)
       stat_cpu1  CPU1 statistics
       stat_cpu1_diff CPU1 statistics (diff)
       stat_cpu1_percent CPU1 statistics (diff, percent)
       stat_cpu1_text CPU1 statistics (text)
       stat_cpu2  CPU2 statistics
       stat_cpu2_diff CPU2 statistics (diff)
       stat_cpu2_percent CPU2 statistics (diff, percent)
       stat_cpu2_text CPU2 statistics (text)
       stat_cpu3  CPU3 statistics
       stat_cpu3_diff CPU3 statistics (diff)
       stat_cpu3_percent CPU3 statistics (diff, percent)
       stat_cpu3_text CPU3 statistics (text)
       stat_cpu4  CPU4 statistics
       stat_cpu4_diff CPU4 statistics (diff)
       stat_cpu4_percent CPU4 statistics (diff, percent)
       stat_cpu4_text CPU4 statistics (text)
       stat_cpu5  CPU5 statistics
       stat_cpu5_diff CPU5 statistics (diff)
       stat_cpu5_percent CPU5 statistics (diff, percent)
       stat_cpu5_text CPU5 statistics (text)
       stat_cpu6  CPU6 statistics
       stat_cpu6_diff CPU6 statistics (diff)
       stat_cpu6_percent CPU6 statistics (diff, percent)
       stat_cpu6_text CPU6 statistics (text)
       stat_cpu7  CPU7 statistics
       stat_cpu7_diff CPU7 statistics (diff)
       stat_cpu7_percent CPU7 statistics (diff, percent)
       stat_cpu7_text CPU7 statistics (text)
       stat_cpu_diff CPU statistics (diff)
       stat_cpu_idle_percent CPU statistics idle %
       stat_cpu_io_percent CPU statistics io %
       stat_cpu_irq_percent CPU statistics irq %
       stat_cpu_nice_percent CPU statistics nice %
       stat_cpu_percent CPU statistics (diff, percent)
       stat_cpu_sirq_percent CPU statistics sirq %
       stat_cpu_sys_percent CPU statistics sys %
       stat_cpu_text CPU statistics (text)
       stat_cpu_user_percent CPU statistics user %
       swap       swap
       swap_free  swap free
       swap_total swap total
       swap_used  swap used
       swap_used_percent swap used %
       swap_used_stat swap used stat
       uptime     System up time
       uptime_text System up time
       wlan0      Network adapter wlan0
       wlan0_diff Network adapter wlan0 (diff)
       wlan0_ip   Network adapter wlan0 (IP)
       wlan0_ip6  Network adapter wlan0 (IP6)
       wlan0_rx   Network adapter wlan0 (RX)
       wlan0_speed Network adapter wlan0 (speed)
       wlan0_tx   Network adapter wlan0 (TX)
     excludes:
     shadow_map:
       cpu0_idle_stat 0.17 104.02 98.77
       cpu1_idle_stat 0.17 102.44 88.41
       cpu2_idle_stat 0.22 100.00 97.27
       cpu3_idle_stat 0.13 100.88 98.79
       cpu_bogomips 38.40
       cpu_core_count 4
       cpu_idle_stat 40.17 99.69 95.79
       cpu_model_name ARMv7 Processor rev 4 (v7l)
       cpu_temp   49.92
       cpu_temp_avg 48.2
       cpu_temp_stat 38.63 90.28 48.17
       eth0       RX: 0.00 MB, TX: 0.00 MB, Total: 0 MB
       eth0_diff  RX: 0.00 MB, TX: 0.00 MB, Total: 0.00 MB
       eth0_rx    0
       eth0_speed 10
       eth0_tx    0
       fhemstarttime 1517593840
       fhemstarttime_text 02.02.2018 18:50:40
       fhemuptime 430711
       fhemuptime_text 4 days, 23 hours, 38 minutes
       fs_boot    Total: 63 MB, Used: 22 MB, 35 %, Available: 42 MB at /boot
       fs_root    Total: 29972 MB, Used: 15513 MB, 54 %, Available: 13215 MB at /
       idletime   421092 97.77 %
       idletime_text 4 days, 20 hours, 58 minutes (97.77 %)
       loadavg    0.05 0.03 0.00
       perl_version v5.20.2
       ram        Total: 923.35 MB, Used: 149.93 MB, 16.24 %, Free: 773.42 MB
       ram_used_stat 75.66 188.62 156.76
       starttime  1517593837
       starttime_text 02.02.2018 18:50:37
       stat_cpu   900682 0 821764 168437171 129068 0 11543
       stat_cpu0  209559 0 196092 40731620 76326 0 5814
       stat_cpu0_diff 3 0 17 925 0 0 0
       stat_cpu0_percent 0.32 0.00 1.80 97.88 0.00 0.00 0.00
       stat_cpu0_text user: 0.32 %, nice: 0.00 %, sys: 1.80 %, idle: 97.88 %, io: 0.00 %, irq: 0.00 %, sirq: 0.00 %
       stat_cpu1  160230 0 185930 42667616 13951 0 584
       stat_cpu1_diff 278 0 29 662 0 0 0
       stat_cpu1_percent 28.69 0.00 2.99 68.32 0.00 0.00 0.00
       stat_cpu1_text user: 28.69 %, nice: 0.00 %, sys: 2.99 %, idle: 68.32 %, io: 0.00 %, irq: 0.00 %, sirq: 0.00 %
       stat_cpu2  358842 0 222446 42406565 26690 0 4328
       stat_cpu2_diff 3 0 16 937 17 0 1
       stat_cpu2_percent 0.31 0.00 1.64 96.20 1.75 0.00 0.10
       stat_cpu2_text user: 0.31 %, nice: 0.00 %, sys: 1.64 %, idle: 96.20 %, io: 1.75 %, irq: 0.00 %, sirq: 0.10 %
       stat_cpu3  172051 0 217296 42631370 12101 0 817
       stat_cpu3_diff 3 0 16 957 0 0 0
       stat_cpu3_percent 0.31 0.00 1.64 98.05 0.00 0.00 0.00
       stat_cpu3_text user: 0.31 %, nice: 0.00 %, sys: 1.64 %, idle: 98.05 %, io: 0.00 %, irq: 0.00 %, sirq: 0.00 %
       stat_cpu_diff 287 0 78 3481 17 0 1
       stat_cpu_percent 7.43 0.00 2.02 90.09 0.44 0.00 0.03
       stat_cpu_text user: 7.43 %, nice: 0.00 %, sys: 2.02 %, idle: 90.09 %, io: 0.44 %, irq: 0.00 %, sirq: 0.03 %
       swap       Total: 100.00 MB, Used: 0.00 MB,  0.00 %, Free: 100.00 MB
       swap_used_stat 0.00 4.97 0.01
       uptime     430714
       uptime_text 4 days, 23 hours, 38 minutes
       wlan0      RX: 163.13 MB, TX: 94.33 MB, Total: 257.46 MB
       wlan0_diff RX: 0.09 MB, TX: 0.06 MB, Total: 0.15 MB
       wlan0_ip   10.0.0.10
       wlan0_rx   171056592
       wlan0_speed 72.2
       wlan0_tx   98909240
Attributes:
   event-on-update-reading cpu_temp,cpu_temp_avg,cpu_freq,eth0_diff,loadavg,ram,fs_.*,stat_cpu_percent
   filesystems fs_boot:/boot,fs_root:/:Root
   group      RPi
   room       Raspi
   userReadings SD_free {if (ReadingsVal($name,'root','0')  =~ m/Available:\s(\d+)/) {return $1;}}


Gruß
Helmut
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

Frank_Huber

Zitat von: Helmi55 am 07 Februar 2018, 18:34:42
Das hätte ich auch gern - habe das attr so gesetzt w.o. aber keine Anzeige
hier ein list von meinem sysmon
Internals:
   DEF        1 1 1 10
   INTERVAL_BASE 60
   INTERVAL_MULTIPLIERS 1 1 1 10
   MODE       local
   NAME       sysmon
   NR         176
   STATE      Initialized
   TYPE       SYSMON
   READINGS:
     2018-02-07 18:31:07   SD_free         
     2018-02-07 18:31:07   cpu0_freq       600
     2018-02-07 18:31:07   cpu0_freq_stat  600.00 1200.00 600.01
     2018-02-07 18:31:07   cpu0_idle_stat  0.17 104.02 98.31
     2018-02-07 18:31:07   cpu1_freq       600
     2018-02-07 18:31:07   cpu1_freq_stat  600.00 1200.00 600.01
     2018-02-07 18:31:07   cpu1_idle_stat  0.17 102.44 95.46
     2018-02-07 18:31:07   cpu2_freq       600
     2018-02-07 18:31:07   cpu2_freq_stat  600.00 1200.00 600.01
     2018-02-07 18:31:07   cpu2_idle_stat  0.22 100.00 98.12
     2018-02-07 18:31:07   cpu3_freq       600
     2018-02-07 18:31:07   cpu3_freq_stat  600.00 1200.00 600.01
     2018-02-07 18:31:07   cpu3_idle_stat  0.13 100.88 99.19
     2018-02-07 18:30:07   cpu_bogomips    38.40
     2018-02-07 18:31:07   cpu_core_count  4
     2018-02-07 18:31:07   cpu_freq        600
     2018-02-07 18:31:07   cpu_freq_stat   600.00 1200.00 600.01
     2018-02-07 18:31:07   cpu_idle_stat   40.17 99.69 97.76
     2018-02-07 18:30:07   cpu_model_name  ARMv7 Processor rev 4 (v7l)
     2018-02-07 18:31:07   cpu_temp        47.24
     2018-02-07 18:31:07   cpu_temp_avg    47.7
     2018-02-07 18:31:07   cpu_temp_stat   38.63 90.28 47.64
     2018-02-07 18:31:07   eth0            RX: 0.00 MB, TX: 0.00 MB, Total: 0 MB
     2018-02-07 18:31:07   eth0_diff       RX: 0.00 MB, TX: 0.00 MB, Total: 0.00 MB
     2017-05-21 12:20:41   eth0_ip6        fe80::8cb2:246d:9e09:8d53/64
     2018-02-07 18:31:07   eth0_rx         0
     2018-02-07 18:31:07   eth0_speed      10
     2018-02-07 18:31:07   eth0_tx         0
     2018-02-07 18:31:07   fhemstarttime   1517593840
     2018-02-07 18:31:07   fhemstarttime_text 02.02.2018 18:50:40
     2018-02-07 18:31:07   fhemuptime      430827
     2018-02-07 18:31:07   fhemuptime_text 4 days, 23 hours, 40 minutes
     2018-02-07 18:30:07   fs_boot         Total: 63 MB, Used: 22 MB, 35 %, Available: 42 MB at /boot
     2018-02-07 18:30:07   fs_root         Total: 29972 MB, Used: 15513 MB, 54 %, Available: 13215 MB at /
     2018-02-07 18:31:07   idletime        421205 97.77 %
     2018-02-07 18:31:07   idletime_text   4 days, 21 hours, 00 minutes (97.77 %)
     2018-02-07 18:31:07   loadavg         0.00 0.02 0.00
     2018-02-07 18:30:07   perl_version    v5.20.2
     2018-02-07 18:31:07   ram             Total: 923.35 MB, Used: 156.09 MB, 16.90 %, Free: 767.26 MB
     2018-02-07 18:31:07   ram_used_stat   75.66 188.62 157.70
     2018-02-07 18:31:07   starttime       1517593837
     2018-02-07 18:31:07   starttime_text  02.02.2018 18:50:37
     2018-02-07 18:31:07   stat_cpu        901244 0 821971 168482039 129093 0 11546
     2018-02-07 18:31:07   stat_cpu0       209825 0 196149 40742360 76329 0 5816
     2018-02-07 18:31:07   stat_cpu0_diff  59 0 22 5665 2 0 1
     2018-02-07 18:31:07   stat_cpu0_percent 1.03 0.00 0.38 98.54 0.03 0.00 0.02
     2018-02-07 18:31:07   stat_cpu0_text  user: 1.03 %, nice: 0.00 %, sys: 0.38 %, idle: 98.54 %, io: 0.03 %, irq: 0.00 %, sirq: 0.02 %
     2018-02-07 18:31:07   stat_cpu1       160460 0 185998 42678849 13953 0 584
     2018-02-07 18:31:07   stat_cpu1_diff  6 0 27 5961 1 0 0
     2018-02-07 18:31:07   stat_cpu1_percent 0.10 0.00 0.45 99.43 0.02 0.00 0.00
     2018-02-07 18:31:07   stat_cpu1_text  user: 0.10 %, nice: 0.00 %, sys: 0.45 %, idle: 99.43 %, io: 0.02 %, irq: 0.00 %, sirq: 0.00 %
     2018-02-07 18:31:07   stat_cpu2       358903 0 222477 42417979 26710 0 4329
     2018-02-07 18:31:07   stat_cpu2_diff  56 0 20 5896 13 0 0
     2018-02-07 18:31:07   stat_cpu2_percent 0.94 0.00 0.33 98.51 0.22 0.00 0.00
     2018-02-07 18:31:07   stat_cpu2_text  user: 0.94 %, nice: 0.00 %, sys: 0.33 %, idle: 98.51 %, io: 0.22 %, irq: 0.00 %, sirq: 0.00 %
     2018-02-07 18:31:07   stat_cpu3       172056 0 217347 42642851 12101 0 817
     2018-02-07 18:31:07   stat_cpu3_diff  3 0 33 5960 0 0 0
     2018-02-07 18:31:07   stat_cpu3_percent 0.05 0.00 0.55 99.40 0.00 0.00 0.00
     2018-02-07 18:31:07   stat_cpu3_text  user: 0.05 %, nice: 0.00 %, sys: 0.55 %, idle: 99.40 %, io: 0.00 %, irq: 0.00 %, sirq: 0.00 %
     2018-02-07 18:31:07   stat_cpu_diff   124 0 102 23482 16 0 1
     2018-02-07 18:31:07   stat_cpu_percent 0.52 0.00 0.43 98.98 0.07 0.00 0.00
     2018-02-07 18:31:07   stat_cpu_text   user: 0.52 %, nice: 0.00 %, sys: 0.43 %, idle: 98.98 %, io: 0.07 %, irq: 0.00 %, sirq: 0.00 %
     2018-02-07 18:31:07   swap            Total: 100.00 MB, Used: 0.00 MB,  0.00 %, Free: 100.00 MB
     2018-02-07 18:31:07   swap_used_stat  0.00 4.97 0.01
     2018-02-07 18:31:07   uptime          430830
     2018-02-07 18:31:07   uptime_text     4 days, 23 hours, 40 minutes
     2018-02-07 18:31:07   wlan0           RX: 163.16 MB, TX: 94.37 MB, Total: 257.53 MB
     2018-02-07 18:31:07   wlan0_diff      RX: 0.01 MB, TX: 0.01 MB, Total: 0.02 MB
     2018-02-07 18:31:07   wlan0_ip        10.0.0.10
     2018-02-07 18:31:07   wlan0_rx        171088848
     2018-02-07 18:31:07   wlan0_speed     72.2
     2018-02-07 18:31:07   wlan0_tx        98956209
   helper:
     net_eth0_stat_class 1
     net_wlan0_stat_class 1
     proc_fs    1
     sys_cpu0_freq 1
     sys_cpu0_temp 0
     sys_cpu1_freq 1
     sys_cpu1_temp 0
     sys_cpu2_freq 1
     sys_cpu2_temp 0
     sys_cpu3_freq 1
     sys_cpu3_temp 0
     sys_cpu4_freq 0
     sys_cpu4_temp 0
     sys_cpu5_freq 0
     sys_cpu5_temp 0
     sys_cpu6_freq 0
     sys_cpu6_temp 0
     sys_cpu7_freq 0
     sys_cpu7_temp 0
     sys_cpu_core_num 4
     sys_cpu_freq_rpi_bbb 1
     sys_cpu_num 1
     sys_cpu_temp_bbb 0
     sys_cpu_temp_rpi 1
     sys_fb     0
     sys_power_ac 0
     sys_power_bat 0
     sys_power_usb 0
     u_first_mark 1
     cur_readings_map:
       cpu0_freq  CPU frequency (core 0)
       cpu0_freq_stat CPU frequency (core 0) stat
       cpu0_idle_stat CPU0 min/max/avg (idle)
       cpu1_freq  CPU frequency (core 1)
       cpu1_freq_stat CPU frequency (core 1) stat
       cpu1_idle_stat CPU1 min/max/avg (idle)
       cpu2_freq  CPU frequency (core 2)
       cpu2_freq_stat CPU frequency (core 2) stat
       cpu2_idle_stat CPU2 min/max/avg (idle)
       cpu3_freq  CPU frequency (core 3)
       cpu3_freq_stat CPU frequency (core 3) stat
       cpu3_idle_stat CPU3 min/max/avg (idle)
       cpu4_idle_stat CPU4 min/max/avg (idle)
       cpu5_idle_stat CPU5 min/max/avg (idle)
       cpu6_idle_stat CPU6 min/max/avg (idle)
       cpu7_idle_stat CPU7 min/max/avg (idle)
       cpu_bogomips BogoMIPS
       cpu_core_count Number of CPU cores
       cpu_freq   CPU frequency
       cpu_freq_stat CPU frequency stat
       cpu_idle_stat CPU min/max/avg (idle)
       cpu_model_name CPU model name
       cpu_temp   CPU temperature
       cpu_temp_avg Average CPU temperature
       cpu_temp_stat CPU temperature stat
       date       Date
       eth0       Network adapter eth0
       eth0_diff  Network adapter eth0 (diff)
       eth0_ip    Network adapter eth0 (IP)
       eth0_ip6   Network adapter eth0 (IP6)
       eth0_rx    Network adapter eth0 (RX)
       eth0_speed Network adapter eth0 (speed)
       eth0_tx    Network adapter eth0 (TX)
       fhemstarttime Fhem start time
       fhemstarttime_text Fhem start time
       fhemuptime System up time
       fhemuptime_text FHEM up time
       fs_boot    Filesystem /boot
       fs_boot_free Filesystem /boot (free)
       fs_boot_used Filesystem /boot (used)
       fs_boot_used_percent Filesystem /boot (used %)
       fs_root    Root
       fs_root_free Root (free)
       fs_root_used Root (used)
       fs_root_used_percent Root (used %)
       idletime   Idle time
       idletime_text Idle time
       io_sda     TEST
       io_sda_diff TEST
       io_sda_raw TEST
       loadavg    Load average
       loadavg_1  Load average 1
       loadavg_15 Load average 15
       loadavg_5  Load average 5
       perl_version Perl Version
       ram        RAM
       ram_free   RAM free
       ram_free_percent RAM free %
       ram_total  RAM total
       ram_used   RAM used
       ram_used_stat RAM used stat
       starttime  System start time
       starttime_text System start time
       stat_cpu   CPU statistics
       stat_cpu0  CPU0 statistics
       stat_cpu0_diff CPU0 statistics (diff)
       stat_cpu0_percent CPU0 statistics (diff, percent)
       stat_cpu0_text CPU0 statistics (text)
       stat_cpu1  CPU1 statistics
       stat_cpu1_diff CPU1 statistics (diff)
       stat_cpu1_percent CPU1 statistics (diff, percent)
       stat_cpu1_text CPU1 statistics (text)
       stat_cpu2  CPU2 statistics
       stat_cpu2_diff CPU2 statistics (diff)
       stat_cpu2_percent CPU2 statistics (diff, percent)
       stat_cpu2_text CPU2 statistics (text)
       stat_cpu3  CPU3 statistics
       stat_cpu3_diff CPU3 statistics (diff)
       stat_cpu3_percent CPU3 statistics (diff, percent)
       stat_cpu3_text CPU3 statistics (text)
       stat_cpu4  CPU4 statistics
       stat_cpu4_diff CPU4 statistics (diff)
       stat_cpu4_percent CPU4 statistics (diff, percent)
       stat_cpu4_text CPU4 statistics (text)
       stat_cpu5  CPU5 statistics
       stat_cpu5_diff CPU5 statistics (diff)
       stat_cpu5_percent CPU5 statistics (diff, percent)
       stat_cpu5_text CPU5 statistics (text)
       stat_cpu6  CPU6 statistics
       stat_cpu6_diff CPU6 statistics (diff)
       stat_cpu6_percent CPU6 statistics (diff, percent)
       stat_cpu6_text CPU6 statistics (text)
       stat_cpu7  CPU7 statistics
       stat_cpu7_diff CPU7 statistics (diff)
       stat_cpu7_percent CPU7 statistics (diff, percent)
       stat_cpu7_text CPU7 statistics (text)
       stat_cpu_diff CPU statistics (diff)
       stat_cpu_idle_percent CPU statistics idle %
       stat_cpu_io_percent CPU statistics io %
       stat_cpu_irq_percent CPU statistics irq %
       stat_cpu_nice_percent CPU statistics nice %
       stat_cpu_percent CPU statistics (diff, percent)
       stat_cpu_sirq_percent CPU statistics sirq %
       stat_cpu_sys_percent CPU statistics sys %
       stat_cpu_text CPU statistics (text)
       stat_cpu_user_percent CPU statistics user %
       swap       swap
       swap_free  swap free
       swap_total swap total
       swap_used  swap used
       swap_used_percent swap used %
       swap_used_stat swap used stat
       uptime     System up time
       uptime_text System up time
       wlan0      Network adapter wlan0
       wlan0_diff Network adapter wlan0 (diff)
       wlan0_ip   Network adapter wlan0 (IP)
       wlan0_ip6  Network adapter wlan0 (IP6)
       wlan0_rx   Network adapter wlan0 (RX)
       wlan0_speed Network adapter wlan0 (speed)
       wlan0_tx   Network adapter wlan0 (TX)
     excludes:
     shadow_map:
       cpu0_idle_stat 0.17 104.02 98.77
       cpu1_idle_stat 0.17 102.44 88.41
       cpu2_idle_stat 0.22 100.00 97.27
       cpu3_idle_stat 0.13 100.88 98.79
       cpu_bogomips 38.40
       cpu_core_count 4
       cpu_idle_stat 40.17 99.69 95.79
       cpu_model_name ARMv7 Processor rev 4 (v7l)
       cpu_temp   49.92
       cpu_temp_avg 48.2
       cpu_temp_stat 38.63 90.28 48.17
       eth0       RX: 0.00 MB, TX: 0.00 MB, Total: 0 MB
       eth0_diff  RX: 0.00 MB, TX: 0.00 MB, Total: 0.00 MB
       eth0_rx    0
       eth0_speed 10
       eth0_tx    0
       fhemstarttime 1517593840
       fhemstarttime_text 02.02.2018 18:50:40
       fhemuptime 430711
       fhemuptime_text 4 days, 23 hours, 38 minutes
       fs_boot    Total: 63 MB, Used: 22 MB, 35 %, Available: 42 MB at /boot
       fs_root    Total: 29972 MB, Used: 15513 MB, 54 %, Available: 13215 MB at /
       idletime   421092 97.77 %
       idletime_text 4 days, 20 hours, 58 minutes (97.77 %)
       loadavg    0.05 0.03 0.00
       perl_version v5.20.2
       ram        Total: 923.35 MB, Used: 149.93 MB, 16.24 %, Free: 773.42 MB
       ram_used_stat 75.66 188.62 156.76
       starttime  1517593837
       starttime_text 02.02.2018 18:50:37
       stat_cpu   900682 0 821764 168437171 129068 0 11543
       stat_cpu0  209559 0 196092 40731620 76326 0 5814
       stat_cpu0_diff 3 0 17 925 0 0 0
       stat_cpu0_percent 0.32 0.00 1.80 97.88 0.00 0.00 0.00
       stat_cpu0_text user: 0.32 %, nice: 0.00 %, sys: 1.80 %, idle: 97.88 %, io: 0.00 %, irq: 0.00 %, sirq: 0.00 %
       stat_cpu1  160230 0 185930 42667616 13951 0 584
       stat_cpu1_diff 278 0 29 662 0 0 0
       stat_cpu1_percent 28.69 0.00 2.99 68.32 0.00 0.00 0.00
       stat_cpu1_text user: 28.69 %, nice: 0.00 %, sys: 2.99 %, idle: 68.32 %, io: 0.00 %, irq: 0.00 %, sirq: 0.00 %
       stat_cpu2  358842 0 222446 42406565 26690 0 4328
       stat_cpu2_diff 3 0 16 937 17 0 1
       stat_cpu2_percent 0.31 0.00 1.64 96.20 1.75 0.00 0.10
       stat_cpu2_text user: 0.31 %, nice: 0.00 %, sys: 1.64 %, idle: 96.20 %, io: 1.75 %, irq: 0.00 %, sirq: 0.10 %
       stat_cpu3  172051 0 217296 42631370 12101 0 817
       stat_cpu3_diff 3 0 16 957 0 0 0
       stat_cpu3_percent 0.31 0.00 1.64 98.05 0.00 0.00 0.00
       stat_cpu3_text user: 0.31 %, nice: 0.00 %, sys: 1.64 %, idle: 98.05 %, io: 0.00 %, irq: 0.00 %, sirq: 0.00 %
       stat_cpu_diff 287 0 78 3481 17 0 1
       stat_cpu_percent 7.43 0.00 2.02 90.09 0.44 0.00 0.03
       stat_cpu_text user: 7.43 %, nice: 0.00 %, sys: 2.02 %, idle: 90.09 %, io: 0.44 %, irq: 0.00 %, sirq: 0.03 %
       swap       Total: 100.00 MB, Used: 0.00 MB,  0.00 %, Free: 100.00 MB
       swap_used_stat 0.00 4.97 0.01
       uptime     430714
       uptime_text 4 days, 23 hours, 38 minutes
       wlan0      RX: 163.13 MB, TX: 94.33 MB, Total: 257.46 MB
       wlan0_diff RX: 0.09 MB, TX: 0.06 MB, Total: 0.15 MB
       wlan0_ip   10.0.0.10
       wlan0_rx   171056592
       wlan0_speed 72.2
       wlan0_tx   98909240
Attributes:
   event-on-update-reading cpu_temp,cpu_temp_avg,cpu_freq,eth0_diff,loadavg,ram,fs_.*,stat_cpu_percent
   filesystems fs_boot:/boot,fs_root:/:Root
   group      RPi
   room       Raspi
   userReadings SD_free {if (ReadingsVal($name,'root','0')  =~ m/Available:\s(\d+)/) {return $1;}}


Gruß
Helmut
Wenn du deinen list mal genauer anschaust wirst du erkennen dass das reading bei dir sd_root heisst und nicht root wie bei uns.
Also im userreading anpassen und das wars.

Mit dem Handy online, daher kurz gefasst...


Helmi55

Servus
jetzt verwirrst du mich = fs_root heisst es , aber auch da kommt nix#
Sorry stell mich jetzt wahrscheinlich wieder doof an......
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

Frank_Huber

Schreibfehler meinerseits, sorry

userReadings SD_free {if (ReadingsVal($name,'fs_root','0')  =~ m/Available:\s(\d+)/) {return $1;}}

Sollte gehen.

Mit dem Handy online, daher kurz gefasst...


cs-online

bei mir geht:

attr Sysmon userReadings SD_free {if (ReadingsVal($name,'root','0')  =~ m/Available:\s(\d+)/) {return $1;;}}
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266/32 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20+S26,Shelly1/2/2.5, Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV+Speicher, alles auf einem RPI und da geht noch mehr

Helmi55

Danke Frank. Hat funktioniert
Gruß Helmut
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

Parador

Hallo Zusammen,
ich trau mich fast nicht schreiben, vermutlich bin ich nur blind... Ich will "eigentlich" auch nur den freien Speicher im Auge behalten und bin nach der Anleitung im Wiki https://wiki.fhem.de/wiki/SYSMON vorgegangen... (würd ich zumindest sagen) ;-)
Ich habe folgendes in meiner fhem.cfg:
define sysmon SYSMON 1 1 1 10
attr sysmon event-on-update-reading cpu_temp,cpu_temp_avg,cpu_freq,eth0_diff,loadavg,ram,fs_.*,stat_cpu_percent
attr sysmon filesystems fs_boot:/boot,fs_root:/:Root,fs_usb1:/media/usb1:USB-Stick
attr sysmon network-interfaces eth0:eth0:Ethernet,wlan0:wlan0:WiFi
attr sysmon room System

Allerdings tauchen bei mir keinerlei Readings zum Filesystem auf...
kein einziger Eintrag der mit "fs_ beginnt" - was kann ich alles falsch gemacht haben?

Vielen Dank bereits im Voraus!




Frank_Huber

So mach ich es:

attr sysmon stateFormat SD_free MB frei
attr sysmon userReadings SD_free {if (ReadingsVal($name,'root','0')  =~ m/Available:\s(\d+)/) {return $1;;;;}}


Gesendet von meinem Doogee S60 mit Tapatalk


betateilchen

Zitat von: Parador am 03 November 2018, 10:16:24

Allerdings tauchen bei mir keinerlei Readings zum Filesystem auf...
kein einziger Eintrag der mit "fs_ beginnt" - was kann ich alles falsch gemacht haben?


Keine Ahnung was Du falsch gemacht hast, aber folgendes funktioniert bei mir problemlos:



define sm_test SYSMON
attr sm_test filesystems fs_boot:/boot,fs_root:/:Root,fs_usb1:/media/usb1:USB-Stick

-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

frank

attr event-on-update-reading muss natürlich passen.
zum testen würde ich es erst einmal löschen.
FHEM: 6.0(SVN) => Pi3(buster)
IO: CUL433|CUL868|HMLAN|HMUSB2|HMUART
CUL_HM: CC-TC|CC-VD|SEC-SD|SEC-SC|SEC-RHS|Sw1PBU-FM|Sw1-FM|Dim1TPBU-FM|Dim1T-FM|ES-PMSw1-Pl
IT: ITZ500|ITT1500|ITR1500|GRR3500
WebUI [HMdeviceTools.js (hm.js)]: https://forum.fhem.de/index.php/topic,106959.0.html

Parador

Ok, Danke, dass event-on-update-reading war es, habe es gelöscht und nun tauchen Sie auf...