Gnut Manual: Basic Usage

Next Previous Contents



3. Basic Usage


3.1 Building Gnut

If you are not using one of the available precompile versions, you need to build Gnut from the source code. Gnut uses a standard Gnu automake/autoconf build system. First untar your distribution, cd into the directory, then do the standard:

./configure make

This will build gnut and put it in "src/gnut". If you have permission to install it into your default installation path (like /usr/local/bin), you can do this third step:

make install


3.2 Starting Gnut

If it's your first time, you'll need a .gnut_hosts file. Try going to http://gnutella.wego.com/, http://gnutelliums.com/ or http://www.gnutella.co.uk/servers/ and look in the "downloads" or "files" area for a GNUTELLA.txt or GNUTELLA.net file. Save this file as ~/.gnut_hosts.

If you can't find the file, you can start gnut without a .gnut_hosts file, and connect to one of the "host servers" like gnutellahosts.com:6346, router.limewire.com:6346 or gnet1.ath.cx:6346. You can find these on the same Gnutella web sites just mentioned above.

Launch gnut:

bash$ gnut num_columns=78 num_rows=34
Local IP: 10.23.45.67
gnut version 0.4.16 at your service Bound to port: 5635
gnut>

then connect to a host server:

gnut> open open gnet1.ath.cx:6346
gnut> update

then type info h to make sure there are some hosts:

gnut> info h HOST STATS: Hosts: 19 Files: 0 Size: 0

If it says "Hosts: 0", you should try the open and update commands again, or possibly try opening a different server.

If you just type info rather than info h you will get more information:

gnut> info HOST STATS: Hosts: 19 Files: 2.72K Size: 9.145G NET STATS: Msg Received: 20 Msg Sent: 1
 Bytes Rcvd: 740 Bytes Sent: 23
QUERY STATS: Queries: 0 Responses Sent: 0
SHARE STATS: Num Shared: 0 Size Shared: 0
CONNECTION STATS:
-----------------
1)198.109.221.88:6346 Packs: 0:0 0:0 Bytes: 0:0
TID: 7171 Type: OUT State: CONN Rate: 0:0 /sec

HOST_STATS

Shows information about the gnutellaNet (or rather, the parts of the gnutellaNet that are known to you).

NET_STATS

Shows info about the infomration you send and receive over the gnutellaNet.

SHARE_STATS

Self-explanitory.

CONNECTION_STATS

Reveals the hosts you are currently connected to, whether these connections are incoming or outgoing and at what speed they run at.


3.3 Sharing

If you're running a gnutella program, it's probably because you want to help share some files with your fellow neighbor. Sharing files is easy in gnut, all you have to do is either put them all in one directory, or make the appropriate symlinks (if on a Unix platform). Then you use the share and scan commands to share your files.

gnut> share /home/mp3:/home/movies gnut> scan Scanned 386 files and 3649352 Kbytes.
gnut>

And now all your hot files can be downloaded by anyone around the world.


3.4 Searching

Searching is just as easy as sharing was. In gnut, you use the find command. It takes one argument, which is the search keyword you are looking for. It waits for you to press a key as search results come in. The results don't stop coming in when you press the key, you just lose feedback of it.

gnut> find grateful dead Searching the gnutella network for: grateful dead Press any key to continue
63 results received.

At any time you want, hit a key to end the search. You are then presented with a sorted list of the files which matched your query.

1)Grateful Dead - Knockin' on Heaven's Door - Live Version.mp3
 24.11.42.228:6346 size:11.865M ref: 62 speed: 500
2)Grateful Dead - Touch of Gray (live) 9-27-72.mp3
 24.11.42.228:6346 size:10.977M ref: 61 speed: 500
etc...
---more---


3.5 Downloading

Let's say that you really wanted the "Touch of Gray" track. What you would first do is hit q to stop displaying results, then you would use the get command to grab the file, then the info t or info d command to display the results of the ongoing transfer.

gnut> get 2
gnut> 
Download of Grateful Dead - Touch of Gray (live) 9-27-72.mp3 started.

(NOTE: The file is given the extension ".gnut" until it has been completely downloaded. This way you can easily recognize incomplete files.)

gnut> info t TRANSFER_STATS:
---------------
1) 139.142.84.183:6346 2.3% 3.41K/39.054M 3.41K/sec ETA 2h10h34m 
TID: 15369 IN State: UP Name: Grateful Dead - Touch of Gray (live) 9-27-72.mp3
TOTALS: Rate 0:3.41K /sec gnut> 
Download of Grateful Dead - Touch of Gray (live) 9-27-72.mp3 succeeded.

And now you have the classic bootleg track in your current working directory. Crazy huh?

Downloads automatically retry. When you type info t you will sometimes see a transfer is in State: CONN or State: RETRY. That means the server is busy and gnut is trying to connect, or waiting a few seconds to retry the connection. There are a lot of options to control how often it retries, sending PUSH requests and other things relating to handling busy server problems. Check the next chapter for a complete description of the options.


3.5 Monitoring

gnut provides you with three ways to monitor what others are doing on the network: monitor, mreply, and mpush. Each serves a different purpose:

If you want to know Use this command
What words people are searching for monitor
What files exist on the network mreply
What files exist on the network that are being requested for download mpush

If you are used to the "search monitor" on other Gnutella clients, you can get the same thing with the monitor command.

The mreply command is intended for those who want to know what's out there, but don't know what it might be called:

monitor will tell you what people are searching for

mreply will tell you what they actually find

Similarly, mpush is intended for those who want to know what's "hot" -- what files are people actually downloading from the network. There might be 1000 Grateful Dead songs on the network, but probably only a small fraction of those are actually in demand.

All three commands take arguments, which are used to limit what is printed out. Note that mpush won't show much because PUSH requests are actually rather rare -- mainly because they are usually routed directly to the server being requested.


Next Previous Contents


These gnut pages are hosted by gnutelliums.com

Back to main gnut page