henrygd / beszel

Lightweight server monitoring hub with historical data, docker stats, and alerts.
MIT License
2.86k stars 89 forks source link

MacOS will kill the agent automatically #248

Open krobipd opened 2 weeks ago

krobipd commented 2 weeks ago

hello

first thank you for your great tool.

I use it on my 2 Macs both are m1 Macs with MacOS Sequoia but the problem was also with Sonoma.

on m MacBook Pro macOS will kill the agent task automatically mostly between 5-25 minutes after start. on my MacMini it will run longer but in the end it gets also killed automatically.

I run the bezel agent directly under macOS, no docker.

how can I help you to find the problem.

henrygd commented 2 weeks ago

Are you able to view the logs and see if it printed a stack trace on exit?

You can also enable debug logs on the agent with the environment variable LOG_LEVEL=debug.

You can also try SENSORS="". If the issue is with reading sensors then that will skip that section of code.

I just updated the gopsutil version in 0.7.1 so please run the update command (./beszel-agent update) to make sure you're on the latest version.

Unfortunately I don't own any Apple devices so I can't troubleshoot this myself.

krobipd commented 2 weeks ago

@corrosive4354 i don't understand what you want, I DONT use docker and I don't know what proxy tool you mean. also I don't unterstand why I should use a php developing tool.

@henrygd thank you very much, I tried it with debug and as long as I have the terminal open and the app running with debug it will run. but as soon as I start the app without any output - so it can run automatically in the background - it will close after some time. &> /dev/null

2024/11/04 17:14:54 DEBUG 0.7.2 2024/11/04 17:14:54 DEBUG Not monitoring ZFS ARC err="open /proc/spl/kstat/zfs/arcstats: no such file or directory" 2024/11/04 17:14:54 DEBUG Disk partitions="[{\"device\":\"/dev/disk3s1s1\",\"mountpoint\":\"/\",\"fstype\":\"apfs\",\"opts\":[\"ro\",\"journaled\",\"multilabel\"]} {\"device\":\"devfs\",\"mountpoint\":\"/dev\",\"fstype\":\"devfs\",\"opts\":[\"rw\",\"nobrowse\",\"multilabel\"]} {\"device\":\"/dev/disk3s6\",\"mountpoint\":\"/System/Volumes/VM\",\"fstype\":\"apfs\",\"opts\":[\"rw\",\"noexec\",\"nobrowse\",\"journaled\",\"multilabel\",\"noatime\"]} {\"device\":\"/dev/disk3s2\",\"mountpoint\":\"/System/Volumes/Preboot\",\"fstype\":\"apfs\",\"opts\":[\"rw\",\"nobrowse\",\"journaled\",\"multilabel\"]} {\"device\":\"/dev/disk3s4\",\"mountpoint\":\"/System/Volumes/Update\",\"fstype\":\"apfs\",\"opts\":[\"rw\",\"nobrowse\",\"journaled\",\"multilabel\"]} {\"device\":\"/dev/disk1s2\",\"mountpoint\":\"/System/Volumes/xarts\",\"fstype\":\"apfs\",\"opts\":[\"rw\",\"noexec\",\"nobrowse\",\"journaled\",\"multilabel\",\"noatime\"]} {\"device\":\"/dev/disk1s1\",\"mountpoint\":\"/System/Volumes/iSCPreboot\",\"fstype\":\"apfs\",\"opts\":[\"rw\",\"nobrowse\",\"journaled\",\"multilabel\"]} {\"device\":\"/dev/disk1s3\",\"mountpoint\":\"/System/Volumes/Hardware\",\"fstype\":\"apfs\",\"opts\":[\"rw\",\"nobrowse\",\"journaled\",\"multilabel\"]} {\"device\":\"/dev/disk3s5\",\"mountpoint\":\"/System/Volumes/Data\",\"fstype\":\"apfs\",\"opts\":[\"rw\",\"nobrowse\",\"journaled\",\"multilabel\"]} {\"device\":\"map auto_home\",\"mountpoint\":\"/System/Volumes/Data/home\",\"fstype\":\"autofs\",\"opts\":[\"rw\",\"nobrowse\",\"automounted\",\"multilabel\"]} {\"device\":\"//krobi@KROBIS-NAS._smb._tcp.local/Load%26Work\",\"mountpoint\":\"/Volumes/Load\\u0026Work\",\"fstype\":\"smbfs\",\"opts\":[\"rw\",\"nosuid\",\"nodev\"]} {\"device\":\"//krobi@KROBIS-NAS._smb._tcp.local/MediaSphere\",\"mountpoint\":\"/Volumes/MediaSphere\",\"fstype\":\"smbfs\",\"opts\":[\"rw\",\"nosuid\",\"nodev\"]}]" 2024/11/04 17:14:54 DEBUG Disk I/O diskstats="map[disk0:{\"readCount\":25007354,\"mergedReadCount\":0,\"writeCount\":6180530,\"mergedWriteCount\":0,\"readBytes\":471897894912,\"writeBytes\":112142041088,\"readTime\":8710008,\"writeTime\":270183,\"iopsInProgress\":0,\"ioTime\":8980191,\"weightedIO\":0,\"name\":\"disk0\",\"serialNumber\":\"\",\"label\":\"\"}]" 2024/11/04 17:14:54 INFO Detected root device name=disk3s1s1 2024/11/04 17:14:54 WARN Device not found in diskstats name=disk3s1s1 2024/11/04 17:14:54 INFO Using I/O fallback name=disk0 2024/11/04 17:14:54 INFO Detected network interface name=en0 sent=64077556402 recv=806332085946 2024/11/04 17:14:54 INFO Detected network interface name=awdl0 sent=238955 recv=237585 2024/11/04 17:14:54 INFO Detected network interface name=utun4 sent=1392 recv=124 2024/11/04 17:14:54 DEBUG Getting stats 2024/11/04 17:14:54 DEBUG Temperature sensors="[{\"sensorKey\":\"gas gauge battery\",\"temperature\":26.699996948242188,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"eACC MTR Temp Sensor0\",\"temperature\":28.25,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"NAND CH0 temp\",\"temperature\":27,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie1\",\"temperature\":34.28816223144531,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie6\",\"temperature\":34.39544677734375,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdev5\",\"temperature\":27.8994140625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie8\",\"temperature\":34.8245849609375,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie7\",\"temperature\":32.57160949707031,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev6\",\"temperature\":29.029586791992188,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie5\",\"temperature\":34.28816223144531,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie4\",\"temperature\":32.57160949707031,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tcal\",\"temperature\":51.850006103515625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"SOC MTR Temp Sensor0\",\"temperature\":26.59375,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMGR SOC Die Temp Sensor1\",\"temperature\":27.453125,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor3\",\"temperature\":28.265625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev1\",\"temperature\":28.875747680664062,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev7\",\"temperature\":29.100601196289062,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor8\",\"temperature\":26.8125,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie8\",\"temperature\":31.927902221679688,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMGR SOC Die Temp Sensor2\",\"temperature\":27.203125,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie1\",\"temperature\":34.180877685546875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdev3\",\"temperature\":28.875747680664062,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdev4\",\"temperature\":28.109481811523438,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev4\",\"temperature\":-21.425674438476562,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor4\",\"temperature\":25.546875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"eACC MTR Temp Sensor3\",\"temperature\":24.03125,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie2\",\"temperature\":31.927902221679688,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie4\",\"temperature\":34.39544677734375,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor7\",\"temperature\":25.96875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev5\",\"temperature\":-21.400634765625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie6\",\"temperature\":33.00074768066406,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMGR SOC Die Temp Sensor0\",\"temperature\":27.859375,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"ISP MTR Temp Sensor5\",\"temperature\":30,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie2\",\"temperature\":34.50273132324219,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"GPU MTR Temp Sensor1\",\"temperature\":30,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdev1\",\"temperature\":29.01776123046875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tcal\",\"temperature\":51.850006103515625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdev2\",\"temperature\":28.316574096679688,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev8\",\"temperature\":28.9615478515625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU TP3w\",\"temperature\":33.322601318359375,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"SOC MTR Temp Sensor1\",\"temperature\":26.765625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"ANE MTR Temp Sensor1\",\"temperature\":30,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie3\",\"temperature\":32.67889404296875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"GPU MTR Temp Sensor4\",\"temperature\":30,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie5\",\"temperature\":33.42988586425781,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor5\",\"temperature\":27.46875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev2\",\"temperature\":29.100601196289062,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor9\",\"temperature\":26.703125,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"SOC MTR Temp Sensor2\",\"temperature\":24.203125,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie7\",\"temperature\":33.64445495605469,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor2\",\"temperature\":24.875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev3\",\"temperature\":29.378707885742188,\"sensorHigh\":0,\"sensorCritical\":0}]" 2024/11/04 17:14:54 DEBUG sysinfo data="{Hostname:krobis-MBP KernelVersion:24.1.0 Cores:8 Threads:8 CpuModel:Apple M1 Uptime:171164 Cpu:71.23 MemPct:66.81 DiskPct:54.17 Bandwidth:0 AgentVersion:0.7.2}" 2024/11/04 17:14:54 DEBUG System stats data="{Stats:{Cpu:71.23 MaxCpu:0 Mem:8 MemUsed:5.34 MemPct:66.81 MemBuffCache:2.58 MemZfsArc:0 Swap:0 SwapUsed:0 DiskTotal:228.27 DiskUsed:123.66 DiskPct:54.17 DiskReadPs:48.57 DiskWritePs:0 MaxDiskReadPs:0 MaxDiskWritePs:0 NetworkSent:0 NetworkRecv:0 MaxNetworkSent:0 MaxNetworkRecv:0 Temperatures:map[ANE MTR Temp Sensor1:30 GPU MTR Temp Sensor1:30 GPU MTR Temp Sensor4:30 ISP MTR Temp Sensor5:30 NAND CH0 temp:27 PMGR SOC Die Temp Sensor0:27.86 PMGR SOC Die Temp Sensor1:27.45 PMGR SOC Die Temp Sensor2:27.2 PMU TP3w:33.32 PMU tcal:51.85 PMU tdev1:28.88 PMU tdev2:29.1 PMU tdev3:29.38 PMU tdev6:29.03 PMU tdev7:29.1 PMU tdev8:28.96 PMU tdie1:34.29 PMU tdie2:31.93 PMU tdie4:32.57 PMU tdie5:33.43 PMU tdie6:33 PMU tdie7:33.64 PMU tdie8:31.93 PMU2 tcal:51.85 PMU2 tdev1:29.02 PMU2 tdev2:28.32 PMU2 tdev3:28.88 PMU2 tdev4:28.11 PMU2 tdev5:27.9 PMU2 tdie1:34.18 PMU2 tdie2:34.5 PMU2 tdie3:32.68 PMU2 tdie4:34.4 PMU2 tdie5:34.29 PMU2 tdie6:34.4 PMU2 tdie7:32.57 PMU2 tdie8:34.82 SOC MTR Temp Sensor0:26.59 SOC MTR Temp Sensor1:26.77 SOC MTR Temp Sensor2:24.2 eACC MTR Temp Sensor0:28.25 eACC MTR Temp Sensor3:24.03 gas gauge battery:26.7 pACC MTR Temp Sensor2:24.88 pACC MTR Temp Sensor3:28.27 pACC MTR Temp Sensor4:25.55 pACC MTR Temp Sensor5:27.47 pACC MTR Temp Sensor7:25.97 pACC MTR Temp Sensor8:26.81 pACC MTR Temp Sensor9:26.7] ExtraFs:map[]} Info:{Hostname:krobis-MBP KernelVersion:24.1.0 Cores:8 Threads:8 CpuModel:Apple M1 Uptime:171164 Cpu:71.23 MemPct:66.81 DiskPct:54.17 Bandwidth:0 AgentVersion:0.7.2} Containers:[]}" 2024/11/04 17:14:54 DEBUG Error getting docker stats err="Get \"http://localhost/containers/json\": dial unix /var/run/docker.sock: connect: no such file or directory" 2024/11/04 17:14:54 DEBUG Extra filesystems data=map[] 2024/11/04 17:14:54 DEBUG Stats data="{Stats:{Cpu:71.23 MaxCpu:0 Mem:8 MemUsed:5.34 MemPct:66.81 MemBuffCache:2.58 MemZfsArc:0 Swap:0 SwapUsed:0 DiskTotal:228.27 DiskUsed:123.66 DiskPct:54.17 DiskReadPs:48.57 DiskWritePs:0 MaxDiskReadPs:0 MaxDiskWritePs:0 NetworkSent:0 NetworkRecv:0 MaxNetworkSent:0 MaxNetworkRecv:0 Temperatures:map[ANE MTR Temp Sensor1:30 GPU MTR Temp Sensor1:30 GPU MTR Temp Sensor4:30 ISP MTR Temp Sensor5:30 NAND CH0 temp:27 PMGR SOC Die Temp Sensor0:27.86 PMGR SOC Die Temp Sensor1:27.45 PMGR SOC Die Temp Sensor2:27.2 PMU TP3w:33.32 PMU tcal:51.85 PMU tdev1:28.88 PMU tdev2:29.1 PMU tdev3:29.38 PMU tdev6:29.03 PMU tdev7:29.1 PMU tdev8:28.96 PMU tdie1:34.29 PMU tdie2:31.93 PMU tdie4:32.57 PMU tdie5:33.43 PMU tdie6:33 PMU tdie7:33.64 PMU tdie8:31.93 PMU2 tcal:51.85 PMU2 tdev1:29.02 PMU2 tdev2:28.32 PMU2 tdev3:28.88 PMU2 tdev4:28.11 PMU2 tdev5:27.9 PMU2 tdie1:34.18 PMU2 tdie2:34.5 PMU2 tdie3:32.68 PMU2 tdie4:34.4 PMU2 tdie5:34.29 PMU2 tdie6:34.4 PMU2 tdie7:32.57 PMU2 tdie8:34.82 SOC MTR Temp Sensor0:26.59 SOC MTR Temp Sensor1:26.77 SOC MTR Temp Sensor2:24.2 eACC MTR Temp Sensor0:28.25 eACC MTR Temp Sensor3:24.03 gas gauge battery:26.7 pACC MTR Temp Sensor2:24.88 pACC MTR Temp Sensor3:28.27 pACC MTR Temp Sensor4:25.55 pACC MTR Temp Sensor5:27.47 pACC MTR Temp Sensor7:25.97 pACC MTR Temp Sensor8:26.81 pACC MTR Temp Sensor9:26.7] ExtraFs:map[]} Info:{Hostname:krobis-MBP KernelVersion:24.1.0 Cores:8 Threads:8 CpuModel:Apple M1 Uptime:171164 Cpu:71.23 MemPct:66.81 DiskPct:54.17 Bandwidth:0 AgentVersion:0.7.2} Containers:[]}" 2024/11/04 17:14:54 INFO Starting SSH server address=:45876 2024/11/04 17:15:04 DEBUG Getting stats 2024/11/04 17:15:04 DEBUG Temperature sensors="[{\"sensorKey\":\"PMU2 tdie7\",\"temperature\":34.180877685546875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev6\",\"temperature\":29.100601196289062,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor5\",\"temperature\":28.28125,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev5\",\"temperature\":-21.406753540039062,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMGR SOC Die Temp Sensor0\",\"temperature\":27.828125,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU TP3w\",\"temperature\":34.180877685546875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor9\",\"temperature\":28.296875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie5\",\"temperature\":33.64445495605469,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdev3\",\"temperature\":28.875747680664062,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie2\",\"temperature\":35.14643859863281,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"eACC MTR Temp Sensor0\",\"temperature\":27.59375,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdev2\",\"temperature\":28.387588500976562,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor8\",\"temperature\":26.90625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie8\",\"temperature\":31.069625854492188,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tcal\",\"temperature\":51.850006103515625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie4\",\"temperature\":33.96630859375,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"SOC MTR Temp Sensor1\",\"temperature\":25.21875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev4\",\"temperature\":-21.41314697265625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"SOC MTR Temp Sensor0\",\"temperature\":26.15625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMGR SOC Die Temp Sensor2\",\"temperature\":27.1875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie6\",\"temperature\":33.1080322265625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie4\",\"temperature\":34.28816223144531,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev8\",\"temperature\":29.029586791992188,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor2\",\"temperature\":24.53125,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"GPU MTR Temp Sensor4\",\"temperature\":30,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"ANE MTR Temp Sensor1\",\"temperature\":30,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie3\",\"temperature\":33.85902404785156,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"gas gauge battery\",\"temperature\":26.699996948242188,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"NAND CH0 temp\",\"temperature\":27,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"GPU MTR Temp Sensor1\",\"temperature\":30,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdev1\",\"temperature\":29.01776123046875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor3\",\"temperature\":28.265625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev3\",\"temperature\":29.378707885742188,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie5\",\"temperature\":33.53717041015625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMGR SOC Die Temp Sensor1\",\"temperature\":27.890625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie1\",\"temperature\":33.85902404785156,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"SOC MTR Temp Sensor2\",\"temperature\":25.09375,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev7\",\"temperature\":29.029586791992188,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor4\",\"temperature\":26.140625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie1\",\"temperature\":34.28816223144531,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tcal\",\"temperature\":51.850006103515625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"eACC MTR Temp Sensor3\",\"temperature\":24.515625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie6\",\"temperature\":34.180877685546875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"pACC MTR Temp Sensor7\",\"temperature\":25.21875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev2\",\"temperature\":29.16864013671875,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdie8\",\"temperature\":34.39544677734375,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"ISP MTR Temp Sensor5\",\"temperature\":30,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie7\",\"temperature\":33.1080322265625,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdev1\",\"temperature\":29.100601196289062,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdev4\",\"temperature\":28.109481811523438,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU2 tdev5\",\"temperature\":28.038467407226562,\"sensorHigh\":0,\"sensorCritical\":0} {\"sensorKey\":\"PMU tdie2\",\"temperature\":31.82061767578125,\"sensorHigh\":0,\"sensorCritical\":0}]" 2024/11/04 17:15:04 DEBUG sysinfo data="{Hostname:krobis-MBP KernelVersion:24.1.0 Cores:8 Threads:8 CpuModel:Apple M1 Uptime:171174 Cpu:6.03 MemPct:66.69 DiskPct:54.17 Bandwidth:0 AgentVersion:0.7.2}" 2024/11/04 17:15:04 DEBUG System stats data="{Stats:{Cpu:6.03 MaxCpu:0 Mem:8 MemUsed:5.34 MemPct:66.69 MemBuffCache:2.58 MemZfsArc:0 Swap:0 SwapUsed:0 DiskTotal:228.27 DiskUsed:123.66 DiskPct:54.17 DiskReadPs:0.51 DiskWritePs:0.07 MaxDiskReadPs:0 MaxDiskWritePs:0 NetworkSent:0 NetworkRecv:0 MaxNetworkSent:0 MaxNetworkRecv:0 Temperatures:map[ANE MTR Temp Sensor1:30 GPU MTR Temp Sensor1:30 GPU MTR Temp Sensor4:30 ISP MTR Temp Sensor5:30 NAND CH0 temp:27 PMGR SOC Die Temp Sensor0:27.83 PMGR SOC Die Temp Sensor1:27.89 PMGR SOC Die Temp Sensor2:27.19 PMU TP3w:34.18 PMU tcal:51.85 PMU tdev1:29.1 PMU tdev2:29.17 PMU tdev3:29.38 PMU tdev6:29.1 PMU tdev7:29.03 PMU tdev8:29.03 PMU tdie1:34.29 PMU tdie2:31.82 PMU tdie4:33.97 PMU tdie5:33.54 PMU tdie6:33.11 PMU tdie7:33.11 PMU tdie8:31.07 PMU2 tcal:51.85 PMU2 tdev1:29.02 PMU2 tdev2:28.39 PMU2 tdev3:28.88 PMU2 tdev4:28.11 PMU2 tdev5:28.04 PMU2 tdie1:33.86 PMU2 tdie2:35.15 PMU2 tdie3:33.86 PMU2 tdie4:34.29 PMU2 tdie5:33.64 PMU2 tdie6:34.18 PMU2 tdie7:34.18 PMU2 tdie8:34.4 SOC MTR Temp Sensor0:26.16 SOC MTR Temp Sensor1:25.22 SOC MTR Temp Sensor2:25.09 eACC MTR Temp Sensor0:27.59 eACC MTR Temp Sensor3:24.52 gas gauge battery:26.7 pACC MTR Temp Sensor2:24.53 pACC MTR Temp Sensor3:28.27 pACC MTR Temp Sensor4:26.14 pACC MTR Temp Sensor5:28.28 pACC MTR Temp Sensor7:25.22 pACC MTR Temp Sensor8:26.91 pACC MTR Temp Sensor9:28.3] ExtraFs:map[]} Info:{Hostname:krobis-MBP KernelVersion:24.1.0 Cores:8 Threads:8 CpuModel:Apple M1 Uptime:171174 Cpu:6.03 MemPct:66.69 DiskPct:54.17 Bandwidth:0 AgentVersion:0.7.2} Containers:[]}" 2024/11/04 17:15:04 DEBUG Error getting docker stats err="Get \"http://localhost/containers/json\": dial unix /var/run/docker.sock: connect: no such file or directory" 2024/11/04 17:15:04 DEBUG Extra filesystems data=map[]

henrygd commented 2 weeks ago

What's the command you're using to run in the background?

Have you tried setting it up with launchd so it runs in the background and automatically at startup? (I don't know anything about launchd, but google says it's the Mac version of systemd.)

Or you could try running it in a terminal multiplexer like tmux.

krobipd commented 2 weeks ago

hey

I use AppleScript with the following parameter do shell script "KEY=\"my ssh key\" ./folder where beszel is/beszel-agent &> /dev/null &"

i have to do it because beszel always buts information in the terminal and so the script will never ends. with this the script will end and the beszel will get startet.

but there is a much deeper problem, maybe I should open an extra bug for that. when beszel is running something is will not be reachable but the agent is running. and now here is the extrem problem when I force quit the app in macOS it will destroy the actual user session, macOS will crash the user season and will open the login form again.

henrygd commented 2 weeks ago

Unfortunately I can't look further into this because I don't have any Apple devices.

I've started a discussion thread here: #276. Hopefully someone will have a good solution.

Maybe try launchd or running in a detached tmux terminal instead of using AppleScript.