| About |
|
Welcome to the simplified NoIdea.US home. You may have ended up here from a search link; if so, almost everything important is still on the site. You may have to search for it, though!
|
|
|
| Linux traffic shaping in Fedora Core 4 |
 |
Friday 24 August 2007 7:46pm by: rac
|
permalink | 0 comments
Computers
|
 |
Before I switched to the new mail server, I was running CBQ.init to do some limiting of outbound SMTP traffic. You see, I run a mailing list that has multiple large attachments that are resent to 50+ subscribers, and trying to send that out effectively kills my DSL line.
When I set up the new server, I set up CBQ.init 0.7.3 using the same configuration as on the old (Fedora Core 1) machine. Today, I found out that my limiting was not working...seems that there is an error in the CBQ.init script that prevented it from running correctly. The error manifests as follows:
[root@server rc.d]# ./cbq.init 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.
The error is actually a mistake in the find command syntax of two lines in the script.
Here is the corrected script (those are line numbers in front).
577 ### Get a list of configured classes
578 CLASSLIST=`find $1 -maxdepth 1 \( -type f -or -type l\ ) -name 'cbq-*' \
579 -not -name '*~' -printf "%f\n"| sort`
580 [ -z "$CLASSLIST" ] &&
581 cbq_failure "no configuration files found in $1!"
582
583 ### Gather all DEVICE fields from $1/cbq-*
584 DEVFIELDS=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \
585 -not -name '*~'| xargs sed -n 's/#.*//;
586 s/[[:space:]]//g; /^DEVICE=[^,]*,[^,]*(,[^,]*)?/ \
587 { s/.*=//; p; }'| sort -u`
The change is the location of the -maxdepth 1 argument: it must be immediately after the last path in the statement, and before any other options. The original looked like this:
### 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_failure "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`
After making this change, the script works as expected! I'm posting this on the off-chance that someone else might be having the same issue I did, and this will help them, too.
Oh, and if anyone is interested, here is my script to limit SMTP outbound traffic on my 3Mbit/768Kbit DSL line. It's called cbq-0256.SMTP-out:
DEVICE=eth1,3Mbit,384Kbit
RATE=256Kbit
WEIGHT=25Kbit
RULE=,:25
Good luck!
|
|
| Abandoned? No, just ignored.... |
 |
Wednesday 22 August 2007 0:19am by: rac
|
permalink | 0 comments
Site Info, General News, Computers
|
 |
Anyone who has looked here in the last few months (OK, last 8 months...) would think I've abandoned the place. Not quite true...noidea.us is still my primary email domain, and I've thought about a lot of things I'd write about, if the time presented itself. Well, the time still hasn't made itself available (funny,the way that works), but I figured I should at least note that I'm still alive, still working, still researching malware, and learning how to be a dad. I guess running blogs on three different sites can be a bit...well...absurd?
On the plus side, I have managed to finally upgrade my mail server....it's a major hardware shift from a PII-400 to a Sempron 2800+, and 384MB to 1GB of RAM. I can now run all those wonderful spam filters that I just didn't have the resources to handle before. It also went from Fedora Core 1 to Fedora Core 4. The old server was actually just a test box I was using to play with Postfix, Amavisd-new and Dovecot; it got pressed into live service after resetting all the hardware after hurricane Rita a couple of years ago when the Shuttle SV-24 died (of a notorious blown caps issue). I was unable to keep much of the filtering running because of the RAM requirements, and thus was making do with only Postfix's RBL checks and Policyd greylisting service. Now it's all running, and I'm much happier with the systems....
Final note, I'm now also an admin/developer for PluggedOut Blog, the blog script that runs this site. If you're looking for an easily customizable, flexible, feature-rich blog script in PHP, check it out!
|
|
|
| Calendar |
|
|
| M | T | W | T | F | S | S |
| | | 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 | 31 | | |
|
|
|