0

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.

1
  • If you've resolved the issue yourself, please close the question, so that others know it's resolved and don't attempt to answer it. Oct 15, 2012 at 20:11

2 Answers 2

1

Does eth4 exist? pktgen doesn't create interfaces.

1
  • Thanks for trying to help, but it's already fixed :) Oct 27, 2010 at 18:01
-3

do a sudo bash ./pktgen.conf-1-1

1
  • The prompt root@ubuntu:~# indicates that the asker runs the command in question as root, so sudo would not change anything. Oct 17, 2012 at 18:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .