hardbyte / hardbyte/python-can

can.logger script doesn't work when started from systemd

未關閉
#896 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
1.6k
分支
697
PR 合併指標
30 天內沒有已合併 PR

描述

Hi,

I use a systemd service to log the socketcan can0 with can.logger script.
I use a Unit file that call the script:

...
[Service]
Type=simple
ExecStart=python -m can.logger -f /home/admin/can-logs/test.blf -v -c can0 -i socketcan
...

This script works perfectly when called from the linux shell, but when I start it from the service, the log file is created in /home/admin/can-logs but stay empty.
What could be wrong ? is python-can not able to handle socketcan from systemd service ?

Thanks for your help,

貢獻指南

開啟貢獻指南

研究方向

Start with the systemd Unit and its ExecStart command, then compare its environment and permissions with the working Linux shell invocation. Reproduce the service run with the can.logger command and determine why the created BLF file remains empty; done means logging from can0 produces records under systemd.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
linux, python
領域
embedded-iot, operating-systems
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。