What's new

Need help with softflowd

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

vlord

Regular Contributor
I have Merlin's .354.29 build and am having trouble getting softflowd to run as a daemon. I can get it to run in debug form but not otherwise. Any suggestions? Ultimately I'll be forwarding the data to a netflow analyzer but need help with baby steps.

Code:
admin@RT-AC66R:/tmp/home/root/fprobe# ifconfig
br0        Link encap:Ethernet  HWaddr 50:46:5D:D1:81:A0  
           inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:3242661 errors:0 dropped:0 overruns:0 frame:0
           TX packets:1689661 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0 
           RX bytes:481452974 (459.1 MiB)  TX bytes:125457441 (119.6 MiB)

eth0       Link encap:Ethernet  HWaddr 50:46:5D:D1:81:A0  
           inet addr:192.168.212.104  Bcast:192.168.212.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:1861914 errors:0 dropped:0 overruns:0 frame:0
           TX packets:3328106 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000 
           RX bytes:353118178 (336.7 MiB)  TX bytes:567393875 (541.1 MiB)
           Interrupt:4 Base address:0x2000 

eth1       Link encap:Ethernet  HWaddr 50:46:5D:D1:81:A0  
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:105496
           TX packets:0 errors:1 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000 
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
           Interrupt:3 Base address:0x8000 

eth2       Link encap:Ethernet  HWaddr 50:46:5D:D1:81:A4  
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:3267593 errors:0 dropped:0 overruns:0 frame:25574
           TX packets:1380194 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000 
           RX bytes:496330478 (473.3 MiB)  TX bytes:257803254 (245.8 MiB)
           Interrupt:5 Base address:0x8000 

lo         Link encap:Local Loopback  
           inet addr:127.0.0.1  Mask:255.0.0.0
           UP LOOPBACK RUNNING MULTICAST  MTU:16436  Metric:1
           RX packets:1009 errors:0 dropped:0 overruns:0 frame:0
           TX packets:1009 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0 
           RX bytes:158047 (154.3 KiB)  TX bytes:158047 (154.3 KiB)

vlan1      Link encap:Ethernet  HWaddr 50:46:5D:D1:81:A0  
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:49527 errors:0 dropped:0 overruns:0 frame:0
           TX packets:45398 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0 
           RX bytes:48759144 (46.5 MiB)  TX bytes:26481101 (25.2 MiB)

Run in debug mode:

Code:
admin@RT-AC66R:/tmp/home/root/fprobe# softflowd -i eth0 -v 9 -D
softflowd v0.9.8 starting data collection
ADD FLOW seq:1 [184.168.51.1]:80 <> [192.168.212.104]:59136 proto:6
ADD FLOW seq:2 [192.168.212.36]:1778 <> [255.255.255.255]:1778 proto:17
ADD FLOW seq:3 [192.168.212.136]:56497 <> [192.168.212.255]:8612 proto:17
ADD FLOW seq:4 [192.168.212.136]:52585 <> [224.0.0.1]:8612 proto:17
ADD FLOW seq:5 [192.168.212.5]:53 <> [192.168.212.104]:38426 proto:17
ADD FLOW seq:6 [192.168.212.6]:53 <> [192.168.212.104]:38426 proto:17
ADD FLOW seq:7 [192.168.212.1]:53 <> [192.168.212.104]:38426 proto:17
ADD FLOW seq:8 [192.168.212.5]:771 <> [192.168.212.104]:0 proto:1

Run as daemon and check for process running:

Code:
admin@RT-AC66R:/tmp/home/root/fprobe# softflowd -i eth0 -v 9
admin@RT-AC66R:/tmp/home/root/fprobe# ps |grep softflowd
 6442 admin     1416 S    grep softflowd
 
I had the same problem so I cheated :)

just run it with -d and background the task with &

so

>softflowd -i br0 -n 192.168.1.xx:2055 -m 1600 -d &

The way I actually use it is at boot time by creating the file /opt/etc/init.d/S29softflow with the following contents;

#!/bin/sh

ENABLED=yes
PROCS=softflowd
ARGS="-i br0 -n 192.168.1.xx:2055 -m 16000 -d"
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

. /opt/etc/init.d/rc.func
 
I noticed that you aren't calling out the netflow version but my real question is the call at the end of your script for rc.func - what is that doing? Doesn't exist on my router.
 
Stumbled across this thread while googling what sounds like the same issue you had - can't get softflowd to run on it's own without using the '-d' switch. Who knows if you're still on the forums.....and it's been years now, but did you end up getting this working?
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top