Presenting... Afghan Hound in Hypertext - a total waste of bandwidth production.
Home I

Client man page.

Home II
Games Quake Wibble Computers Home I Home II

man fortune-tcp:

Go back to the AQOTDD home page.

fortune-tcp, fortune-udp, tcpbench, udpbench - print the response from, and test, an rfc865 server.

SYNOPSIS

fortune-tcp [-hvlw] [-s server ] [ -p port ] [ -t maxtime]

fortune-udp [-hvlw] [-s server ] [ -p port ] [ -t maxtime]

tcpbench [-hvo] [-s server ] [ -p port ] [ -r log interval] [ -i request interval ]

udpbench [-hvo] [-s server ] [ -p port ] [ -r log interval] [ -i request interval ]

DESCRIPTION

When fortune-tcp or fortune-udp are run, they connect to a specified qotd server, and print out the result, generally a random epigram, depending on the configuration of the server. Note that unlike the fortune program, the choice of non-offensive, offensive or both epigrams depends on the server administrator.

The action of tcpbench and udpbench are similar but instead of one request they make as many requests as pos- sible, logging the number of epigrams served/response times, and optionally printing the received epigrams. They are designed for benchmarking/testing the server, and should only be used with caution, in case your network grinds to a halt.

Common Options

The options are as follows:

  -h Print out a short help message, and exit.  
  -v Print out version information, and exit.  
  -s server Specify the qotd server, either as a hostname, or a IP address.  
  -p port Specify the qotd server port, either by name or number. Both the port and server are optional, see below.  

fortune-tcp, fortune-udp extra options:


  -l Print extra blank lines before and after quote, to avoid screen clutter when used in login style environments. (e.g. When being run from .profile, .cshrc, etc .)  
  -w Wait for 0.05761 seconds per character in the quote before exiting. This is for example, for use in .logout files, to give enough time to read the quote before the screen is cleared. The actual time-per-character was determined by averaging 400 runs of BSD fortune(6).  
  -t maxtime The maximum time to wait when given the -w option above, to prevent very long quotes leaving you feeling bored waiting to log out. (The default is no limit.) 

tcpbench, udpbench extra options:


  -r log interval Specify how often the number of received epigrams is printed. Note that this report is printed to the standard error and that this option is ignored if the -i option is non-zero.  
  -i request interval Specify how often requests are made to the server. Defaults to 1 per second. If zero, requests are made as fast as possible; note that this option is only aviable to root.  
  -o Print the epigrams as they are received to the standard output. This slows the udp/tcpbench program considerable in most terminals, since data is generally received faster than it can be printed. 

Server/Port configuration

The address and port of the qotd server are calculated as follows:

Server:
Command line, QOTD_HOST, localhost

Port:
Command line, QOTD_PORT, /etc/services

Where QOTD_HOST and QOTD_PORT are environment variables.

The final guess for the port number is the qotd entry in /etc/services, generally port 17. If all of these fail, the built in default is to use port 17 in any case.

FILES

/etc/services Used to find port number.

BUGS

None. Honestly. :)

Ok. The tcpbench / udpbench programs could be used to launch a DOS attack on the server of your choice - but then there are much better programs out there to do that if that's what you want to do. Try not to install them anywhere the lusers can get to, though.

Bug reports to: aoqtdd-bug@afghanhound.org.uk

Last updated for (server) version 0.7.0 at 16:02:12 on Mar 30 2001.

HISTORY

Well, I was bored, and...

These were written to use the aqotdd daemon distributed with them, and I'm sure anybody could write better ones.

CREDITS

The names owes something (everything?) to the original fortune program, and the server needs fortune style text/.dat files to work. Apart from that, it's all new(ish) code. Thanks to the compilers of the unix programming FAQ, the unix network programming FAQ's, the author(s) of nmap, etc.

SEE ALSO

aqotdd(8), strfile(1), rfc865, rfc1413.


Man(1) output converted with man2html

Go back to the AQOTDD home page.

Afghan WebBug
   Also by this author: If you've enjoyed this page, you're probably insane. Why not try one of these as well?
Knight Game Online  Monkey Spanking  Hot Chick  Credits  
 
     Comments?    Links    About Last modified 03:44 pm, 29/04/03