Networking Forums

Networking Forums > Computer Networking > Linux Networking > a 'nice' for networks?

Reply
Thread Tools Display Modes

a 'nice' for networks?

 
 
thumb_42@yahoo.com
Guest
Posts: n/a

 
      02-11-2004, 03:28 AM
Is there a utility in existance that allows one to 'renice' a connection
or, better yet all connections a given process is using?

Something like:

nrenice 10 1251

the nrenice would then tell the kernel to slow down the connections used by
process ID 1251 by a 10 level. (with 0 being normal -19 being "hog
everything" etc.. just like the nice command does)

Just curious if anyone has heard of such a thing. I don't actually need it
for anything, it'd be, ah, well 'nice' :-)

Jamie
 
Reply With Quote
 
 
 
 
Cameron Kerr
Guest
Posts: n/a

 
      02-11-2004, 07:13 AM
(E-Mail Removed) wrote:
> Is there a utility in existance that allows one to 'renice' a connection
> or, better yet all connections a given process is using?
>
> Something like:
>
> nrenice 10 1251


Unfortunately, no, though it would be possible to do this in a couple of
ways.

1) Using LD_PRELOAD wrapper for the recv/send and read/write system
calls, you could control bandwidth by waiting a bit after processing the
request. This is a bit of a rude hack, and you'd need to be careful of
deferentiating between network sockets and files. Also, it would have to
be run as a wrapper program, you couldn't _re_nice something, only
_nice_ it.

2) Using strace(2) system call, you may be able to tie into the
firewalling code of the kernel to insert rules to match on process ID,
and some traffic control. That would be very advanced, Linux specific,
and require root priviledge (or at least some capabilities that would
have be granted by root).

> the nrenice would then tell the kernel to slow down the connections used by
> process ID 1251 by a 10 level. (with 0 being normal -19 being "hog
> everything" etc.. just like the nice command does)
>
> Just curious if anyone has heard of such a thing. I don't actually need it
> for anything, it'd be, ah, well 'nice' :-)


I know the feeling. You may be interested in WonderShaper.

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
Jonathan A.
Guest
Posts: n/a

 
      02-12-2004, 01:04 AM
On Wed, 11 Feb 2004 04:28:22 GMT, (E-Mail Removed)
<(E-Mail Removed)> appears to have said:

> Is there a utility in existance that allows one to 'renice' a connection
> or, better yet all connections a given process is using?


> Something like:
>
> nrenice 10 1251


Don't know about doing it by PID, but I use the "limit.conn" script
(requires iproute2/tc). It's at:

<http://www.chronox.de/>

It allows you to "renice" host/port combinations at least.

There's also tcpnice, which is part of dsniff... I can't get it to
work on my DSL connection, but it looks good.

<http://www.monkey.org/~dugsong/dsniff/>

Or, for one shot "per application" throttling...

<http://www.monkey.org/~marius/trickle/>

HTH,
Jonathan

--
Don't just hit reply. Email address is broken. Thank
your friendly neighborhood spammer. Email replies to:
user: jnthn1 domain: earthlink<dot>net
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nice one Jess Broadband 1 12-08-2009 01:21 PM
Hello everybody,nice to meet you! joyceboya Wireless Internet 0 06-13-2007 01:04 AM
Nice one Plusnet Sean Broadband 50 08-20-2005 03:53 PM
Nice Site Shaun Doppler Wireless Internet 0 09-21-2003 06:09 PM



1 2 3 4 5 6 7 8 9 10 11