Linux node5458.myfcloud.com 6.10.2-x86_64-linode165 #1 SMP PREEMPT_DYNAMIC Tue Jul 30 15:03:21 EDT 2024 x86_64
Apache
: 45.79.123.194 | : 3.147.82.108
16 Domain
7.4.33
addify5
shells.trxsecurity.org
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
Backdoor Scanner
Backdoor Create
Alfa Webshell
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
sbin /
[ HOME SHELL ]
Name
Size
Permission
Action
NetworkManager
2.83
MB
-rwxr-xr-x
accessdb
11.55
KB
-rwxr-xr-x
addgnupghome
3.05
KB
-rwxr-xr-x
addpart
19.69
KB
-rwxr-xr-x
adduser
134.39
KB
-rwxr-xr-x
agetty
48.48
KB
-rwxr-xr-x
alternatives
27.61
KB
-rwxr-xr-x
anacron
35.52
KB
-rwxr-xr-x
apachectl
4.31
KB
-rwxr-xr-x
applygnupgdefaults
2.21
KB
-rwxr-xr-x
arp
63.98
KB
-rwxr-xr-x
arpd
52.98
KB
-rwxr-xr-x
arping
23.19
KB
-rwxr-xr-x
atd
27.17
KB
-rwxr-xr-x
atopacctd
23.73
KB
-rwxr-xr-x
atrun
67
B
-rwxr-xr-x
audispd
39.75
KB
-rwxr-xr-x
auditctl
39.56
KB
-rwxr-xr-x
auditd
125.65
KB
-rwxr-xr-x
augenrules
3.7
KB
-rwxr-xr-x
aureport
105.39
KB
-rwxr-xr-x
ausearch
109.8
KB
-rwxr-xr-x
authconfig
43.49
KB
-rwxr-xr-x
authconfig-tui
43.49
KB
-rwxr-xr-x
autrace
15.49
KB
-rwxr-x---
avcstat
11.25
KB
-rwxr-xr-x
badblocks
27.69
KB
-rwxr-xr-x
biosdecode
24.15
KB
-rwxr-xr-x
biosdevname
36.57
KB
-rwxr-xr-x
blkdeactivate
15.97
KB
-r-xr-xr-x
blkdiscard
23.84
KB
-rwxr-xr-x
blkid
77.92
KB
-rwxr-xr-x
blkmapd
43.81
KB
-rwxr-xr-x
blockdev
32.2
KB
-rwxr-xr-x
bridge
77.61
KB
-rwxr-xr-x
btrfs
690.59
KB
-rwxr-xr-x
btrfs-convert
378.62
KB
-rwxr-xr-x
btrfs-debug-tree
354.23
KB
-rwxr-xr-x
btrfs-find-root
346.22
KB
-rwxr-xr-x
btrfs-image
374.63
KB
-rwxr-xr-x
btrfs-map-logical
350.27
KB
-rwxr-xr-x
btrfs-select-super
346.2
KB
-rwxr-xr-x
btrfs-zero-log
346.2
KB
-rwxr-xr-x
btrfsck
690.59
KB
-rwxr-xr-x
btrfstune
350.24
KB
-rwxr-xr-x
build-locale-archive
860.52
KB
-rwx------
cacertdir_rehash
644
B
-rwxr-xr-x
capsh
19.43
KB
-rwxr-xr-x
cbq
32.73
KB
-rwxr-xr-x
cfdisk
71.37
KB
-rwxr-xr-x
chcpu
23.7
KB
-rwxr-xr-x
check_forensic
952
B
-rwxr-xr-x
chgpasswd
64.1
KB
-rwxr-xr-x
chkconfig
40.22
KB
-rwxr-xr-x
chpasswd
55.88
KB
-rwxr-xr-x
chroot
32.48
KB
-rwxr-xr-x
clock
48.44
KB
-rwxr-xr-x
clockdiff
19.04
KB
-rwxr-xr-x
consoletype
6.95
KB
-rwxr-xr-x
convertquota
70.88
KB
-rwxr-xr-x
cracklib-check
7.04
KB
-rwxr-xr-x
cracklib-format
246
B
-rwxr-xr-x
cracklib-packer
11.06
KB
-rwxr-xr-x
cracklib-unpacker
7.02
KB
-rwxr-xr-x
create-cracklib-dict
990
B
-rwxr-xr-x
crond
68.48
KB
-rwxr-xr-x
csf
245.1
KB
-rwx------
ctrlaltdel
11.2
KB
-rwxr-xr-x
ctstat
20.09
KB
-rwxr-xr-x
ddns-confgen
19.44
KB
-rwxr-xr-x
debugfs
120.64
KB
-rwxr-xr-x
delpart
19.69
KB
-rwxr-xr-x
depmod
143.24
KB
-rwxr-xr-x
devlink
64.72
KB
-rwxr-xr-x
dhclient
414.34
KB
-rwxr-xr-x
dhclient-script
30.38
KB
-rwxr-xr-x
dmfilemapd
19.16
KB
-r-xr-xr-x
dmidecode
120.2
KB
-rwxr-xr-x
dmsetup
149.2
KB
-r-xr-xr-x
dmstats
149.2
KB
-r-xr-xr-x
dnssec-checkds
922
B
-rwxr-xr-x
dnssec-coverage
924
B
-rwxr-xr-x
dnssec-dsfromkey
56.6
KB
-rwxr-xr-x
dnssec-importkey
52.59
KB
-rwxr-xr-x
dnssec-keyfromlabel
60.52
KB
-rwxr-xr-x
dnssec-keygen
64.55
KB
-rwxr-xr-x
dnssec-keymgr
920
B
-rwxr-xr-x
dnssec-revoke
48.45
KB
-rwxr-xr-x
dnssec-settime
56.52
KB
-rwxr-xr-x
dnssec-signzone
105.7
KB
-rwxr-xr-x
dnssec-verify
48.46
KB
-rwxr-xr-x
dovecot
370.67
KB
-rwxr-xr-x
dovecot_cpshutdown
3.27
KB
-rwxr-xr-x
dracut
55.83
KB
-rwxr-xr-x
dumpe2fs
23.62
KB
-rwxr-xr-x
e2freefrag
11.15
KB
-rwxr-xr-x
e2fsck
250.55
KB
-rwxr-xr-x
e2image
27.85
KB
-rwxr-xr-x
e2label
69.41
KB
-rwxr-xr-x
e2undo
11.32
KB
-rwxr-xr-x
e4defrag
23.55
KB
-rwxr-xr-x
eapol_test
1.77
MB
-rwxr-xr-x
ebtables
6.85
KB
-rwxr-xr-x
ebtables-restore
10.88
KB
-rwxr-xr-x
ebtables-save
851
B
-rwxr-xr-x
edquota
83.09
KB
-rwxr-xr-x
ether-wake
73.26
KB
-rwxr-xr-x
ethtool
293.87
KB
-rwxr-xr-x
exicyclog
11.01
KB
-rwxr-xr-x
exigrep
10.44
KB
-rwxr-xr-x
exim
1.33
MB
-rwsr-xr-x
exim_checkaccess
4.73
KB
-rwxr-xr-x
exim_dbmbuild
82.09
KB
-rwxr-xr-x
exim_dumpdb
134.47
KB
-rwxr-xr-x
exim_fixdb
168.22
KB
-rwxr-xr-x
exim_lock
64.66
KB
-rwxr-xr-x
exim_tidydb
142.8
KB
-rwxr-xr-x
eximstats
148.01
KB
-rwxr-xr-x
exinext
8.02
KB
-rwxr-xr-x
exiqgrep
5.46
KB
-rwxr-xr-x
exiqsumm
5.07
KB
-rwxr-xr-x
exiwhat
4.32
KB
-rwxr-xr-x
exportfs
76.91
KB
-rwxr-xr-x
faillock
15.02
KB
-rwxr-xr-x
fcgistarter
23.85
KB
-rwxr-xr-x
fdformat
11.27
KB
-rwxr-xr-x
fdisk
195.8
KB
-rwxr-xr-x
filefrag
15.23
KB
-rwxr-xr-x
findfs
11.2
KB
-rwxr-xr-x
firewalld
6.87
KB
-rwxr-xr-x
fixfiles
11.03
KB
-rwxr-xr-x
fsck
32.12
KB
-rwxr-xr-x
fsck.btrfs
1.16
KB
-rwxr-xr-x
fsck.cramfs
19.57
KB
-rwxr-xr-x
fsck.ext2
250.55
KB
-rwxr-xr-x
fsck.ext3
250.55
KB
-rwxr-xr-x
fsck.ext4
250.55
KB
-rwxr-xr-x
fsck.minix
73.32
KB
-rwxr-xr-x
fsck.xfs
433
B
-rwxr-xr-x
fsfreeze
11.23
KB
-rwxr-xr-x
fstrim
40.59
KB
-rwxr-xr-x
fuser
32.34
KB
-rwxr-xr-x
fxload
19.26
KB
-rwxr-xr-x
genhomedircon
23.77
KB
-rwxr-xr-x
genhostid
6.94
KB
-rwxr-xr-x
genl
52.81
KB
-rwxr-xr-x
genl-ctrl-list
11.27
KB
-rwxr-xr-x
genrandom
11.16
KB
-rwxr-xr-x
getcap
11.13
KB
-rwxr-xr-x
getenforce
7.01
KB
-rwxr-xr-x
getpcaps
7.07
KB
-rwxr-xr-x
getsebool
11.13
KB
-rwxr-xr-x
glibc_post_upgrade.x86_64
772.05
KB
-rwx------
groupadd
85.65
KB
-rwxr-xr-x
groupdel
77.38
KB
-rwxr-xr-x
groupmems
55.97
KB
-rwxr-xr-x
groupmod
85.66
KB
-rwxr-xr-x
grpck
59.93
KB
-rwxr-xr-x
grpconv
51.73
KB
-rwxr-xr-x
grpunconv
51.73
KB
-rwxr-xr-x
grub2-bios-setup
1.03
MB
-rwxr-xr-x
grub2-get-kernel-settings
2.08
KB
-rwxr-xr-x
grub2-install
1.29
MB
-rwxr-xr-x
grub2-macbless
1.02
MB
-rwxr-xr-x
grub2-mkconfig
7.63
KB
-rwxr-xr-x
grub2-ofpathname
225.54
KB
-rwxr-xr-x
grub2-probe
1.03
MB
-rwxr-xr-x
grub2-reboot
4
KB
-rwxr-xr-x
grub2-rpm-sort
258.52
KB
-rwxr-xr-x
grub2-set-default
3.46
KB
-rwxr-xr-x
grub2-setpassword
2.96
KB
-rwxr-xr-x
grub2-sparc64-setup
1.04
MB
-rwxr-xr-x
grubby
71.27
KB
-rwxr-xr-x
gss-server
23.13
KB
-rwxr-xr-x
gssproxy
130.64
KB
-rwxr-xr-x
halt
704.8
KB
-rwxr-xr-x
hardlink
15.29
KB
-rwxr-xr-x
htcacheclean
78.45
KB
-rwxr-xr-x
httpd
2.31
MB
-rwxr-xr-x
hwclock
48.44
KB
-rwxr-xr-x
iconvconfig
22.15
KB
-rwxr-xr-x
iconvconfig.x86_64
22.15
KB
-rwxr-xr-x
ifcfg
2.99
KB
-rwxr-xr-x
ifconfig
80.05
KB
-rwxr-xr-x
ifdown
1.61
KB
-rwxr-xr-x
ifenslave
19.74
KB
-rwxr-xr-x
ifstat
40.6
KB
-rwxr-xr-x
ifup
4.89
KB
-rwxr-xr-x
imunify-notifier
9.8
MB
-rwxr-xr-x
init
1.56
MB
-rwxr-xr-x
insmod
143.24
KB
-rwxr-xr-x
install-info
110.42
KB
-rwxr-xr-x
installkernel
2.69
KB
-rwxr-xr-x
iotop
495
B
-rwxr-xr-x
ip
459.59
KB
-rwxr-xr-x
ip6tables
91.52
KB
-rwxr-xr-x
ip6tables-restore
91.52
KB
-rwxr-xr-x
ip6tables-save
91.52
KB
-rwxr-xr-x
ipmaddr
19.33
KB
-rwxr-xr-x
iprconfig
394.37
KB
-rwxr-xr-x
iprdbg
135.94
KB
-rwx------
iprdump
123.67
KB
-rwxr-xr-x
iprinit
123.64
KB
-rwxr-xr-x
iprsos
2.18
KB
-rwxr-xr-x
iprupdate
123.64
KB
-rwxr-xr-x
ipset
7.02
KB
-rwxr-xr-x
iptables
91.52
KB
-rwxr-xr-x
iptables-restore
91.52
KB
-rwxr-xr-x
iptables-save
91.52
KB
-rwxr-xr-x
iptunnel
23.33
KB
-rwxr-xr-x
irqbalance
48.5
KB
-rwxr-xr-x
isc-hmac-fixup
11.2
KB
-rwxr-xr-x
kexec
166.06
KB
-rwxr-xr-x
key.dns_resolver
19.45
KB
-rwxr-xr-x
killall5
23.17
KB
-rwxr-xr-x
kpartx
39.47
KB
-rwxr-xr-x
lchage
15.41
KB
-rwxr-xr-x
ldattach
27.93
KB
-rwxr-xr-x
ldconfig
952.08
KB
-rwxr-xr-x
lfd
382.42
KB
-rwx------
lgroupadd
11.28
KB
-rwxr-xr-x
lgroupdel
11.26
KB
-rwxr-xr-x
lgroupmod
15.44
KB
-rwxr-xr-x
lid
15.4
KB
-rwxr-xr-x
lnewusers
15.46
KB
-rwxr-xr-x
lnstat
20.09
KB
-rwxr-xr-x
load_policy
10.97
KB
-rwxr-xr-x
logrotate
68.61
KB
-rwxr-xr-x
logsave
11.27
KB
-rwxr-xr-x
losetup
82.45
KB
-rwxr-xr-x
lpasswd
15.5
KB
-rwxr-xr-x
lshw
895.18
KB
-rwxr-xr-x
lsmod
143.24
KB
-rwxr-xr-x
lsof
150.57
KB
-rwxr-xr-x
luseradd
15.38
KB
-rwxr-xr-x
luserdel
11.3
KB
-rwxr-xr-x
lusermod
19.43
KB
-rwxr-xr-x
lwresd
768.18
KB
-rwxr-xr-x
makedumpfile
376.52
KB
-rwxr-xr-x
matchpathcon
11.19
KB
-rwxr-xr-x
mii-diag
20.08
KB
-rwxr-xr-x
mii-tool
19.51
KB
-rwxr-xr-x
mkdict
246
B
-rwxr-xr-x
mkdumprd
13.99
KB
-rwxr-xr-x
mke2fs
94.08
KB
-rwxr-xr-x
mkfs
11.25
KB
-rwxr-xr-x
mkfs.btrfs
366.45
KB
-rwxr-xr-x
mkfs.cramfs
36.16
KB
-rwxr-xr-x
mkfs.ext2
94.08
KB
-rwxr-xr-x
mkfs.ext3
94.08
KB
-rwxr-xr-x
mkfs.ext4
94.08
KB
-rwxr-xr-x
mkfs.minix
36.27
KB
-rwxr-xr-x
mkfs.xfs
359.8
KB
-rwxr-xr-x
mkhomedir_helper
19.05
KB
-rwxr-xr-x
mklost+found
11.11
KB
-rwxr-xr-x
mkswap
69.64
KB
-rwxr-xr-x
modinfo
143.24
KB
-rwxr-xr-x
modprobe
143.24
KB
-rwxr-xr-x
modsec-sdbm-util
22.17
KB
-rwxr-x---
mount.nfs
114.68
KB
-rwsr-xr-x
mount.nfs4
114.68
KB
-rwsr-xr-x
mountstats
40.59
KB
-rwxr-xr-x
mtr
83.18
KB
-rwxr-xr-x
mysqld
244.14
MB
-rwxr-xr-x
mysqld-debug
165.52
MB
-rwxr-xr-x
named
768.18
KB
-rwxr-xr-x
named-checkconf
32.25
KB
-rwxr-xr-x
named-checkzone
32.06
KB
-rwxr-xr-x
named-compilezone
32.06
KB
-rwxr-xr-x
named-journalprint
11.13
KB
-rwxr-xr-x
nameif
15.32
KB
-rwxr-xr-x
netreport
10.96
KB
-rwxr-sr-x
new-kernel-pkg
24.96
KB
-rwxr-xr-x
newusers
93.45
KB
-rwxr-xr-x
nfsdcltrack
40.11
KB
-rwxr-xr-x
nfsidmap
19.32
KB
-rwxr-xr-x
nfsiostat
23.64
KB
-rwxr-xr-x
nfsstat
29.84
KB
-rwxr-xr-x
nl-class-add
11.7
KB
-rwxr-xr-x
nl-class-delete
11.55
KB
-rwxr-xr-x
nl-class-list
11.48
KB
-rwxr-xr-x
nl-classid-lookup
11.29
KB
-rwxr-xr-x
nl-cls-add
11.76
KB
-rwxr-xr-x
nl-cls-delete
11.68
KB
-rwxr-xr-x
nl-cls-list
11.58
KB
-rwxr-xr-x
nl-link-list
11.52
KB
-rwxr-xr-x
nl-pktloc-lookup
11.36
KB
-rwxr-xr-x
nl-qdisc-add
11.6
KB
-rwxr-xr-x
nl-qdisc-delete
11.54
KB
-rwxr-xr-x
nl-qdisc-list
11.63
KB
-rwxr-xr-x
nologin
7.01
KB
-rwxr-xr-x
nscd
180.02
KB
-rwxr-xr-x
nsec3hash
11.13
KB
-rwxr-xr-x
nstat
23.88
KB
-rwxr-xr-x
osd_login
2.55
KB
-rwxr-xr-x
ownership
15.04
KB
-rwxr-xr-x
packer
11.06
KB
-rwxr-xr-x
pam_console_apply
39.69
KB
-rwxr-xr-x
pam_tally2
15.05
KB
-rwxr-xr-x
pam_timestamp_check
10.97
KB
-rwsr-xr-x
paperconfig
4.07
KB
-rwxr-xr-x
parted
77.22
KB
-rwxr-xr-x
partprobe
11.23
KB
-rwxr-xr-x
partx
86.55
KB
-rwxr-xr-x
pdns_server
98.68
MB
-rwxr-xr-x
pidof
23.17
KB
-rwxr-xr-x
ping6
64.63
KB
-rwxr-xr-x
pivot_root
11.19
KB
-rwxr-xr-x
plipconfig
11.06
KB
-rwxr-xr-x
pluginviewer
15.23
KB
-rwxr-xr-x
plymouth-set-default-theme
6.21
KB
-rwxr-xr-x
plymouthd
84.22
KB
-rwxr-xr-x
poweroff
704.8
KB
-rwxr-xr-x
ppp-watch
23.2
KB
-rwxr-xr-x
pure-authd
18.37
KB
-rwxr-xr-x
pure-certd
18.27
KB
-rwxr-xr-x
pure-config.pl
4.64
KB
-rwxr-xr-x
pure-ftpd
173.28
KB
-rwxr-xr-x
pure-ftpwho
25.96
KB
-rwxr-xr-x
pure-mrtginfo
9.93
KB
-rwxr-xr-x
pure-quotacheck
13.95
KB
-rwxr-xr-x
pure-uploadscript
14.21
KB
-rwxr-xr-x
pwck
51.71
KB
-rwxr-xr-x
pwconv
47.57
KB
-rwxr-xr-x
pwhistory_helper
15.44
KB
-rwxr-xr-x
pwunconv
47.59
KB
-rwxr-xr-x
quot
70.66
KB
-rwxr-xr-x
quotacheck
107.29
KB
-rwxr-xr-x
quotaoff
75.03
KB
-rwxr-xr-x
quotaon
75.03
KB
-rwxr-xr-x
quotastats
14.03
KB
-rwxr-xr-x
rdisc
23.17
KB
-rwxr-xr-x
rdma
73.42
KB
-rwxr-xr-x
readprofile
15.46
KB
-rwxr-xr-x
reboot
704.8
KB
-rwxr-xr-x
repquota
75.16
KB
-rwxr-xr-x
request-key
19.41
KB
-rwxr-xr-x
resize2fs
48.41
KB
-rwxr-xr-x
resizepart
32.36
KB
-rwxr-xr-x
restorecon
27.16
KB
-rwxr-xr-x
rmmod
143.24
KB
-rwxr-xr-x
rndc
35.88
KB
-rwxr-xr-x
rndc-confgen
19.44
KB
-rwxr-xr-x
rotatelogs
53
KB
-rwxr-xr-x
route
66.6
KB
-rwxr-xr-x
routef
173
B
-rwxr-xr-x
routel
1.59
KB
-rwxr-xr-x
rpc.gssd
88.73
KB
-rwxr-xr-x
rpc.idmapd
48.13
KB
-rwxr-xr-x
rpc.mountd
128.91
KB
-rwxr-xr-x
rpc.nfsd
40.2
KB
-rwxr-xr-x
rpc.rquotad
78.95
KB
-rwxr-xr-x
rpc.statd
97.59
KB
-rwxr-xr-x
rpcbind
60.07
KB
-rwxr-xr-x
rpcdebug
18.05
KB
-rwxr-xr-x
rpcinfo
27.3
KB
-rwxr-xr-x
rsyslogd
648.45
KB
-rwxr-xr-x
rtacct
41.93
KB
-rwxr-xr-x
rtcwake
31.96
KB
-rwxr-xr-x
rtmon
48.67
KB
-rwxr-xr-x
rtpr
37
B
-rwxr-xr-x
rtstat
20.09
KB
-rwxr-xr-x
runlevel
704.8
KB
-rwxr-xr-x
runq
1.33
MB
-rwsr-xr-x
runuser
32.21
KB
-rwxr-xr-x
safe_finger
11.08
KB
-rwxr-xr-x
sasl2-shared-mechlist
10.98
KB
-rwxr-xr-x
saslauthd
92.59
KB
-rwxr-xr-x
sasldblistusers2
19.26
KB
-rwxr-xr-x
saslpasswd2
15.09
KB
-rwxr-xr-x
sefcontext_compile
60.53
KB
-rwxr-xr-x
selabel_digest
11.17
KB
-rwxr-xr-x
selabel_lookup
11.14
KB
-rwxr-xr-x
selabel_lookup_best_match
11.16
KB
-rwxr-xr-x
selabel_partial_match
11.09
KB
-rwxr-xr-x
selinux_restorecon
15.21
KB
-rwxr-xr-x
selinuxconlist
11.1
KB
-rwxr-xr-x
selinuxdefcon
11.12
KB
-rwxr-xr-x
selinuxenabled
6.98
KB
-rwxr-xr-x
selinuxexeccon
7.09
KB
-rwxr-xr-x
semanage
42.76
KB
-rwxr-xr-x
semodule
23.77
KB
-rwxr-xr-x
sendmail
13.48
KB
-rwxr-sr-x
service
3.17
KB
-rwxr-xr-x
sestatus
15.02
KB
-rwxr-xr-x
setcap
11.13
KB
-rwxr-xr-x
setenforce
7.05
KB
-rwxr-xr-x
setfiles
27.16
KB
-rwxr-xr-x
setquota
83.16
KB
-rwxr-xr-x
setsebool
14.99
KB
-rwxr-xr-x
sfdisk
83.25
KB
-rwxr-xr-x
showmount
19.56
KB
-rwxr-xr-x
shutdown
704.8
KB
-rwxr-xr-x
sim_server
10.97
KB
-rwxr-xr-x
slattach
42.4
KB
-rwxr-xr-x
sln
743.78
KB
-rwxr-xr-x
sm-notify
68.43
KB
-rwxr-xr-x
smartctl
864.48
KB
-rwxr-xr-x
smartd
670.63
KB
-rwxr-xr-x
snmpd
31.05
KB
-rwxr-xr-x
snmptrapd
31.22
KB
-rwxr-xr-x
ss
128.44
KB
-rwxr-xr-x
sshd
836.91
KB
-rwxr-xr-x
sshd-keygen
3.53
KB
-rwxr-xr-x
start-statd
842
B
-rwxr-xr-x
start-stop-daemon
32.96
KB
-rwxr-xr-x
suexec
43.3
KB
-rwsr-xr-x
sulogin
40.53
KB
-rwxr-xr-x
suphp
2.47
MB
-rwsr-x---
sushell
67
B
-rwxr-xr-x
sw-engine-fpm
22.35
MB
-rwxr-xr-x
swaplabel
15.31
KB
-rwxr-xr-x
swapoff
15.53
KB
-rwxr-xr-x
swapon
53.29
KB
-rwxr-xr-x
switch_root
15.35
KB
-rwxr-xr-x
sys-unconfig
184
B
-rwxr-xr-x
sysctl
23.57
KB
-rwxr-xr-x
t1libconfig
3.83
KB
-rwxr-xr-x
tc
384.66
KB
-rwxr-xr-x
tcpd
36.62
KB
-rwxr-xr-x
tcpdmatch
40.83
KB
-rwxr-xr-x
tcsd
300.27
KB
-rwxr-xr-x
telinit
704.8
KB
-rwxr-xr-x
testsaslauthd
15.09
KB
-rwxr-xr-x
tmpwatch
27.87
KB
-rwxr-xr-x
tracepath
15.05
KB
-rwxr-xr-x
tracepath6
15.05
KB
-rwxr-xr-x
try-from
23.47
KB
-rwxr-xr-x
tsig-keygen
19.44
KB
-rwxr-xr-x
tune2fs
69.41
KB
-rwxr-xr-x
tuned
3.29
KB
-rwxr-xr-x
tuned-adm
5.22
KB
-rwxr-xr-x
udevadm
414.27
KB
-rwxr-xr-x
umount.nfs
114.68
KB
-rwsr-xr-x
umount.nfs4
114.68
KB
-rwsr-xr-x
unix_chkpwd
35.42
KB
-rwsr-xr-x
unix_update
35.42
KB
-rwx------
update-alternatives
27.61
KB
-rwxr-xr-x
update-smart-drivedb
14.34
KB
-rwxr-xr-x
useradd
134.39
KB
-rwxr-xr-x
userdel
93.5
KB
-rwxr-xr-x
usermod
130.33
KB
-rwxr-xr-x
usernetctl
11.03
KB
-rwsr-xr-x
uuserver
14.97
KB
-rwxr-xr-x
vigr
62.54
KB
-rwxr-xr-x
vipw
62.54
KB
-rwxr-xr-x
virt-what
11.57
KB
-rwxr-xr-x
visudo
200.91
KB
-rwxr-xr-x
vmcore-dmesg
19.28
KB
-rwxr-xr-x
vpddecode
15.33
KB
-rwxr-xr-x
weak-modules
31.9
KB
-rwxr-xr-x
whmapi0
3.02
MB
-rwxr-xr-x
whmapi1
3.02
MB
-rwxr-xr-x
whmlogin
2.33
KB
-rwxr-xr-x
wipefs
28.05
KB
-rwxr-xr-x
wpa_cli
128.06
KB
-rwxr-xr-x
wpa_passphrase
56.79
KB
-rwxr-xr-x
wpa_supplicant
1.93
MB
-rwxr-xr-x
xfs_admin
1.35
KB
-rwxr-xr-x
xfs_bmap
638
B
-rwxr-xr-x
xfs_copy
339.33
KB
-rwxr-xr-x
xfs_db
576.38
KB
-rwxr-xr-x
xfs_estimate
11.16
KB
-rwxr-xr-x
xfs_freeze
767
B
-rwxr-xr-x
xfs_fsr
31.83
KB
-rwxr-xr-x
xfs_growfs
327.2
KB
-rwxr-xr-x
xfs_info
472
B
-rwxr-xr-x
xfs_io
122.68
KB
-rwxr-xr-x
xfs_logprint
355.81
KB
-rwxr-xr-x
xfs_mdrestore
314.81
KB
-rwxr-xr-x
xfs_metadump
747
B
-rwxr-xr-x
xfs_mkfile
1007
B
-rwxr-xr-x
xfs_ncheck
650
B
-rwxr-xr-x
xfs_quota
84.88
KB
-rwxr-xr-x
xfs_repair
563.2
KB
-rwxr-xr-x
xfs_rtcp
15.25
KB
-rwxr-xr-x
xqmstats
14.03
KB
-rwxr-xr-x
xtables-multi
91.52
KB
-rwxr-xr-x
yum-complete-transaction
9.22
KB
-rwxr-xr-x
yumdb
8.67
KB
-rwxr-xr-x
zdump
14.02
KB
-rwxr-xr-x
zic
50.02
KB
-rwxr-xr-x
zramctl
82.23
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cbq
#!/bin/bash # # cbq.init v0.7.3 # Copyright (C) 1999 Pavel Golubev <pg@ksi-linux.com> # Copyright (C) 2001-2004 Lubomir Bulej <pallas@kadan.cz> # # chkconfig: 2345 11 89 # description: sets up CBQ-based traffic control # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. # # To get the latest version, check on Freshmeat for actual location: # # http://freshmeat.net/projects/cbq.init # # # VERSION HISTORY # --------------- # v0.7.3- Deepak Singhal <singhal at users.sourceforge.net> # - fix timecheck to not ignore regular TIME rules after # encountering a TIME rule that spans over midnight # - Nathan Shafer <nicodemus at users.sourceforge.net> # - allow symlinks to class files # - Seth J. Blank <antifreeze at users.sourceforge.net> # - replace hardcoded ip/tc location with variables # - Mark Davis <mark.davis at gmx.de> # - allow setting of PRIO_{MARK,RULE,REALM} in class file # - Fernando Sanch <toptnc at users.sourceforge.net> # - allow underscores in interface names # v0.7.2- Paulo Sedrez # - fix time2abs to allow hours with leading zero in TIME rules # - Svetlin Simeonov <zvero at yahoo.com> # - fix cbq_device_list to allow VLAN interfaces # - Mark Davis <mark.davis at gmx.de> # - ignore *~ backup files when looking for classes # - Mike Boyer <boyer at administrative.com> # - fix to allow arguments to be passed to "restart" command # v0.7.1- Lubomir Bulej <pallas at kadan.cz> # - default value for PERTURB # - fixed small bug in RULE parser to correctly parse rules with # identical source and destination fields # - faster initial scanning of DEVICE fields # v0.7 - Lubomir Bulej <pallas at kadan.cz> # - lots of various cleanups and reorganizations; the parsing is now # some 40% faster, but the class ID must be in range 0x0002-0xffff # (again). Because of the number of internal changes and the above # class ID restriction, I bumped the version to 0.7 to indicate # something might have got broken :) # - changed PRIO_{U32,FW,ROUTE} to PRIO_{RULE,MARK,REALM} # for consistency with filter keywords # - exposed "compile" command # - Catalin Petrescu <taz at dntis.ro> # - support for port masks in RULE (u32) filter # - Jordan Vrtanoski <obeliks at mt.net.mk> # - support for week days in TIME rules # v0.6.4- Lubomir Bulej <pallas at kadan.cz> # - added PRIO_* variables to allow easy control of filter priorities # - added caching to speed up CBQ start, the cache is invalidated # whenever any of the configuration files changes # - updated the readme section + some cosmetic fixes # v0.6.3- Lubomir Bulej <pallas at kadan.cz> # - removed setup of (unnecessary) class 1:1 - all classes # now use qdisc's default class 1:0 as their parent # - minor fix in the timecheck branch - classes # without leaf qdisc were not updated # - minor fix to avoid timecheck failure when run # at time with minutes equal to 08 or 09 # - respect CBQ_PATH setting in environment # - made PRIO=5 default, rendering it optional in configs # - added support for route filter, see notes about REALM keyword # - added support for fw filter, see notes about MARK keyword # - added filter display to "list" and "stats" commands # - readme section update + various cosmetic fixes # v0.6.2- Catalin Petrescu <taz at dntis.ro> # - added tunnels interface handling # v0.6.1- Pavel Golubev <pg at ksi-linux.com> # - added sch_prio module loading # (thanks johan at iglo.virtual.or.id for reminding) # - resolved errors resulting from stricter syntax checking in bash2 # - Lubomir Bulej <pallas at kadan.cz> # - various cosmetic fixes # v0.6 - Lubomir Bulej <pallas at kadan.cz> # - attempt to limit number of spawned processes by utilizing # more of sed power (use sed instead of grep+cut) # - simplified TIME parser, using bash builtins # - added initial support for SFQ as leaf qdisc # - reworked the documentation part a little # - incorporated pending patches and ideas submitted by # following people for versions 0.3 into version 0.6 # - Miguel Freitas <miguel at cetuc.puc-rio.br> # - in case of overlapping TIME parameters, the last match is taken # - Juanjo Ciarlante <jjo at mendoza.gov.ar> # - chkconfig tags, list + stats startup parameters # - optional tc & ip command logging (into /var/run/cbq-*) # - Rafal Maszkowski <rzm at icm.edu.pl> # - PEAK parameter for setting TBF's burst peak rate # - fix for many config files (use find instead of ls) # v0.5.1- Lubomir Bulej <pallas at kadan.cz> # - fixed little but serious bug in RULE parser # v0.5 - Lubomir Bulej <pallas at kadan.cz> # - added options PARENT, LEAF, ISOLATED and BOUNDED. This allows # (with some attention to config file ordering) for creating # hierarchical structures of shapers with classes able (or unable) # to borrow bandwidth from their parents. # - class ID check allows hexadecimal numbers # - rewritten & simplified RULE parser # - cosmetic changes to improve readability # - reorganization to avoid duplicate code (timecheck etc.) # - timecheck doesn't check classes without TIME fields anymore # v0.4 - Lubomir Bulej <pallas at kadan.cz> # - small bugfix in RULE parsing code # - simplified configuration parsing code # - several small cosmetic changes # - TIME parameter can be now specified more than once allowing you to # differentiate RATE throughout the whole day. Time overlapping is # not checked, first match is taken. Midnight wrap (eg. 20:00-6:00) # is allowed and taken care of. # v0.3a4- fixed small bug in IF operator. Thanks to # Rafal Maszkowski <rzm at icm.edu.pl> # v0.3a3- fixed grep bug when using more than 10 eth devices. Thanks to David # Trcka <trcka at poda.cz>. # v0.3a2- fixed bug in "if" operator. Thanks kad at dgtu.donetsk.ua. # v0.3a - added TIME parameter. Example: TIME=00:00-19:00;64Kbit/6Kbit # So, between 00:00 and 19:00 the RATE will be 64Kbit. # Just start "cbq.init timecheck" periodically from cron # (every 10 minutes for example). DON'T FORGET though, to run # "cbq.init start" for CBQ to initialize. # v0.2 - Some cosmetic changes. Now it is more compatible with old bash # version. Thanks to Stanislav V. Voronyi <stas at cnti.uanet.kharkov.ua>. # v0.1 - First public release # # # README # ------ # # First of all - this is just a SIMPLE EXAMPLE of CBQ power. # Don't ask me "why" and "how" :) # # This script is meant to simplify setup and management of relatively simple # CBQ-based traffic control on Linux. Access to advanced networking features # of Linux kernel is provided by "ip" and "tc" utilities from A. Kuznetsov's # iproute2 package, available at ftp://ftp.inr.ac.ru/ip-routing. Because the # utilities serve primarily to translate user wishes to RTNETLINK commands, # their interface is rather spartan, intolerant and requires quite a lot of # typing. And typing is what this script attempts to reduce :) # # The advanced networking stuff in Linux is pretty flexible and this script # aims to bring some of its features to the not-so-hard-core Linux users. Of # course, there is a tradeoff between simplicity and flexibility and you may # realize that the flexibility suffered too much for your needs -- time to # face "ip" and "tc" interface. # # To speed up the "start" command, simple caching was introduced in version # 0.6.4. The caching works so that the sequence of "tc" commands for given # configuration is stored in a file (/var/cache/cbq.init by default) which # is used next time the "start" command is run to avoid repeated parsing of # configuration files. This cache is invalidated whenever any of the CBQ # configuration files changes. If you want to run "cbq.init start" without # caching, run it as "cbq.init start nocache". If you want to force cache # invalidation, run it as "cbq.init start invalidate". Caching is disabled # if you have logging enabled (ie. CBQ_DEBUG is not empty). # # If you only want cqb.init to translate your configuration to "tc" commands, # use "compile" command which will output "tc" commands required to build # your configuration. Bear in mind that "compile" does not check if the "tc" # commands were successful - this is done (in certain places) only when the # "start nocache" command is used, which is also useful when creating the # configuration to check whether it is completely valid. # # All CBQ parameters are valid for Ethernet interfaces only, The script was # tested on various Linux kernel versions from series 2.1 to 2.4 and several # distributions with KSI Linux (Nostromo version) as the premier one. # # # HOW DOES IT WORK? # ----------------- # # Every traffic class must be described by a file in the $CBQ_PATH directory # (/etc/sysconfig/cbq by default) - one file per class. # # The config file names must obey mandatory format: cbq-<clsid>.<name> where # <clsid> is two-byte hexadecimal number in range <0002-FFFF> (which in fact # is a CBQ class ID) and <name> is the name of the class -- anything to help # you distinguish the configuration files. For small amount of classes it is # often possible (and convenient) to let <clsid> resemble bandwidth of the # class. # # Example of valid config name: # cbq-1280.My_first_shaper # # # The configuration file may contain the following parameters: # ### Device parameters # # DEVICE=<ifname>,<bandwidth>[,<weight>] mandatory # DEVICE=eth0,10Mbit,1Mbit # # <ifname> is the name of the interface you want to control # traffic on, e.g. eth0 # <bandwidth> is the physical bandwidth of the device, e.g. for # ethernet 10Mbit or 100Mbit, for arcnet 2Mbit # <weight> is tuning parameter that should be proportional to # <bandwidth>. As a rule of thumb: <weight> = <bandwidth> / 10 # # When you have more classes on one interface, it is enough to specify # <bandwidth> [and <weight>] only once, therefore in other files you only # need to set DEVICE=<ifname>. # ### Class parameters # # RATE=<speed> mandatory # RATE=5Mbit # # Bandwidth allocated to the class. Traffic going through the class is # shaped to conform to specified rate. You can use Kbit, Mbit or bps, # Kbps and Mbps as suffices. If you don't specify any unit, bits/sec # are used. Also note that "bps" means "bytes per second", not bits. # # WEIGHT=<speed> mandatory # WEIGHT=500Kbit # # Tuning parameter that should be proportional to RATE. As a rule # of thumb, use WEIGHT ~= RATE / 10. # # PRIO=<1-8> optional, default 5 # PRIO=5 # # Priority of class traffic. The higher the number, the lesser # the priority. Priority of 5 is just fine. # # PARENT=<clsid> optional, default not set # PARENT=1280 # # Specifies ID of the parent class to which you want this class be # attached. You might want to use LEAF=none for the parent class as # mentioned below. By using this parameter and carefully ordering the # configuration files, it is possible to create simple hierarchical # structures of CBQ classes. The ordering is important so that parent # classes are constructed prior to their children. # # LEAF=none|tbf|sfq optional, default "tbf" # # Tells the script to attach specified leaf queueing discipline to CBQ # class. By default, TBF is used. Note that attaching TBF to CBQ class # shapes the traffic to conform to TBF parameters and prevents the class # from borrowing bandwidth from its parent even if you have BOUNDED set # to "no". To allow the class to borrow bandwith (provided it is not # bounded), you must set LEAF to "none" or "sfq". # # If you want to ensure (approximately) fair sharing of bandwidth among # several hosts in the same class, you might want to specify LEAF=sfq to # attach SFQ as leaf queueing discipline to that class. # # BOUNDED=yes|no optional, default "yes" # # If set to "yes", the class is not allowed to borrow bandwidth from # its parent class in overlimit situation. If set to "no", the class # will be allowed to borrow bandwidth from its parent. # # Note: Don't forget to set LEAF to "none" or "sfq", otherwise the class will # have TBF attached to itself and will not be able to borrow unused # bandwith from its parent. # # ISOLATED=yes|no optional, default "no" # # If set to "yes", the class will not lend unused bandwidth to # its children. # ### TBF qdisc parameters # # BUFFER=<bytes>[/<bytes>] optional, default "10Kb/8" # # This parameter controls the depth of the token bucket. In other # words it represents the maximal burst size the class can send. # The optional part of parameter is used to determine the length # of intervals in packet sizes, for which the transmission times # are kept. # # LIMIT=<bytes> optional, default "15Kb" # # This parameter determines the maximal length of backlog. If # the queue contains more data than specified by LIMIT, the # newly arriving packets are dropped. The length of backlog # determines queue latency in case of congestion. # # PEAK=<speed> optional, default not set # # Maximal peak rate for short-term burst traffic. This allows you # to control the absolute peak rate the class can send at, because # single TBF that allows 256Kbit/s would of course allow rate of # 512Kbit for half a second or 1Mbit for a quarter of second. # # MTU=<bytes> optional, default "1500" # # Maximum number of bytes that can be sent at once over the # physical medium. This parameter is required when you specify # PEAK parameter. It defaults to MTU of ethernet - for other # media types you might want to change it. # # Note: Setting TBF as leaf qdisc will effectively prevent the class from # borrowing bandwidth from the ancestor class, because even if the # class allows more traffic to pass through, it is then shaped to # conform to TBF. # ### SFQ qdisc parameters # # The SFQ queueing discipline is a cheap way for sharing class bandwidth # among several hosts. As it is stochastic, the fairness is approximate but # it will do the job in most cases. If you want real fairness, you should # probably use WRR (weighted round robin) or WFQ queueing disciplines. Note # that SFQ does not do any traffic shaping - the shaping is done by the CBQ # class the SFQ is attached to. # # QUANTUM=<bytes> optional, default not set # # This parameter should not be set lower than link MTU, for ethernet # it is 1500b, or (with MAC header) 1514b which is the value used # in Alexey Kuznetsov's examples. # # PERTURB=<seconds> optional, default "10" # # Period of hash function perturbation. If unset, hash reconfiguration # will never take place which is what you probably don't want. The # default value of 10 seconds is probably a good one. # ### Filter parameters # # RULE=[[saddr[/prefix]][:port[/mask]],][daddr[/prefix]][:port[/mask]] # # These parameters make up "u32" filter rules that select traffic for # each of the classes. You can use multiple RULE fields per config. # # The optional port mask should only be used by advanced users who # understand how the u32 filter works. # # Some examples: # # RULE=10.1.1.0/24:80 # selects traffic going to port 80 in network 10.1.1.0 # # RULE=10.2.2.5 # selects traffic going to any port on single host 10.2.2.5 # # RULE=10.2.2.5:20/0xfffe # selects traffic going to ports 20 and 21 on host 10.2.2.5 # # RULE=:25,10.2.2.128/26:5000 # selects traffic going from anywhere on port 50 to # port 5000 in network 10.2.2.128 # # RULE=10.5.5.5:80, # selects traffic going from port 80 of single host 10.5.5.5 # # # # REALM=[srealm,][drealm] # # These parameters make up "route" filter rules that classify traffic # according to packet source/destination realms. For information about # realms, see Alexey Kuznetsov's IP Command Reference. This script # does not define any realms, it justs builds "tc filter" commands # for you if you need to classify traffic this way. # # Realm is either a decimal number or a string referencing entry in # /etc/iproute2/rt_realms (usually). # # Some examples: # # REALM=russia,internet # selects traffic going from realm "russia" to realm "internet" # # REALM=freenet, # selects traffic going from realm "freenet" # # REALM=10 # selects traffic going to realm 10 # # # # MARK=<mark> # # These parameters make up "fw" filter rules that select traffic for # each of the classes accoring to firewall "mark". Mark is a decimal # number packets are tagged with if firewall rules say so. You can # use multiple MARK fields per config. # # # Note: Rules for different filter types can be combined. Attention must be # paid to the priority of filter rules, which can be set below using # PRIO_{RULE,MARK,REALM} variables. # ### Time ranging parameters # # TIME=[<dow>,<dow>, ...,<dow>/]<from>-<till>;<rate>/<weight>[/<peak>] # TIME=0,1,2,5/18:00-06:00;256Kbit/25Kbit # TIME=60123/18:00-06:00;256Kbit/25Kbit # TIME=18:00-06:00;256Kbit/25Kbit # # This parameter allows you to differentiate the class bandwidth # throughout the day. You can specify multiple TIME parameters, if # the times overlap, last match is taken. The fields <rate>, <weight> # and <peak> correspond to parameters RATE, WEIGHT and PEAK (which # is optional and applies to TBF leaf qdisc only). # # You can also specify days of week when the TIME rule applies. <dow> # is numeric, 0 corresponds to sunday, 1 corresponds to monday, etc. # ### # # Sample configuration file: cbq-1280.My_first_shaper # # -------------------------------------------------------------------------- # DEVICE=eth0,10Mbit,1Mbit # RATE=128Kbit # WEIGHT=10Kbit # PRIO=5 # RULE=192.128.1.0/24 # -------------------------------------------------------------------------- # # The configuration says that we will control traffic on 10Mbit ethernet # device eth0 and the traffic going to network 192.168.1.0 will be # processed with priority 5 and shaped to rate of 128Kbit. # # Note that you can control outgoing traffic only. If you want to control # traffic in both directions, you must set up CBQ for both interfaces. # # Consider the following example: # # +---------+ 192.168.1.1 # BACKBONE -----eth0-| linux |-eth1------*-[client] # +---------+ # # Imagine you want to shape traffic from backbone to the client to 28Kbit # and traffic in the opposite direction to 128Kbit. You need to setup CBQ # on both eth0 and eth1 interfaces, thus you need two config files: # # cbq-028.backbone-client # -------------------------------------------------------------------------- # DEVICE=eth1,10Mbit,1Mbit # RATE=28Kbit # WEIGHT=2Kbit # PRIO=5 # RULE=192.168.1.1 # -------------------------------------------------------------------------- # # cbq-128.client-backbone # -------------------------------------------------------------------------- # DEVICE=eth0,10Mbit,1Mbit # RATE=128Kbit # WEIGHT=10Kbit # PRIO=5 # RULE=192.168.1.1, # -------------------------------------------------------------------------- # # Pay attention to comma "," in the RULE field - it denotes source address! # # Enjoy. # ############################################################################# export LC_ALL=C ### Command locations TC=/sbin/tc IP=/sbin/ip MP=/sbin/modprobe ### Default filter priorities (must be different) PRIO_RULE_DEFAULT=${PRIO_RULE:-100} PRIO_MARK_DEFAULT=${PRIO_MARK:-200} PRIO_REALM_DEFAULT=${PRIO_REALM:-300} ### Default CBQ_PATH & CBQ_CACHE settings CBQ_PATH=${CBQ_PATH:-/etc/sysconfig/cbq} CBQ_CACHE=${CBQ_CACHE:-/var/cache/cbq.init} ### Uncomment to enable logfile for debugging #CBQ_DEBUG="/var/run/cbq-$1" ### Modules to probe for. Uncomment the last CBQ_PROBE ### line if you have QoS support compiled into kernel CBQ_PROBE="sch_cbq sch_tbf sch_sfq sch_prio" CBQ_PROBE="$CBQ_PROBE cls_fw cls_u32 cls_route" #CBQ_PROBE="" ### Keywords required for qdisc & class configuration CBQ_WORDS="DEVICE|RATE|WEIGHT|PRIO|PARENT|LEAF|BOUNDED|ISOLATED" CBQ_WORDS="$CBQ_WORDS|PRIO_MARK|PRIO_RULE|PRIO_REALM|BUFFER" CBQ_WORDS="$CBQ_WORDS|LIMIT|PEAK|MTU|QUANTUM|PERTURB" ### Source AVPKT if it exists [ -r /etc/sysconfig/cbq/avpkt ] && . /etc/sysconfig/cbq/avpkt AVPKT=${AVPKT:-3000} ############################################################################# ############################# SUPPORT FUNCTIONS ############################# ############################################################################# ### Get list of network devices cbq_device_list () { ip link show| sed -n "/^[0-9]/ \ { s/^[0-9]\+: \([a-z0-9._]\+\)[:@].*/\1/; p; }" } # cbq_device_list ### Remove root class from device $1 cbq_device_off () { tc qdisc del dev $1 root 2> /dev/null } # cbq_device_off ### Remove CBQ from all devices cbq_off () { for dev in `cbq_device_list`; do cbq_device_off $dev done } # cbq_off ### Prefixed message cbq_message () { echo -e "**CBQ: $*" } # cbq_message ### Failure message cbq_failure () { cbq_message "$@" exit 1 } # cbq_failure ### Failure w/ cbq-off cbq_fail_off () { cbq_message "$@" cbq_off exit 1 } # cbq_fail_off ### Convert time to absolute value cbq_time2abs () { local min=${1##*:}; min=${min##0} local hrs=${1%%:*}; hrs=${hrs##0} echo $[hrs*60 + min] } # cbq_time2abs ### Display CBQ setup cbq_show () { for dev in `cbq_device_list`; do [ "`tc qdisc show dev $dev| wc -l`" -eq 0 ] && continue echo -e "### $dev: queueing disciplines\n" tc $1 qdisc show dev $dev; echo [ "`tc class show dev $dev| wc -l`" -eq 0 ] && continue echo -e "### $dev: traffic classes\n" tc $1 class show dev $dev; echo [ "`tc filter show dev $dev| wc -l`" -eq 0 ] && continue echo -e "### $dev: filtering rules\n" tc $1 filter show dev $dev; echo done } # cbq_show ### Check configuration and load DEVICES, DEVFIELDS and CLASSLIST from $1 cbq_init () { ### Get a list of configured classes CLASSLIST=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \ -not -name '*~' -printf "%f\n"| sort` [ -z "$CLASSLIST" ] && cbq_failure "no configuration files found in $1!" ### Gather all DEVICE fields from $1/cbq-* DEVFIELDS=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \ -not -name '*~' -print0 | xargs -0 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 ### Load class configuration from $1/$2 cbq_load_class () { CLASS=`echo $2| sed 's/^cbq-0*//; s/^\([0-9a-fA-F]\+\).*/\1/'` CFILE=`sed -n 's/#.*//; s/[[:space:]]//g; /^[[:alnum:]_]\+=[[:alnum:].,:;/*@-_]\+$/ p' $1/$2` ### Check class number IDVAL=`/usr/bin/printf "%d" 0x$CLASS 2> /dev/null` [ $? -ne 0 -o $IDVAL -lt 2 -o $IDVAL -gt 65535 ] && cbq_fail_off "class ID of $2 must be in range <0002-FFFF>!" ### Set defaults & load class RATE=""; WEIGHT=""; PARENT=""; PRIO=5 LEAF=tbf; BOUNDED=yes; ISOLATED=no BUFFER=10Kb/8; LIMIT=15Kb; MTU=1500 PEAK=""; PERTURB=10; QUANTUM="" PRIO_RULE=$PRIO_RULE_DEFAULT PRIO_MARK=$PRIO_MARK_DEFAULT PRIO_REALM=$PRIO_REALM_DEFAULT eval "`echo "$CFILE"| grep -E "^($CBQ_WORDS)="`" ### Require RATE/WEIGHT [ -z "$RATE" -o -z "$WEIGHT" ] && cbq_fail_off "missing RATE or WEIGHT in $2!" ### Class device DEVICE=${DEVICE%%,*} [ -z "$DEVICE" ] && cbq_fail_off "missing DEVICE field in $2!" BANDWIDTH=`echo "$DEVFIELDS"| sed -n "/^$DEVICE,/ \ { s/[^,]*,\([^,]*\).*/\1/; p; q; }"` ### Convert to "tc" options PEAK=${PEAK:+peakrate $PEAK} PERTURB=${PERTURB:+perturb $PERTURB} QUANTUM=${QUANTUM:+quantum $QUANTUM} [ "$BOUNDED" = "no" ] && BOUNDED="" || BOUNDED="bounded" [ "$ISOLATED" = "yes" ] && ISOLATED="isolated" || ISOLATED="" } # cbq_load_class ############################################################################# #################################### INIT ################################### ############################################################################# ### Check for presence of ip-route2 in usual place [ -x $TC -a -x $IP ] || cbq_failure "ip-route2 utilities not installed or executable!" ### ip/tc wrappers if [ "$1" = "compile" ]; then ### no module probing CBQ_PROBE="" ip () { $IP "$@" } # ip ### echo-only version of "tc" command tc () { echo "$TC $*" } # tc elif [ -n "$CBQ_DEBUG" ]; then echo -e "# `date`" > $CBQ_DEBUG ### Logging version of "ip" command ip () { echo -e "\n# ip $*" >> $CBQ_DEBUG $IP "$@" 2>&1 | tee -a $CBQ_DEBUG } # ip ### Logging version of "tc" command tc () { echo -e "\n# tc $*" >> $CBQ_DEBUG $TC "$@" 2>&1 | tee -a $CBQ_DEBUG } # tc else ### Default wrappers ip () { $IP "$@" } # ip tc () { $TC "$@" } # tc fi # ip/tc wrappers case "$1" in ############################################################################# ############################### START/COMPILE ############################### ############################################################################# start|compile) ### Probe QoS modules (start only) for module in $CBQ_PROBE; do $MP $module || cbq_failure "failed to load module $module" done ### If we are in compile/nocache/logging mode, don't bother with cache if [ "$1" != "compile" -a "$2" != "nocache" -a -z "$CBQ_DEBUG" ]; then VALID=1 ### validate the cache [ "$2" = "invalidate" -o ! -f $CBQ_CACHE ] && VALID=0 if [ $VALID -eq 1 ]; then [ "`find $CBQ_PATH -maxdepth 1 -newer $CBQ_CACHE| \ wc -l`" -gt 0 ] && VALID=0 fi ### compile the config if the cache is invalid if [ $VALID -ne 1 ]; then $0 compile > $CBQ_CACHE || cbq_fail_off "failed to compile CBQ configuration!" fi ### run the cached commands exec /bin/sh $CBQ_CACHE 2> /dev/null fi ### Load DEVICES, DEVFIELDS and CLASSLIST cbq_init $CBQ_PATH ### Setup root qdisc on all configured devices for dev in $DEVICES; do ### Retrieve device bandwidth and, optionally, weight DEVTEMP=`echo "$DEVFIELDS"| sed -n "/^$dev,/ { s/$dev,//; p; q; }"` DEVBWDT=${DEVTEMP%%,*}; DEVWGHT=${DEVTEMP##*,} [ "$DEVBWDT" = "$DEVWGHT" ] && DEVWGHT="" ### Device bandwidth is required if [ -z "$DEVBWDT" ]; then cbq_message "could not determine bandwidth for device $dev!" cbq_failure "please set up the DEVICE fields properly!" fi ### Check if the device is there ip link show $dev &> /dev/null || cbq_fail_off "device $dev not found!" ### Remove old root qdisc from device cbq_device_off $dev ### Setup root qdisc + class for device tc qdisc add dev $dev root handle 1 cbq \ bandwidth $DEVBWDT avpkt $AVPKT cell 8 ### Set weight of the root class if set [ -n "$DEVWGHT" ] && tc class change dev $dev root cbq weight $DEVWGHT allot 1514 [ "$1" = "compile" ] && echo done # dev ### Setup traffic classes for classfile in $CLASSLIST; do cbq_load_class $CBQ_PATH $classfile ### Create the class tc class add dev $DEVICE parent 1:$PARENT classid 1:$CLASS cbq \ bandwidth $BANDWIDTH rate $RATE weight $WEIGHT prio $PRIO \ allot 1514 cell 8 maxburst 20 avpkt $AVPKT $BOUNDED $ISOLATED || cbq_fail_off "failed to add class $CLASS with parent $PARENT on $DEVICE!" ### Create leaf qdisc if set if [ "$LEAF" = "tbf" ]; then tc qdisc add dev $DEVICE parent 1:$CLASS handle $CLASS tbf \ rate $RATE buffer $BUFFER limit $LIMIT mtu $MTU $PEAK elif [ "$LEAF" = "sfq" ]; then tc qdisc add dev $DEVICE parent 1:$CLASS handle $CLASS sfq \ $PERTURB $QUANTUM fi ### Create fw filter for MARK fields for mark in `echo "$CFILE"| sed -n '/^MARK/ { s/.*=//; p; }'`; do ### Attach fw filter to root class tc filter add dev $DEVICE parent 1:0 protocol ip \ prio $PRIO_MARK handle $mark fw classid 1:$CLASS done ### mark ### Create route filter for REALM fields for realm in `echo "$CFILE"| sed -n '/^REALM/ { s/.*=//; p; }'`; do ### Split realm into source & destination realms SREALM=${realm%%,*}; DREALM=${realm##*,} [ "$SREALM" = "$DREALM" ] && SREALM="" ### Convert asterisks to empty strings SREALM=${SREALM#\*}; DREALM=${DREALM#\*} ### Attach route filter to the root class tc filter add dev $DEVICE parent 1:0 protocol ip \ prio $PRIO_REALM route ${SREALM:+from $SREALM} \ ${DREALM:+to $DREALM} classid 1:$CLASS done ### realm ### Create u32 filter for RULE fields for rule in `echo "$CFILE"| sed -n '/^RULE/ { s/.*=//; p; }'`; do ### Split rule into source & destination SRC=${rule%%,*}; DST=${rule##*,} [ "$SRC" = "$rule" ] && SRC="" ### Split destination into address, port & mask fields DADDR=${DST%%:*}; DTEMP=${DST##*:} [ "$DADDR" = "$DST" ] && DTEMP="" DPORT=${DTEMP%%/*}; DMASK=${DTEMP##*/} [ "$DPORT" = "$DTEMP" ] && DMASK="0xffff" ### Split up source (if specified) SADDR=""; SPORT="" if [ -n "$SRC" ]; then SADDR=${SRC%%:*}; STEMP=${SRC##*:} [ "$SADDR" = "$SRC" ] && STEMP="" SPORT=${STEMP%%/*}; SMASK=${STEMP##*/} [ "$SPORT" = "$STEMP" ] && SMASK="0xffff" fi ### Convert asterisks to empty strings SADDR=${SADDR#\*}; DADDR=${DADDR#\*} ### Compose u32 filter rules u32_s="${SPORT:+match ip sport $SPORT $SMASK}" u32_s="${SADDR:+match ip src $SADDR} $u32_s" u32_d="${DPORT:+match ip dport $DPORT $DMASK}" u32_d="${DADDR:+match ip dst $DADDR} $u32_d" ### Uncomment the following if you want to see parsed rules #echo "$rule: $u32_s $u32_d" ### Attach u32 filter to the appropriate class tc filter add dev $DEVICE parent 1:0 protocol ip \ prio $PRIO_RULE u32 $u32_s $u32_d classid 1:$CLASS done ### rule [ "$1" = "compile" ] && echo done ### classfile ;; ############################################################################# ################################# TIME CHECK ################################ ############################################################################# timecheck) ### Get time + weekday TIME_TMP=`date +%w/%k:%M` TIME_DOW=${TIME_TMP%%/*} TIME_NOW=${TIME_TMP##*/} ### Load DEVICES, DEVFIELDS and CLASSLIST cbq_init $CBQ_PATH ### Run through all classes for classfile in $CLASSLIST; do ### Gather all TIME rules from class config TIMESET=`sed -n 's/#.*//; s/[[:space:]]//g; /^TIME/ { s/.*=//; p; }' \ $CBQ_PATH/$classfile` [ -z "$TIMESET" ] && continue MATCH=0; CHANGE=0 for timerule in $TIMESET; do TIME_ABS=`cbq_time2abs $TIME_NOW` ### Split TIME rule to pieces TIMESPEC=${timerule%%;*}; PARAMS=${timerule##*;} WEEKDAYS=${TIMESPEC%%/*}; INTERVAL=${TIMESPEC##*/} BEG_TIME=${INTERVAL%%-*}; END_TIME=${INTERVAL##*-} ### Check the day-of-week (if present) [ "$WEEKDAYS" != "$INTERVAL" -a \ -n "${WEEKDAYS##*$TIME_DOW*}" ] && continue ### Compute interval boundaries BEG_ABS=`cbq_time2abs $BEG_TIME` END_ABS=`cbq_time2abs $END_TIME` ### Midnight wrap fixup if [ $BEG_ABS -gt $END_ABS ]; then [ $TIME_ABS -le $END_ABS ] && TIME_ABS=$[TIME_ABS + 24*60] END_ABS=$[END_ABS + 24*60] fi ### If the time matches, remember params and set MATCH flag if [ $TIME_ABS -ge $BEG_ABS -a $TIME_ABS -lt $END_ABS ]; then TMP_RATE=${PARAMS%%/*}; PARAMS=${PARAMS#*/} TMP_WGHT=${PARAMS%%/*}; TMP_PEAK=${PARAMS##*/} [ "$TMP_PEAK" = "$TMP_WGHT" ] && TMP_PEAK="" TMP_PEAK=${TMP_PEAK:+peakrate $TMP_PEAK} MATCH=1 fi done ### timerule cbq_load_class $CBQ_PATH $classfile ### Get current RATE of CBQ class RATE_NOW=`tc class show dev $DEVICE| sed -n \ "/cbq 1:$CLASS / { s/.*rate //; s/ .*//; p; q; }"` [ -z "$RATE_NOW" ] && continue ### Time interval matched if [ $MATCH -ne 0 ]; then ### Check if there is any change in class RATE if [ "$RATE_NOW" != "$TMP_RATE" ]; then NEW_RATE="$TMP_RATE" NEW_WGHT="$TMP_WGHT" NEW_PEAK="$TMP_PEAK" CHANGE=1 fi ### Match not found, reset to default RATE if necessary elif [ "$RATE_NOW" != "$RATE" ]; then NEW_WGHT="$WEIGHT" NEW_RATE="$RATE" NEW_PEAK="$PEAK" CHANGE=1 fi ### If there are no changes, go for next class [ $CHANGE -eq 0 ] && continue ### Replace CBQ class tc class replace dev $DEVICE classid 1:$CLASS cbq \ bandwidth $BANDWIDTH rate $NEW_RATE weight $NEW_WGHT prio $PRIO \ allot 1514 cell 8 maxburst 20 avpkt $AVPKT $BOUNDED $ISOLATED ### Replace leaf qdisc (if any) if [ "$LEAF" = "tbf" ]; then tc qdisc replace dev $DEVICE handle $CLASS tbf \ rate $NEW_RATE buffer $BUFFER limit $LIMIT mtu $MTU $NEW_PEAK fi cbq_message "$TIME_NOW: class $CLASS on $DEVICE changed rate ($RATE_NOW -> $NEW_RATE)" done ### class file ;; ############################################################################# ################################## THE REST ################################# ############################################################################# stop) cbq_off ;; list) cbq_show ;; stats) cbq_show -s ;; restart) shift $0 stop $0 start "$@" ;; *) echo "Usage: `basename $0` {start|compile|stop|restart|timecheck|list|stats}" esac
Close