summaryrefslogtreecommitdiff
path: root/scripts/vyatta-show-queue
blob: 54f6291281b15e287bfc4f3398bf3865d8dc7aa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /bin/bash

declare progname=${0##*/}

_usage ()
{
    cat <<-EOF
	Usage: $progname INTERFACE
	       $progname INTERFACE filter
	       $progname INTERFACE class
	EOF
}

if [[ $# -lt 1 ]]; then
    _usage
    exit 1
fi

if [[ $# -eq 1 ]]; then
	/sbin/tc -s -d qdisc show dev $1
else
	case $2 in
	filter )
		/sbin/tc -p filter show dev $1 ;;
	class )
		/sbin/tc -s -d class show dev $1 ;;
	 *)
		_usage; exit 1;;
	esac
fi