Linux за българи: Форуми

Linux секция за начинаещи => Настройка на програми => Темата е започната от: Sublimate в Feb 27, 2007, 13:59



Титла: Ubuntu shaper help
Публикувано от: Sublimate в Feb 27, 2007, 13:59
root@niki:/home/niki# /etc/init.d/shaper compile
find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

/sbin/tc qdisc del dev eth1 root
/sbin/tc qdisc add dev eth1 root handle 1 cbq bandwidth 10Mbit avpkt 1000 cell 8
/sbin/tc class change dev eth1 root cbq weight 1Mbit allot 1514

/sbin/tc class add dev eth1 parent 1: classid 1:12 cbq bandwidth 10Mbit rate 20Kbit weight 10Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded
/sbin/tc qdisc add dev eth1 parent 1:12 handle 12 tbf rate 20Kbit buffer 10Kb/8 limit 15Kb mtu 1500
/sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.2.5 classid 1:12

echo "shaper."
root@niki:/home/niki# /etc/init.d/shaper restart
Stopping CBQ traffic shaping: shaper.
Starting CBQ traffic shaping: RTNETLINK answers: No such file or directory
shaper.
root@niki:/home/niki#

Някой има ли идея как мога да се справя с очевидните дребни проблеми.


Титла: Ubuntu shaper help
Публикувано от: Sublimate в Feb 27, 2007, 15:29
Проблемът най-вероятно идва от тук но незнам как да го разреша.



Примерен код
### Check configuration and load DEVICES, DEVFIELDS and CLASSLIST from $1
cbq_init () {
   ### Get a list of configured classes
   CLASSLIST=`find $1 \( -type f -or -type l \) -name 'cbq-*' \
      -not -name '*~' -maxdepth 1 -printf "%f\n"| sort`
   [ -z "$CLASSLIST" ] &&
      cbq_soft_failure "$2" "no configuration files found in $1!"

   ### Gather all DEVICE fields from $1/cbq-*
   DEVFIELDS=`find $1 \( -type f -or -type l \) -name 'cbq-*' \
        -not -name '*~' -maxdepth 1| xargs sed -n 's/#.*//; \
        s/[[:space:]]//g; /^DEVICE=[^,]*,[^,]*\(,[^,]*\)\?/ \
        { s/.*=//; p; }'| sort -u`
   [ -z "$DEVFIELDS" ] &&
      cbq_failure "no DEVICE field found in $1/cbq-*!"

   ### Check for different DEVICE fields for the same device
   DEVICES=`echo "$DEVFIELDS"| sed 's/,.*//'| sort -u`
   [ `echo "$DEVICES"| wc -l` -ne `echo "$DEVFIELDS"| wc -l` ] &&
      cbq_failure "different DEVICE fields for single device!\n$DEVFIELDS"
} # cbq_init


Титла: Ubuntu shaper help
Публикувано от: Sublimate в Feb 27, 2007, 18:37
От толкова много разбирачи май един не се намери да даде малко акъл!  :(


Титла: Ubuntu shaper help
Публикувано от: KPETEH в Feb 27, 2007, 19:16
root@niki:/home/niki# /etc/init.d/shaper restart
Stopping CBQ traffic shaping: shaper.
Starting CBQ traffic shaping: RTNETLINK answers: No such file or directory
shaper.

Това нищо ли не ти говори ?


Титла: Ubuntu shaper help
Публикувано от: Sublimate в Feb 27, 2007, 19:45
Цитат (KPETEH @ Фев. 27 2007,19:16)
root@niki:/home/niki# /etc/init.d/shaper restart
Stopping CBQ traffic shaping: shaper.
Starting CBQ traffic shaping: RTNETLINK answers: No such file or directory
shaper.

Това нищо ли не ти говори ?

Ако знаех точната причина за това съобщение нямаше да пиша тука.
След като моля за помощ явно се вижда, че ми е трудно да се справя сам!