Hallo zusammen,
habe lepresenced V0.93 auf Buster auf einem pi zero laufen.
Seit dem Update auf Buster (welches sich irgendwie auf den pi geschlichen hat) hat lepresence eine CPU-Auslastung von 20 - 30%.
Auszug aus der Syslog beim Booten (die erste Zeile kommt ca. 50x vor):
Sep 29 14:45:56 raspberrypi kernel: [ 53.654420] Bluetooth: hci0: Frame reassembly failed (-84)
Sep 29 14:45:56 raspberrypi kernel: [ 53.702645] Bluetooth: hci0: Frame reassembly failed (-84)
Sep 29 14:45:56 raspberrypi kernel: [ 53.711074] Bluetooth: hci0: Frame reassembly failed (-84)
Sep 29 14:45:56 raspberrypi kernel: [ 53.735586] Bluetooth: hci0: Frame reassembly failed (-84)
Sep 29 14:45:56 raspberrypi lepresenced[425]: [tid:1] main::bluetooth_scan_thread: restarting hcitool...
Sep 29 14:45:57 raspberrypi lepresenced[425]: [tid:1] main::bluetooth_scan_thread: Received 'Set scan parameters failed: Input/output error', resetting...
Sep 29 14:45:58 raspberrypi lepresenced[425]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...
Sep 29 14:47:43 raspberrypi lepresenced[425]: [tid:1] main::bluetooth_scan_thread: hcitool was stopped.
Sep 29 14:47:43 raspberrypi lepresenced[425]: [tid:2] main::bluetooth_dump_thread: hcidump was stopped.
Es funktioniert dennoch - aber die hohe CPU-Last ist natürlich nicht so toll. Ist ein Bug o.ä. bekannt?
Viele Grüße
Kann ggf. jemand mit einem Pi zero W und lepresence mal nachvollziehen, ob das bei ihm genauso ist?
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
438 root 20 0 48472 19860 2504 S 30.8 4.5 952:06.66 lepresenced
Ich finde 30% ja schon ordentlich für so ein kleines Script ...
Hallo hkspks,
ich habe leider keinen Zero und kann es daher nicht testen, aber ich hätte zwei Fragen dazu:
Wieviel RAM hat denn Dein Zero?
Wieviel davon hast Du unter Buster noch frei?
EDIT: Ok, doch drei Fragen: siehst Du hohe Zahlen für "waits" auf Deinem Zero, z.B. mit top, in den CPU Reihen?
Beste Grüße
Hi marv99,
sorry - ich habe Deine Antwort leider übersehen. Das Problem besteht bis heute. Im Anhang mal ein Auszug von einem top - das müsste alle Fragen beantworten. Ggf. hast Du ja noch Lust, da mal einen Blick drauf zu werfen. Ich habe es mittlerweile abgehakt unter "ist halt so" - vielleicht ist der Pi Zero auch einfach so schwach auf der Brust.
Hi!
Zitat von: hkspks am 09 September 2022, 21:37:48
Hi marv99,
sorry - ich habe Deine Antwort leider übersehen. Das Problem besteht bis heute. Im Anhang mal ein Auszug von einem top - das müsste alle Fragen beantworten. Ggf. hast Du ja noch Lust, da mal einen Blick drauf zu werfen. Ich habe es mittlerweile abgehakt unter "ist halt so" - vielleicht ist der Pi Zero auch einfach so schwach auf der Brust.
Das ist ungewöhnlich. Zieh doch mal bitte ein Log mit LOG_DEBUG und poste es mal. Dann wissen wir, was lepresenced bei Dir treibt.
Patrick
Anbei 1 Minute syslog von sudo lepresenced --loglevel LOG_DEBUG. Danke und Gruß!
Sep 12 09:13:19 raspberrypisat lepresenced[17224]: [tid:0] main: Version 0.93 started (device: hci0, listen addr: 0.0.0.0, listen port: 5333, daemonize: 0, legacy mode: 0, rssi threshold: 10, battery interval: 6, log level: 7, debug: 0).
Sep 12 09:13:19 raspberrypisat lepresenced[17224]: [tid:0] main::sanity_check: md5 digest of '/usr/sbin/lepresenced' is: '16f42cf41cc221a844f32ac54369520f'.
Sep 12 09:13:19 raspberrypisat lepresenced[17224]: [tid:0] main::sanity_check: hciconfig found at '/usr/bin/hciconfig'.
Sep 12 09:13:19 raspberrypisat lepresenced[17224]: [tid:0] main::sanity_check: hcitool found at '/usr/bin/hcitool'.
Sep 12 09:13:19 raspberrypisat lepresenced[17224]: [tid:0] main::sanity_check: gatttool found at '/usr/bin/gatttool'.
Sep 12 09:13:19 raspberrypisat lepresenced[17224]: [tid:0] main::sanity_check: hcidump found at '/usr/bin/hcidump'.
Sep 12 09:13:19 raspberrypisat lepresenced[17224]: [tid:1] main::bluetooth_scan_thread: Received 'Set scan parameters failed: Input/output error', resetting...
Sep 12 09:13:19 raspberrypisat lepresenced[17224]: [tid:2] main::bluetooth_dump_thread: Received 'HCI sniffer - Bluetooth packet analyzer ver 5.55'.
Sep 12 09:13:19 raspberrypisat lepresenced[17224]: [tid:2] main::bluetooth_dump_thread: Received 'device: hci0 snap_len: 1500 filter: 0xffffffff'.
Sep 12 09:13:19 raspberrypisat lepresenced[17224]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...
Sep 12 09:13:20 raspberrypisat lepresenced[17224]: [tid:1] main::bluetooth_scan_thread: Received 'LE Scan ...'.
Sep 12 09:13:24 raspberrypisat lepresenced[17224]: [tid:0] main: Connection from 192.168.178.50:53182. Connected clients: 1.
Sep 12 09:13:24 raspberrypisat lepresenced[17224]: [tid:0] main::handle_command: Received query for mac address MACADRESS1, interval: 5. Adding client 192.168.178.50:53182 to clients list.
Sep 12 09:13:24 raspberrypisat lepresenced[17224]: [tid:0] main: Connection from 192.168.178.50:53178. Connected clients: 2.
Sep 12 09:13:24 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 3/3, max age: 5, rssi: -70, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:24 raspberrypisat lepresenced[17224]: [tid:0] main: Connection from 192.168.178.50:53184. Connected clients: 3.
Sep 12 09:13:24 raspberrypisat lepresenced[17224]: [tid:0] main::handle_command: Received query for mac address MACADRESS2, interval: 5. Adding client 192.168.178.50:53178 to clients list.
Sep 12 09:13:24 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 0/0, max age: 5, rssi: -76, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:24 raspberrypisat lepresenced[17224]: [tid:0] main: Connection from 192.168.178.50:53180. Connected clients: 4.
Sep 12 09:13:24 raspberrypisat lepresenced[17224]: [tid:0] main::handle_command: Received query for mac address MACADRESS2, interval: 5. Adding client 192.168.178.50:53184 to clients list.
Sep 12 09:13:24 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 0/0, max age: 5, rssi: -76, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:25 raspberrypisat lepresenced[17224]: [tid:0] main::handle_command: Received query for mac address MACADRESS1, interval: 5. Adding client 192.168.178.50:53180 to clients list.
Sep 12 09:13:25 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 1/1, max age: 5, rssi: -70, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:29 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 2/2, max age: 5, rssi: -71, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:29 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 1/1, max age: 5, rssi: -76, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:29 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 1/1, max age: 5, rssi: -76, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:30 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 1/1, max age: 5, rssi: -71, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:34 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 1/3, max age: 5, rssi: -71, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:34 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 1/1, max age: 5, rssi: -76, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:34 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 1/1, max age: 5, rssi: -76, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:35 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 1/1, max age: 5, rssi: -70, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:39 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 2/2, max age: 5, rssi: -71, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:39 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 2/2, max age: 5, rssi: -76, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:39 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 2/2, max age: 5, rssi: -76, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:40 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 3/3, max age: 5, rssi: -71, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:44 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 3/4, max age: 5, rssi: -71, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:44 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 5/5, max age: 5, rssi: -76, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:44 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 5/5, max age: 5, rssi: -76, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:45 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 1/1, max age: 5, rssi: -70, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:49 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 2/2, max age: 5, rssi: -70, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:49 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 3/5, max age: 5, rssi: -75, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:49 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 3/5, max age: 5, rssi: -75, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:50 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 1/1, max age: 5, rssi: -70, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:54 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 4/4, max age: 5, rssi: -72, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:54 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 2/2, max age: 5, rssi: -75, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:54 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 2/2, max age: 5, rssi: -75, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:55 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 5/5, max age: 5, rssi: -72, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:59 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 2/2, max age: 5, rssi: -72, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:59 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 3/3, max age: 5, rssi: -74, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:13:59 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS2, ages: 3/3, max age: 5, rssi: -74, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:14:00 raspberrypisat lepresenced[17224]: [tid:0] main: Sending update for mac address MACADRESS1, ages: 1/3, max age: 5, rssi: -72, battery level: unknown (age: unknown) (ignored), result: present.
Sep 12 09:14:03 raspberrypisat lepresenced[17224]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...
Sep 12 09:14:03 raspberrypisat lepresenced[17224]: [tid:0] main::__ANON__: Caught signal, cleaning up and exiting...
Hi!
Zitat von: hkspks am 12 September 2022, 09:18:18
Anbei 1 Minute syslog von sudo lepresenced --loglevel LOG_DEBUG. Danke und Gruß!
Zur Sicherheit: Auch in dieser Minute trat das Problem auf?
Falls ja kannst Du mal Folgendes probieren:
Ändere mal Zeile 24 wie folgt:
Readonly my $MAINLOOP_SLEEP_US => 500 * 1000;
Hat das einen Effekt? Gibt es noch andere Prozesse mit hoher CPU-Last auf dem Pi?
Patrick
Hi Patrick,
ja - die CPU-Auslastung ist fortlaufend bei 25-30%. Wenn ich die Konfiguration anpasse wie von Dir beschrieben, dann würde ich sagen sind es eher 20 - 25%.
Anbei noch die FHEM-Config der BT-Devices. Was mich wundert ist, dass die Readings alle 5 Sekunden refresht werden, obwohl die Devices "present" sind. Ggf. ist das noch ein Lasttreiber ... die CPU-Last ist aber immer gleich hoch.
lan-bluetooth MAC-Adresse 192.168.178.50:5222 5 60
Die CPU-Last auf einem PI3 liegt bei <= 1% obwohl dort auch der collectord läuft.
Viele Grüße
Christian
Hi!
Zitat von: hkspks am 21 September 2022, 11:08:29
Anbei noch die FHEM-Config der BT-Devices. Was mich wundert ist, dass die Readings alle 5 Sekunden refresht werden, obwohl die Devices "present" sind. Ggf. ist das noch ein Lasttreiber ... die CPU-Last ist aber immer gleich hoch.
Jetzt wo Du's sagst. Um 09:13:59 werden z. B. drei Updates an FHEM gesendet. Stell' den Wert doch mal testweise auf 60s und schaue, ob das Besserung bringt. Sonst fehlt mir offen gestanden eine zündende Idee.
Patrick
Hab ich gemacht - kein Unterschied. Selbst beim deaktivieren der Devices in FHEM + Ausschalten des collectord ist konstant last im Prozess - irgendwas scheint da nicht zu passen. Ggf. irgendeine Reibung zwischen einzelnen Paketen auf Systemebene (alle Pakete aktuell). Aber sofern nur ich das Problem habe, ist es ja OK :-)
Hi!
Zitat von: hkspks am 22 September 2022, 10:27:08
Hab ich gemacht - kein Unterschied. Selbst beim deaktivieren der Devices in FHEM + Ausschalten des collectord ist konstant last im Prozess - irgendwas scheint da nicht zu passen. Ggf. irgendeine Reibung zwischen einzelnen Paketen auf Systemebene. Aber sofern nur ich das Problem habe, ist es ja OK :-)
Trotzdem bin ich jetzt neugierig geworden. Kannst Du mal den Output von
ps auxww --sort=-pcpu|egrep '(USER|lepresenced|hci)';ps auxww --sort=-pcpu|head -5;uptime;cat /sys/firmware/devicetree/base/model;echo
posten?
Bei mir sieht das so aus:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 509 4.9 6.5 91240 61508 ? Ssl Aug12 2981:52 /usr/bin/perl /usr/local/sbin/lepresenced -a 0.0.0.0 -d -l LOG_DEBUG -b hci0 -w 45
root 10790 0.2 0.0 2332 416 ? S 06:52 0:39 hcidump -i hci0
root 10789 0.1 0.0 2516 580 ? S 06:52 0:23 hcitool -i hci0 lescan --duplicates
root 527 0.0 0.0 2056 8 ? S Aug12 0:00 /usr/bin/hciattach /dev/serial1 bcm43xx 3000000 flow - b8:27:eb:d5:19:ea
root 7588 0.0 0.0 5796 552 pts/0 S+ 10:53 0:00 grep -E (USER|lepresenced|hci)
root 10739 0.0 0.0 0 0 ? I< 06:52 0:00 [kworker/u9:0-hci0]
root 31670 0.0 0.0 0 0 ? I< 00:52 0:26 [kworker/u9:1-hci0]
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 7527 33.9 4.8 146128 46096 ? Sl 10:53 0:04 puppet agent: applying configuration
root 509 4.9 6.5 91240 61508 ? Ssl Aug12 2981:52 /usr/bin/perl /usr/local/sbin/lepresenced -a 0.0.0.0 -d -l LOG_DEBUG -b hci0 -w 45
root 10790 0.2 0.0 2332 416 ? S 06:52 0:39 hcidump -i hci0
avahi 1027 0.1 0.3 7092 3364 ? Ss Sep12 28:44 avahi-daemon: running [rpi-flur.local]
10:53:30 up 41 days, 10:28, 1 user, load average: 0,43, 0,19, 0,12
Raspberry Pi 3 Model B Plus Rev 1.3
Patrick
Klar, gerne. Cool, wie Du an dem Thema dran bleibst :-)
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 27992 34.9 3.6 43336 16064 ? Ssl Sep21 511:39 /usr/bin/perl /usr/sbin/lepresenced --device hci0 --listenaddress 0.0.0.0 --listenport 5333 --loglevel LOG_WARNING
root 8523 1.0 0.3 2316 1456 ? S 11:00 0:13 hcidump -i hci0
root 8522 0.7 0.3 2500 1512 ? S 11:00 0:09 hcitool -i hci0 lescan --duplicates
root 29468 0.5 0.0 0 0 ? I< Sep21 5:59 [kworker/u3:1-hci0]
root 376 0.0 0.1 2040 440 ? S Sep17 0:00 /usr/bin/hciattach /dev/serial1 bcm43xx 3000000 flow - b8:27:eb:56:20:a7
root 8426 0.0 0.0 0 0 ? I< 11:00 0:00 [kworker/u3:0-hci0]
pi 12920 0.0 0.4 7436 1996 pts/0 S+ 11:21 0:00 grep -E --color=auto (USER|lepresenced|hci)
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 27992 34.9 3.6 43336 16064 ? Ssl Sep21 511:39 /usr/bin/perl /usr/sbin/lepresenced --device hci0 --listenaddress 0.0.0.0 --listenport 5333 --loglevel LOG_WARNING
root 8523 1.0 0.3 2316 1456 ? S 11:00 0:13 hcidump -i hci0
root 8522 0.7 0.3 2500 1512 ? S 11:00 0:09 hcitool -i hci0 lescan --duplicates
root 29468 0.5 0.0 0 0 ? I< Sep21 5:59 [kworker/u3:1-hci0]
11:21:27 up 5 days, 8:21, 1 user, load average: 0.33, 0.46, 0.93
Raspberry Pi Zero W Rev 1.1
Hier noch zum Vgl. auf meinem 3+
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 940 0.1 1.4 39084 13772 ? Ssl Sep17 9:06 /usr/bin/perl /usr/sbin/lepresenced --device hci0 --listenaddress 0.0.0.0 --listenport 5333 --loglevel LOG_WARNING
root 64 0.0 0.0 0 0 ? I< Sep17 0:00 [kworker/u9:0-hci0]
root 910 0.0 0.0 2140 128 ? S Sep17 0:00 /usr/bin/hciattach /dev/serial1 bcm43xx 3000000 flow - b8:27:eb:55:97:99
root 911 0.0 0.0 0 0 ? I< Sep17 0:00 [kworker/u9:2-hci0]
root 957 0.0 0.0 2496 588 ? S Sep17 0:00 hcitool -i hci0 lescan --duplicates
root 1040 0.0 0.0 2368 464 ? S Sep17 0:00 hcidump -i hci0
pi 24467 0.0 0.0 7348 540 pts/0 S+ 11:23 0:00 grep -E --color=auto (USER|lepresenced|hci)
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 23994 8.2 0.3 8684 2844 ? S 11:23 0:00 /bin/bash /usr/bin/deCONZ-WIFI2.sh
fhem 21185 3.1 6.0 205608 56924 ? Sl Sep18 179:32 python3 FHEM/bindings/python/bin/fhempy --local
pi 23867 2.6 0.4 8844 3872 pts/0 Ss 11:23 0:00 -bash
root 23793 1.3 0.6 12444 6448 ? Ss 11:23 0:00 sshd: pi [priv]
11:23:57 up 5 days, 8:23, 1 user, load average: 0.14, 0.19, 0.17
Raspberry Pi 3 Model B Plus Rev 1.3
PS: hab heute morgen noch ein Upgrade gemacht - alle Pakete aktuell!
Hi!
Ich kann nicht wirklich Anhaltspunkte erkennen. Auf dem Zero ist außer lepresenced nix los, angesichts der Load scheint IO auch ok zu sein.
Bitte führe nochmal
ps auxww -T --sort=-pcpu|egrep '(USER|lepresenced)'
auf dem Zero aus.
Bei mir ist das:
root@rpi-flur:~# ps auxww -T --sort=-pcpu|egrep '(USER|lepresenced)'
USER PID SPID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 18257 18257 1.0 1.3 37828 12668 ? Ssl 12:18 0:06 /usr/bin/perl /usr/local/sbin/lepresenced -a 0.0.0.0 -d -l LOG_DEBUG -b hci0 -w 45
root 18257 18258 0.3 1.3 37828 12668 ? Ssl 12:18 0:02 /usr/bin/perl /usr/local/sbin/lepresenced -a 0.0.0.0 -d -l LOG_DEBUG -b hci0 -w 45
root 18257 18261 2.3 1.3 37828 12668 ? Ssl 12:18 0:15 /usr/bin/perl /usr/local/sbin/lepresenced -a 0.0.0.0 -d -l LOG_DEBUG -b hci0 -w 45
Dort sieht man nicht nur lepresenced selbst sondern die Threads. Der mit der höheren SPID ist der Thread, der hcidump "zuhört". Der haut bei mir am meisten rein und die Last wird davon abhängen, wie viel in der Umgebung des Zero los ist. Hcidump ist sehr gesprächig.
/Edit2:
Bitte auch noch:
timeout 10 hcidump -i hci0 -w /tmp/hcidump >/dev/null;hcidump -r /tmp/hcidump |wc -l
Der legt /tmp/hcidump an, was Du gerne danach löschen kannst. Meine Ausgabe:
root@rpi-flur:/usr/local/sbin# timeout 1 hcidump -i hci0 -w /tmp/hcidump >/dev/null;hcidump -r /tmp/hcidump |wc -l
146
Patrick
ps auxww -T --sort=-pcpu|egrep '(USER|lepresenced)'
USER PID SPID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 27992 27992 13.7 3.7 43336 16380 ? Ssl Sep21 218:54 /usr/bin/perl /usr/sbin/lepresenced --device hci0 --listenaddress 0.0.0.0 --listenport 5333 --loglevel LOG_WARNING
root 27992 28001 2.9 3.7 43336 16380 ? Ssl Sep21 47:18 /usr/bin/perl /usr/sbin/lepresenced --device hci0 --listenaddress 0.0.0.0 --listenport 5333 --loglevel LOG_WARNING
root 27992 28004 17.6 3.7 43336 16380 ? Ssl Sep21 280:39 /usr/bin/perl /usr/sbin/lepresenced --device hci0 --listenaddress 0.0.0.0 --listenport 5333 --loglevel LOG_WARNING
pi 13534 13534 0.0 0.4 7568 2016 pts/0 S+ 13:31 0:00 grep -E --color=auto (USER|lepresenced)
timeout 10 hcidump -i hci0 -w /tmp/hcidump >/dev/null;hcidump -r /tmp/hcidump |wc -l
2
Scheint recht linear erhöht im Vgl. zu Deiner Last - ggf. ist der zero dann doch einfach schwach auf der Brust ... wunder mich nur, weil mir die Last in dieser Form erst seit meinem Upgrade von Stretch auf Buster (und mittlerweile bullseye) bekannt ist ..
Hi!
Zitat von: hkspks am 22 September 2022, 13:38:17
timeout 10 hcidump -i hci0 -w /tmp/hcidump >/dev/null;hcidump -r /tmp/hcidump |wc -l 2
Fehlt da was oder ist das Ergebnis wirklich 2?
Zitat von: hkspks am 22 September 2022, 13:38:17
Scheint recht linear erhöht im Vgl. zu Deiner Last - ggf. ist der zero dann doch einfach schwach auf der Brust ... wunder mich nur, weil mir die Last in dieser Form erst seit meinem Upgrade von Stretch auf Buster (und mittlerweile bullseye) bekannt ist ..
Ich habe auf den ersten Blick zugegebenermaßen auch keinen Geistesblitz, wie ich den hcidump-Teil elegant optimieren kann. Ich habe mal als Proof of Concept eine Alternative gebaut, die auf gatttool setzt, was aus verschiedenen Gründen wesentlich schöner und stabiler ist. Die Rückmeldung passiert aber über MQTT und nicht das PRESENCE-"Protokoll", d. h. das erfordert etwas mehr Arbeit, wenn man es einsetzen möchte. https://forum.fhem.de/index.php/topic,127173.0.html
Patrick
Ausgabe ist tatsächlich 2! Alles klar, ich schau mir mal die MQTT-Variante an - ansonsten case closed ;-)