voipmonitor / sniffer

VoIPmonitor sniffer sources
226 stars 105 forks source link

voipmonitor only runs in the foreground #101

Closed lancethepants closed 1 year ago

lancethepants commented 1 year ago

I compiled voipmonitor to run on my router. I used to run it years ago on arm, but now I have arm64. If I start with the following command, it stops and gives this message

admin@RT-AX88U-6860: ./voipmonitor --no-cdr -d /mnt/storage/audio -i br0 -W
voipmonitor version 30.3
local time 2022-08-23 23:18:58
voipmonitor[21026]: local time 2022-08-23 23:18:58
ethtool binary is not installed - NIC's parameters can't be set. This is not a fatal error.
voipmonitor[21026]: ethtool binary is not installed - NIC's parameters can't be set. This is not a fatal error.
voipmonitor[21026]: detected rrdtool version 10800
another voipmonitor instance with the same configuration file is running

No other instance is running.

But if I tell it not to fork then it seems to run in the foreground fine.

admin@RT-AX88U-6860:~/src/voipmonitor/voipmonitor/sniffer# ./voipmonitor --no-cdr -d /mnt/storage/audio -i br0 -W -k
voipmonitor version 30.3
local time 2022-08-23 23:24:04
voipmonitor[21636]: local time 2022-08-23 23:24:04
ethtool binary is not installed - NIC's parameters can't be set. This is not a fatal error.
voipmonitor[21636]: ethtool binary is not installed - NIC's parameters can't be set. This is not a fatal error.
voipmonitor[21636]: detected rrdtool version 10800
voipmonitor[21636]: start voipmonitor - version 30.3
voipmonitor[21636]: start PreProcessPacket out thread detach/21656
voipmonitor[21636]: start ProcessRtpPacket out thread distribute/21657
voipmonitor[21636]: start ProcessRtpPacket out thread hash/21658
voipmonitor[21636]: start ProcessRtpPacket next thread hash/21659
detect oneshot buffer
method 2 success
oneshot buffer: 7fb186b030
packet: 7fb186b030
offset: 760
voipmonitor[21636]: find oneshot libpcap buffer : success
pgrep: pattern that searches for process name longer than 15 characters will result in zero matches
Try `pgrep -f' option to match against the complete command line.
voipmonitor[21636]: Mysql's pid not found so mysql's swap usage will not be checked for next seven days.
voipmonitor commented 1 year ago

"another voipmonitor instance with the same configuration file is running" - can you please paste "ps axl|grep voipmoni" ?

lancethepants commented 1 year ago
admin@RT-AX88U-6860: ./voipmonitor --no-cdr -d /mnt/storage/audio -i br0 -W
voipmonitor version 30.3
local time 2022-08-24 06:44:59
voipmonitor[12505]: local time 2022-08-24 06:44:59
ethtool binary is not installed - NIC's parameters can't be set. This is not a fatal error.
voipmonitor[12505]: ethtool binary is not installed - NIC's parameters can't be set. This is not a fatal error.
voipmonitor[12505]: detected rrdtool version 10800
another voipmonitor instance with the same configuration file is running

admin@RT-AX88U-6860: ps axl|grep voipmoni
0     0 12536 11913  20   0   1936   952 pipe_w S+   pts/0      0:00 grep voipmoni
lancethepants commented 1 year ago

Full disclosure, I'm compiling this against musl libc, so here are some very hacky changes to get it to compile.

https://gist.github.com/lancethepants/2e2a12456a6d5756bae8c310b2e21b4a

CXX="g++ -fpermissive" \
make -j4

edit: updated patch with less warnings https://gist.github.com/lancethepants/69a27053bf2d042d57adb32daba98c9d

voipmonitor commented 1 year ago

hello, the problem was fixed in the latest develop branch. please test

lancethepants commented 1 year ago

Yes, that fixed it. Thanks!