Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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. –  Michael Hampton Oct 15 '12 at 20:11
add comment

2 Answers

Does eth4 exist? pktgen doesn't create interfaces.

share|improve this answer
    
Thanks for trying to help, but it's already fixed :) –  StackedCrooked Oct 27 '10 at 18:01
add comment

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

share|improve this answer
    
The prompt root@ubuntu:~# indicates that the asker runs the command in question as root, so sudo would not change anything. –  Adrian Lang Oct 17 '12 at 18:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.