Skip to content

Conversation

@mo-krauti
Copy link

I added systemd watchdog support, so I can run the service reliably in a headless setup. Right now I am using a subprocess call to the system-notify cli tool on every GSMTAP file write.
This is my systemd service:
scat.service

[Unit]
Description=scat

[Service]
Type=simple
ExecStart=/usr/local/bin/scat-run.sh
WatchdogSec=60
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

and the script scat-run.sh ensures that every run saves to a new pcap file:

#!/bin/sh
ts=$(date +"%Y%m%d-%H%M%S")
exec /usr/local/bin/scat -u -i 4 -t sec -L "nas,rrc" -m e303 -F "/var/log/scat-$ts.pcap"

This works for me. Do you have interest in integrating this functionality upstream?
I could also use the systemd-watchdog python library for improved performance instead of calling the cli via a subprocess, but this would introduce a new dependency. We could make it optional like the fastcrc functionality.
Thank you for this great project.

@peremen
Copy link
Member

peremen commented Nov 30, 2025

There are some users who reported to run SCAT in headless setup, so definitely anything helping on this direction is useful. I will consider adding a configuration file support to specify the baseband type/device node for headless setup in the future.

I have some suggestions though:

  • SCAT can also run on BSDs, macOS and Windows, which do not have systemd. I'd implement a runtime check for the systemd availability and only call it when systemd is available.
  • Also, if you call the systemd-notify on write_cp(), there might be cases where a modem is receiving the message but not sending any control plane message. Examples include private LTE network where no Paging is expected. I need to think on where else also could be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants