Problem setting up pktgen

Sivaguru Perambalam itssivaguru at gmail.com
Thu Dec 24 06:01:05 EST 2009


>
>
> Hello ,
>
> I want to use pktgen to do some UDP tests .
> So I figured out that pktgen is built in the kernel I am using (2.6.32) and
> tried to use the bash script given in the internet .
>
> Script :
>
> #! /bin/sh
> rmmod pktgen
> cd /usr/src/kernels/linux-2.6.32/net/core
> insmod pktgen.ko
>
> PGDEV=/proc/net/pktgen/pg0
>  function pgset() {
>     local result
>     echo $1 > $PGDEV
>    result=`cat $PGDEV | fgrep "Result: OK:"`
>     if [ "$result" = "" ]; then
>          cat $PGDEV | fgrep Result:
>     fi
> }
>
> function pg() {
>     echo inject > $PGDEV
>     cat $PGDEV
> }
>
> pgset "odev eth0"
> pgset "dst 1.1.1.3"
>
>
> I get the following error message :
>
> ./ipg: line 11: /proc/net/pktgen/pg0: No such file or directory
> cat: /proc/net/pktgen/pg0: No such file or directory
> cat: /proc/net/pktgen/pg0: No such file or directory
> ./ipg: line 11: /proc/net/pktgen/pg0: No such file or directory
> cat: /proc/net/pktgen/pg0: No such file or directory
> cat: /proc/net/pktgen/pg0: No such file or directory
>
> I am running this as the 'root' user.
> I don't understand how exactly pktgen is informed about
> the Ethernet interfaces on the system.
>
> This is what I get for  ls /proc/net/pktgen/ ,
> kpktgend_0  kpktgend_1  kpktgend_2  kpktgend_3  kpktgend_4  kpktgend_5
>  kpktgend_6  kpktgend_7  pgctrl
>
>
> Please let me know , what is going wrong.
>
> Thanks !
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20091223/137f285e/attachment.htm>


More information about the Linuxppc-dev mailing list