Loading the 'pktgen' module on Ubuntu Server
- by StackedCrooked
I would like to enable and use the pktgen module on Ubuntu Server. I have enabed the module by adding a line containing 'pktgen' to the /etc/modules file. After rebooting it seems that the module is successfully loaded because the directory /proc/net/pktgen exists.
However when trying to run the first sample I get these errors:
root@ubuntu:~# bash ./pktgen.conf-1-1
Removing all devices
Adding eth4
Setting max_before_softirq 10000
Configuring /proc/net/pktgen/eth4
./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory
cat: /proc/net/pktgen/eth4: No such file or directory
cat: /proc/net/pktgen/eth4: No such file or directory
./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory
cat: /proc/net/pktgen/eth4: No such file or directory
cat: /proc/net/pktgen/eth4: No such file or directory
./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory
cat: /proc/net/pktgen/eth4: No such file or directory
cat: /proc/net/pktgen/eth4: No such file or directory
./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory
cat: /proc/net/pktgen/eth4: No such file or directory
cat: /proc/net/pktgen/eth4: No such file or directory
./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory
cat: /proc/net/pktgen/eth4: No such file or directory
cat: /proc/net/pktgen/eth4: No such file or directory
./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory
cat: /proc/net/pktgen/eth4: No such file or directory
cat: /proc/net/pktgen/eth4: No such file or directory
Running... ctrl^C to stop
Done
It turns out the script simply unable to write a file to the /proc/net/pktgen directory. When I try this manually it fails as well:
root@ubuntu:~# cd /proc/net/pktgen/
root@ubuntu:/proc/net/pktgen# touch eth4
touch: cannot touch `eth4': No such file or directory
Can anyone help me make it work?
I'm using Ubuntu version: 2.6.32-21-server.
Fixed
I apologize for keeping this post not up to date. I was able to fix it. If I remember well the cause of the error was that eth4 did not exist, or did not have the 'online' status.
Anyway, it is fixed now.