Skip to contentSkip to conversation

linux tc + contab

LARTC foxy 202 2 participants 2 messages May 23, 2005

lore
Share & tools
lore

foxy 202

author
#0 lore raw

Hi I have strange problem.
same traffic control rules when i started it manual they work OK,
but when i started it from crontab / twice per day / doesn't work correctly ... look like delete rules doesn't work
... any ideas where to look for problem ?
i use debian sarge Linux 2.6 kernel ,

#!/bin/bash

TC=/sbin/tc
DEV=eth1

echo "Delete all rules"
$TC qdisc del dev $DEV root
echo "Add new root rule"
$TC qdisc add dev $DEV root handle 1: htb default 101

echo "lavel I - main tc rules"
$TC class add dev $DEV parent 1: classid 1:2 htb rate 1mbit ceil 1mbit
prio 3
$TC class add dev $DEV parent 1: classid 1:3 htb rate 1mbit ceil 1mbit prio 1
$TC class add dev $DEV parent 1: classid 1:4 htb rate 10mbit ceil
10mbit prio 4
$TC class add dev $DEV parent 1: classid 1:101 htb rate 1kbit ceil 1kbit prio 4
................................
.......................

Regards
emil
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#1 lore raw

Maybe cron user is not a root???

Maybe you need different shell in top of yous script???

-----Original Message-----
From: "foxy 202"<[email protected]>
Sent: 05-05-23 15:50:34
To: "LARTC"<[email protected]>
Subject: [LARTC] linux tc + contab
Hi I have strange problem.
same traffic control rules when i started it manual they work OK,
but when i started it from crontab / twice per day / doesn't work correctly ... look like delete rules doesn't work
... any ideas where to look for problem ?
i use debian sarge Linux 2.6 kernel ,

#!/bin/bash

TC=/sbin/tc
DEV=eth1

echo "Delete all rules"
$TC qdisc del dev $DEV root
echo "Add new root rule"
$TC qdisc add dev $DEV root handle 1: htb default 101

echo "lavel I - main tc rules"
$TC class add dev $DEV parent 1: classid 1:2 htb rate 1mbit ceil 1mbit
prio 3
$TC class add dev $DEV parent 1: classid 1:3 htb rate 1mbit ceil 1mbit prio 1

[Message truncated. Tap Edit->Mark for Download to get remaining portion.]

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc