Search

Trickle: A lightweight userspace bandwidth shaper

May 30th, 2007 edited by ana

Article submitted by Ferry Boender. We are running out of articles ! Please help DPOTD and submit good articles about software you like NOW !

Sometimes, you’ll want to download something but you don’t want it to completely saturate your Internet connection. Perhaps you’re already downloading something more important, or you simply don’t want to get in the way of other people that are sharing the same Internet connection. Some programs, such as gFTP, wget and bittorrent, offer built-in up/download rate limiting. Other programs, such as apt-get and associates, don’t. Enter Trickle.

Trickle is a user space bandwidth shaper. It allows you to limit the bandwidth consumption of a program without requiring all kinds of kernel patches, firewall configurations or root access to the machine on which you wish to use it. Trickle can run in collaborative and stand alone mode. In collaborative mode, trickle can limit the bandwidth used by a bunch of programs at the same time. In stand alone mode, trickle simply limits the program you specify.

Stand alone mode

Trickle is easiest to use in stand-alone mode. Simply run trickle with a download and/or upload limit and a program you want to limit. For example:

[todsah@jib]~$ trickle -d 20 -u 20 wget http://www.electricmonk.nl/bigfile
trickle: Could not reach trickled, working independently: No such file or directory
–12:19:18–  http://www.electricmonk.nl/bigfile
           => `bigfile’
Resolving www.electricmonk.nl… 194.187.77.6
Connecting to www.electricmonk.nl|194.187.77.6|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 51,200,000 (49M) [text/plain]

 0% [                                     ] 180,224       21.83K/s    ETA 38:03

In the example above we use wget for demonstrative purposes, even though it has built-in bandwidth shaping. As you can see, the download rate is 21.83K/s. Of course, this is not exactly 20 K/s, but the download rate will vary between 19 and 21 K/s giving an average of 20 K/s. You can use the -w and -t command-line options to fine-tune this behaviour. The longer trickle runs, the closer it will get to 20 K/s. For more information, check out the manual page.

Daemon mode

In daemon mode, trickle can limit a group of programs to a fixed limit of bandwidth. To start the daemon, run the trickled command:

[todsah@jib]~$ trickled -d 20 -u 20

This will start the trickle daemon that will limit the total bandwidth available to all programs run via trickle to 20 K/s both up and down. So if you run a single program via trickle, it can consume 20 K/s. Two programs can each consume 10 K/s, etc. As an example, we start three wget sessions:

[todsah@jib]~/temp$ trickle wget http://www.electricmonk.nl/bigfile
 1% [                                     ] 933,888        6.66K/s  ETA 1:47:17
[todsah@jib]~/download$ trickle wget http://www.electricmonk.nl/bigfile
 1% [                                     ] 720,896        6.65K/s  ETA 1:56:59
[todsah@jib]~$ trickle wget http://www.electricmonk.nl/bigfile
 2% [                                     ] 1,228,800      6.64K/s  ETA 1:45:00

The download rate is limited to about 6.6 K/s per session, making a total of 19.8 K/s. As is usually the case with bandwidth shapers, it may take a couple of seconds before all sessions are correctly limited. This is because of the algorithm used by shapers to determine how much they should delay the sending and receiving of traffic.

Availability

Trickle has been available in Debian at least since v3.1 (’Sarge’) and in Ubuntu since Warty. apt-get install trickle should do the trick.

Notes

  • Trickle doesn’t work with setuid programs. The reason for this is that setuid programs ignore the LD_PRELOAD functionality for security reasons. Trickle requires this functionality to do its shaping. (It also doesn’t work with statically linked programs for the same reason.)
  • Trickle only works with programs that use the socket(2) interface for transmitting and receiving data. Also, it only works with TCP connections, not with UDP connections.

Posted in Debian, Ubuntu | 17 Comments »

Konversation, A simple irc client with a few surprising features.

May 27th, 2007 edited by ana

Article submitted by Kyle Hamar. We are running out of articles ! Please help DPOTD and submit good articles about software you like NOW !

A sense of community remains a powerful feature of Linux. Few tools reveal the power of open source, and none more clearly link this community better than IRC clients. Dozens of clients exist, from the small and powerful (irssi) to the complex (centericq). I prefer a lightweight gui: Konversation.

Think of IRC as an open window to hundreds of open source projects, where developers often respond to questions from users on every imaginable subject. Freenode, a service of the Peer-Directed Projects Center supports many popular interest areas.

Konversation

Usage

I recommend the use of freenode, a service of Peer-Directed Projects Center. Freenode host a very comprehensive list of groups related to most major peer directed and open source projects, like Apache or KDE. If you are new to IRC it would be wise to review the general questions and user registration requirements in the faq. Other projects, for example Debian, uses the OFTC network.

Konversation Screenshot

This screenshot of the #debian channel includes someone searching for help with a Perl module, others are asking about Apache. These community supported areas are only a few keystrokes away using Konversation.

Konversation boasts a simple tab-based interface, interrupted only by a few programmable buttons on-screen. These buttons may be modified to provide one-click application of numerous commands. The usual IRC display options are available; including font selection, colors, and various display options. The themed nicklist offers several different options for display of nick information.

configure

Minimize Konversation and it will pop up a small on-screen display activated by a keyword or your nick after you enable the option. The feature works very well, and you can add sounds to notifications also.

on-screen display

One nice feature is the ability to execute commands from within the chat window and return the output for everyone to see:

command execution

Konversation also integrates with Kaddressbook. This allows for whois information to display the users real name.
The point of Konversation seems to be a simple interface with a few nice features. It does not offer the extensive internal scripting support of other clients. In fact, I would say the lack of kitchen-sink bells and whistles is a feature and not a detraction. Konversation can /exec any script you wish (Bash, Perl, or etc.) and provides a DCOP port to return information to the channel. The ability to post the outcome of arbitrary commands to a chat window (how else should you say look at this error!) and the on-screen display while minimized are important features.

Most users probably do not need the bot-like features of this simple client but they are easy to use if you need them. I first tried Konversation on the recommendation of a friend while struggling with a small bug with another client. I’ve not gone back since!

Links

Posted in Debian, Ubuntu | 6 Comments »

UltraStar NG: karaoke game that allows user supplied songs

May 23rd, 2007 edited by ana

Article submitted by Miriam Ruiz. We are running out of articles ! Please help DPOTD and submit good articles about software you like !

Karaoke (カラオケ, 空 kara, “empty” or “void”, and オーケストラ ōkesutora, “orchestra”) is, according to the Wikipedia, a form of entertainment in which an amateur singer or singers sing along with recorded music on microphone. In a typical karaoke game, the system plays the music and displays the corresponding lyrics on the screen, sometimes also showing a video as well, while the singer or singers sing along. Sony went one step further with their game SingStar, for PS2: you not only had to sing the song, but you also had to sing it properly. The game came along with a couple of USB microphones, and the game decided how well you were singing the song.

Then came UltraStar, a Free Software (GPL’ed) SingStar clone in which you could add your own songs in the forms of mp3s along with a text file, as well as pictures and videos. In UltraStar, the original song is being played, and the lyrics shown, while the wannabe singer tries to do their best with the microphone. A gray bar shows the length and pitch of the original song, and the player’s own voice is displayed with a blue bar, which shows whether the song has been sung correctly or not. The better the performance, the more points you get. In the end, you might turn to be an amateur, or a lead singer. Unfortunately, UltraStar was programmed in Kylix/Delphi, and only available for the popular proprietary operating system you’re thinking about. The good thing about UltraStar is that there are lots of people making songs for it, so you might be able to find your favourite ones all along the Internet, in some web pages devoted to the program, in peer to peer network systems, etc. It’s quite easy to make your own songs for UltraStar, or converting them from SingStar format.

UltraStar-NG is the remake of UltraStar that works under GNU/Linux. It is coded in C++, and, for the technical part, it uses alsa for audio acquisition, fftw3 for getting the notes sung by the player, SDL for the visualisation and keyboard input, xine or gstreamer to play the music and librsvg or cairo to display the themes (which are vectorial images). The goal of the game, as you might have guessed, is to get the maximum of points while singing the songs of your choice.

UltraStar intro screen

UltraStar intro screen, you have more screenshots here.

It’s been a long way, but finally we’re able to play UltraStar-NG in our Debian machines. Have fun, and don’t forget that, if the game says you’re singing out of tune, that might not be a bug in the program but in the singer ;)

Posted in Debian, Ubuntu | 17 Comments »

Problems with DPotD

May 21st, 2007 edited by Tincho

This post is to inform our readers that we had a problem with an upgrade that we are working to solve. Something went wrong when updating wordpress and the pictures and our theme are gone. Also, permalinks aren’t working.

Thanks for your patience. The DPotD team.

Posted in Debian, Ubuntu | 2 Comments »

Mirage: simple and fast image viewer

May 20th, 2007 edited by lucas

Article submitted by Lucas Nussbaum, based on an article published on Linux Weekly News (with the permission of LWN’s Jonathan Corbet). We are running out of articles ! Please help DPOTD and submit good articles about software you like !

Mirage is a relatively new image viewing application which has been designed with speed in mind. It uses GTK+.

The project was started in March, 2006 according to the CHANGELOG file. Mirage has undergone rapid development since then, with fifteen releases so far.

It has all the features one will expect from a good xv or gthumb alternative:

  • Supported image formats include png, jpg, svg, xpm, gif, bmp, tiff, and others.
  • Has the ability to cycle through large collections of images.
  • Images can be dynamically resized, full-screen and best fit modes are available.
  • A built-in slide show viewer is included.
  • Has a random image viewing function.
  • A user-selectable status bar shows basic image metadata.
  • An image properties pulldown shows more detailed image metadata.
  • Images can be rotated, zoomed, cropped, resized and flipped.
  • Panning through zoomed-in images can be performed with the mouse.
  • Many of the program’s options are user-configurable.
  • A number of command-line switches are available.
  • A number of shortcuts are bound to various key combinations.

The online documentation explains the application in more detail.

However, Mirage still miss some of xv’s features:

  • A grab function for turning windows into images.
  • The ability to convert and save images to another format.
  • A full-featured color editor window, especially the R/G/B/mono linearity adjustments.
  • The lack of a spinning clock as an indication of ongoing image processing.
  • Cropping via mouse clicks in the main window.

Some of these missing functions, such as image grab and convert, can be handled by external commands. Perhaps that is in line with the Mirage lightweight design philosophy, but the omissions come at the cost of user inconvenience.

Mirage is available in Debian Testing and Unstable, and in Ubuntu since Feisty. It is relatively bug-free and actively developed.

It has a nice look and feel, and performs very well for the basic job of viewing large collections of images.

Screenshots are available on Mirage homepage.

Posted in Debian, Ubuntu | 2 Comments »

« Previous Entries