I have a metered Wifi connection that has lately started reaching the prepaid data limit faster than I expect. To figure out what specifically is using up bandwidth, I installed ipfm 0.11.5-4.2 with apt-get from the universe repository on my Ubuntu 21.04 system. I read through the man pages, configured ipfm.conf and ran the daemon for a few hours, and everything seemed to work as I expected. I got hourly dumps in /var/log/ipfm
and was happy.
The next time I restarted my computer, I expected more logs to be produced but to my surprise found out that ipfm didn't seem to be running. The apt package had installed /etc/init.d/ipfm
and all the appropriate /etc/rc[0-6].d/*ipfm
symlinks, so I went to check syslog and found the following:
Sep 22 17:24:19 mycomputer ipfm[760]: Starting IP Flow Meter:
Sep 22 17:24:19 mycomputer ipfm[764]: [pcap] error opening pcap: wlo1: That device is not up
Sep 22 17:24:19 mycomputer ipfm[764]: [ipfm] Unable to open pcap descriptor on device wlo1
Sep 22 17:24:19 mycomputer systemd[1]: Started ipfm.service.
If I start ipfm manually by typing systemctl start ipfm
, it starts logging as it should, so I guess the problem is that at bootup ipfm tries to start before the wifi interface is up, and while the daemon technically stays running, it doesn't log anything because when it started, the interface was not available. What's the proper way of postponing a startup service, or is there anything else I need to do to make the daemon work? I have tried changing the rc.d priorities by naming all the S01ipfm
files to S02ipfm
(everything else is S01*
) but to no avail; I still get the same error message in my syslog. Any advice?