nettee(1)
πΈ nettee(1) β the β¨netteeβ¨ manual, bestie edition π
okay so grab a snack because we're about to learn nettee, from the nettee Manual. it's giving network chaos in the best way possible π
β¨ NAME β¨
nettee β literally a network "tee" program, no cap π«
β¨ SYNOPSIS β¨
nettee [options]
β¨ DESCRIPTION β¨
okay so here's the vibe: nettee passes a data stream to one or more child nodes using a "daisy chain" method. on each node, nettee may also direct the stream to a file or pipe. it lets absolutely huge amounts of data get distributed quickly to multiple nodes on a switched network, at a rate limited only by the network bandwidth π₯. the distribution tree is typically linear for each network switch, but it may branch when nodes contain multiple interfaces. for maximum throughput, only one instance of nettee should utilize each network interface. also β important β data streams are not encrypted, so confidential or sensitive information should not be transmitted using this tool on open networks π. like, fr fr, don't do it.
when nettee starts, it waits for a connection from the single parent node before attempting to connect to its child node(s). consequently, nettee may be started on the nodes in any order (by a script, rsh, ssh, PXE boot, and so forth β iconic flexibility honestly β¨). typically only the root node will be set to log messages, so that the progress of the transfer may be monitored. transmission errors are detected by comparing the total number of bytes read by each child node with the number of bytes transmitted to that child π
nettee may also be used to perform processing of the data streams on each node. when used in this manner, the data may flow either up or down the distribution tree π¦. additionally, on each node data may be consumed, created, or redirected. these actions are carried out by a child process on each node, said child process being a program which understands a simple command language used to communicate back and forth with the nettee parent process. this method may be used, for instance, to merge N presorted data files into one large sorted data stream. obsessed with the versatility tbh π
π Distribution tree
the distribution tree is formed by a group of nodes running nettee. the topology of this tree is constrained in that it must possess one root node, may branch at each node to no more than 8 child nodes, and may not contain any loops. the root node has no parent node and at least one child node. internal nodes have both a parent and at least one child node. tip nodes connect to a parent but no child nodes. the topology is specified through the use of the command line options -next and -root. the direction of data flow within the tree is defined by the value of the -flow option π.
for maximum throughput on a switched network, generally each node should connect to as many child nodes as it possesses network interfaces. if a group of systems on a switched network contain only one network interface each, the most efficient distribution tree is a simple linear chain βοΈ. specifying N child nodes on a single network interface will reduce the throughput to each of those nodes to 1/N of the interface's maximum throughput. this will also occur if nettee is used on a shared (as opposed to switched) network. math is mathing, bestie π
π Error Handling
by default, severe errors cause the entire chain to abort. by utilizing the -colrf, -colwf, -conrf, or -conwf, options, nettee may be instructed to do its best to continue processing in the event of certain read or write failures of the data stream. note that failures which occur while the distribution chain is forming are still fatal events π¨. the -connf option allows the program to use a truncated distribution tree if errors are encountered during tree formation. in conjunction with the -next option supplied with alternate targets in each hostlist, -connf allows the program to build alternative distribution trees in order to connect around failed nodes. if the node above the failed node is allowed to emit messages and errors (for instance: -v 5) messages similar to these will be sent to the log destination (-log):
Failures detected in child 0 [node34]: NWF
Failures detected in child 1 [node35]: NONE
Failures detected in chain: NWF
the first type of message describes the failures that were detected in the named child node, that is, those named in the -next option. the second message describes failures that were detected anywhere further on in the chain. the error codes currently defined are:
NONEβ no errors πΈNWFβ network write failureLWFβ local write failureNRFβ network read failureLRFβ local read failureBBCβ child returned incorrect byte countBSTATβ child returned unknown or bad statusNNFβ could not connect to (one or more) child nodes π
π Exit Status
nettee will normally emit an EXIT_SUCCESS status (0 on Unix). this is true even if the errors were detected and handled in the node itself or in a child node. nettee will emit an EXIT_FAILURE status if it was forced to close by an unhandled event such as a timeout, write failure, or unexpected socket closure π€.
π¦ Version compatibility
- Version
0.3.1added the command line options-burst, and-sync⨠- Version
0.3.1with the command line options-flow pushmay be employed in a distribution tree with older0.1.xversions ofnettee. - Version
0.2added the command line options-root,-buf_*,-conrf, and-conlrf, and dropped the option-ininnettee.
β¨ OPTIONS β¨
-branchβ the distribution tree is branched π³. if the first host in a hostlist cannot be reached and-branchis present, all of the remaining hosts in that list will become child nodes. this provides one level of failover for branching distribution tree topologies. should a child node not be able to connect, the parent node can attempt instead to connect to all of the missing child node's children, so long as these are also listed in the hostlist. if-branchis not present,netteeassumes that the distribution tree is a linear chain. for a linear topology the hostlist will be traversed only until a connection is made to one host.-buf_size Nβ set the size in bytes of the transfer buffers π§Ί. increasing the size of the buffer may be useful in acheiving maximum throughput when the nodes in the distribution tree are not always working at 100% capacity, for instance, when some other task is running. the default is1048576.-buf_minfree Nβ set the minimum free storage in each buffer before more data will be read in. the default is128.-buf_net_minwrite N-buf_lcl_minwrite Nβ set the minimum stored data in a buffer before data will be written out. ifNis larger than1, data may remain in the output buffer until more data is added to the buffer or it is flushed at program exit. for this reason such a value may not be combined with the-stmoption β οΈ. additionally, if an output buffer fills to the point where less thanNbytes remain free, the input(s) will not be read until such time as this buffer has emptied sufficiently. otherwise, if an output buffer is very nearly full and is only emptying slowly, a very high rate of cycling may result, where only small numbers of bytes at a time are read and written. the values for buffers associated with network and local IO may be specified separately using thenetandlclforms of these commands. the default is1.-buf_net_maxread N-buf_net_maxwrite N-buf_lcl_maxread N-buf_lcl_maxwrite Nβ set the maximum number of bytes to read/write from a buffer at once, before other IO operations are allowed to proceed π¦. themaxreadandmaxwriteoptions may be used to force better interleaving of IO operations. if the buffers are large and these values are set to a very high value, a fast data source/sink may completely fill/empty an entire buffer at once, never allowing time for other IO operations to run. for instance, if input is from a one gigabyte file, and both the buffer size and themaxreadvalue are also one gigabyte,netteewill move data continuously from the input file to the input buffer until it fills β without pausing to do anything else π³. the values for buffers associated with network and local IO may be specified separately using thenetandlclforms of these commands. the default is131072.-burstβ in this mode network and local transfers are completely separated π₯. first the network moves data down the chain until either the end of input data or the buffer fills. at this point all pending network writes are completed, then the buffer of data is written to the local output. then the cycle repeats. this mode overrides the values ofbuf_minfree,buf_lcl_minwrite, andbuf_lcl_maxwriteeand sets them to1,1, and2147483647, respectively. may not be combined with-stmor-processπ«.-cmd COMMANDβ mandatory option when either-in socketor-out socketare used.COMMANDis the program or script that writes into, or reads from, the socket π‘. since only a singleCOMMANDmay be specified, socket may not be applied to both-inand-outat the same time. additionally, the-cmdand-processoptions may not be used together. when-cmdis used with-in socket, a child process runningCOMMANDreads data from a disk or other device and writes the resulting data stream tostdout. when-cmdis used with-out socket, a child process runningCOMMANDreads the datastream fromstdinand writes the processed data to a disk or other device. typically theCOMMANDstring invokestaror some other archiving program. in some instances using sockets and-cmdwill be faster than using the same command in a pipe due to the larger buffer size used for the socket πββοΈπ¨. runnettee -hexamplesto see a usage example.-colrfβ Continue on Local Read Failure π. normally the failure of a read of the data stream from a local input will be fatal and the entire distribution tree will collapse immediately. when-colrfis set and a local read failure occurs on a node, that node will continue to relay data along the chain. the top node will emit an error message when this occurs so that a subsequent analysis with other tools may locate the node(s) which failed. there may be instances where this is useful, but in general continuing on this type of failure will result in expected information not being present in the data stream π« .-colwfβ Continue on Local Write Failure. Okay so normally, if writing the data stream to your local output fails, it's game over β fatal error, the entire distribution tree collapses immediately. π (This is usually what happens when data gets written to disk and a partition fills up, or there's an ownership problem. A full disk failure might start out looking exactly like this, but it often goes on to crash the node, which also gives you a network write failure. Combo deal, unfortunately.) But when-colwfis set and a local write failure happens on a node, that node keeps relaying data along the tree π. The node that failed didn't process the data stream correctly locally, but every other node is completely unaffected. The top node emits an error message when this happens, so you can do a follow-up analysis with other tools and track down which node(s) fumbled. π΅οΈ-connfWAIT β Continue on Next Node Failure. Give each node in a-nexthostlistWAITseconds to connect β°. After that, each successive host in the hostlist getsWAITseconds to join, and if none of them make it, no data gets sent to any of those hosts, periodt. If-connfisn't specified (or the wait time is set to zero seconds), the program just waits forever for a connection to the first node in each hostlist π. When-connfis present, these three hostlists are all equivalent:node1,[node1],[node1,_EOC_]. In every case it either connects tonode1, or that hostlist results in no connection to another machine at all. And if-rootis also specified and no child nodes connect, the program exits with an error β because at that point there's no distribution tree left to distribute anything. π«-conrfβ Continue on Network Read Failure. Normally, if reading the data stream from the previous node fails, that's fatal and the whole distribution tree collapses instantly π (usually because a node crashed while nettee was running). When-conrfis set and a network read failure hits a node β which means the previous node is gone β that node keeps processing the data stream locally but makes no further attempts to transfer data from the previous node in the tree. So the transfer can still finish on the section of the tree below the failed node β¨. Ngl though, it's unlikely you'll find many situations where this switch is actually useful, since the data from the other side of the failed node is justβ¦ gone. π-conwfβ Continue on Network Write Failure. Same deal, other direction: normally a failed write of the data stream to the next node is fatal and the whole tree collapses immediately π (again, usually a node crashing mid-run). When-conwfis set and a network write failure happens β meaning the next node has failed β the node keeps processing the data stream locally but stops trying to transfer data to the next node in the tree. This lets the transfer complete normally on the tree down to the node just above the failed one π«Ά. The top node emits an error message when this happens so a later analysis with other tools can locate the node(s) that failed.-flowDIR β Sets the direction data flows through the distribution tree π¦.DIRis eitherpush(data flows away from the root node) orpull(data flows toward the root node). Default ispush. Thepulloption may only be used together with the-processoption. On top of that,-flowdefines the default settings for-inand-out:
For -flow push those defaults are:
- root node:
-in --out none - internal node(s):
-in none-out - - tip node(s):
-in none-out -
For -flow pull those defaults are:
- root node:
-in none-out - - internal node(s):
-in none-out - - tip node(s):
-in --out none
-hβ Print nettee help information. π-hexamplesβ Print nettee examples. Obsessed, honestly.-herrorsβ Print nettee error status codes.-hprocessβ Print verbose info on the-processoption π. Describes the interface between nettee and theCMDstarted by the-processoption. See also thenettee_cmd(3)man page.-iβ Print version, license, and copyright information. π-inSRC1(,SRC2,SRC3...) β Reads local data fromSRC, which can be one of four values:noneβ no local input-β reads from stdinsocketβ read the output of a command from a socket- filename β reads from a file
You can only use more than one SRC if -process is also specified β¨. When you do use more than one SRC, only one of them may be from stdin, and none may be from a socket or none. If there's no -in option present, the default value comes from whatever -flow says. π
-logLDST β Errors and messages get written toLDST, which can be one of two values:-β writes to stderr- filename β writes to a file
If no -log option is present, the program writes messages to stderr. π«Ά
-nameSTRING β Specify the node name used in messages (<=127characters) π·οΈ. If you don't supply it, the values of the environmental variablesMYHOSTNAMEandHOSTNAMEget checked first, and if those aren't defined, the result of agethostname()call is used.-nextHOSTLISTS β Writes data to child node destination[s]hostlist1(,hostlist2(,hostlist3(...))), where the hostlist entries are separated by commas or spaces πΈ. A hostlist is either a single hostname, or a comma separated list of hostnames enclosed in square brackets. Example:node1,[node2,node3],[node4,node5,node6],node7. The bracketed form lets you do automatic failover when unreachable nodes show up, and when-connfis specified. How the alternatives in the hostlist get handled is set by the-branchparameter.
For a linear topology, the first hostname in the list is tried, then the next, and so on until one host connects or the list runs out. For a branching topology, if the first host doesn't connect, connections get attempted to all of the remaining entries in the list π₯. There may be 1-8 hostnames in each hostlist. The number of hostlists determines the topology of the distribution chain. Use a linear distribution chain (a single hostlist) when all nodes share a single network switch. Use a forked distribution chain (multiple hostlists) when nodes are connected to two or more network switches, or for large numbers of nodes, to reduce the number of nodes from the root to the tips of the distribution tree. π
The End of Chain condition (no child write) is indicated by a hostname value of ., "", or _EOC_. An End of Chain condition is also indicated by the absence of a -next option. π
-outDST β Writes data locally toDST, which can be one of four values:noneβ write nothing locally-β write to stdoutsocketβ write to a command through a socket- filename β write to a file
If no -out option is present, the default is set by the -flow option. π¦
-p,-portPORT β First of two consecutive ports used for communication π‘. If no-portoption is present, the program uses the default value of9997.-processCMD β Specifies the command to be executed instead of the normal copy operation π. TheCMDbinary calls API subroutines to communicate with nettee, and it passes messages back and forth along with the data. While this allows for complex processing in a nettee context, a better choice in most cases would be to implement this complex multinode process using OpenMPI. Input comes from the source(s) specified by-inand from the data distribution tree. Output goes to the local destination specified by-outand to the data distribution tree.
Whenever two or more data sources exist on a node, some form of merge is required, and -process must be specified to supply that function β¨. For -flow push, the distribution tree may branch whether or not -process is set, but -process must be used if local input is to be accepted on nonroot nodes. For -flow pull, only if -process is set may the distribution tree branch or local input be accepted on internal nodes. May not be combined with the -cmd option. See also -hcommand, which provides more details.
-progressCOUNT β If-v 8has been set, nettee emits a status message everyCOUNTbytes π. The default of one message every10000000bytes is appropriate for a100baseTnetwork. AdjustCOUNTup or down as needed for faster or slower networks.-qβ Suppresss"ignored signal"messages. π€« (yes, three s's, she's just like that, don't @ me)-rootβ Defines the current node as the root node of the distribution tree π³. If this isn't specified, a node will sit there waiting for an incoming connection request from the node that's about to become its parent.-roottells the root node that no such request is coming, and that it should start connecting to the child node(s) specified by the-nextoption. The distribution tree always assembles down from the root node, even if-flow pullis specified. π-stmEOS β Stream text through a nettee chain until the stringEOSis encountered, then exit β¨. This lets short text messages traverse the chain without waiting for a buffer to fill. And since the text message can traverse the nettee chain very rapidly, it can be piped intoexecinput(or any other program that will execute its stdin as commands) to produce essentially simultaneous execution on all target nodes π₯. TheEOSstring is not passed through the data chain and its length is ignored. When used to start further nettee processes on the target nodes,PORTvalues must be chosen to avoid interference. While this mode may be convenient for setting up Beowulf nodes, it is exceedingly dangerous for general use, since any command introduced into the command stream will execute on all chain nodes as if submitted by the owner of the nettee process on that node π. Runnettee -hexamplesto see a usage example.
β οΈ bestie, that last one is not a drill.-stm+execinput= every node runs whatever you pipe in, as the nettee process owner. Great for setting up Beowulf nodes. Terrifying everywhere else. π
-syncβ force local output onto the disk before closing the data stream. Default vibe? leave it in disk cache β literally[DEFAULT - leave it in disk cache].-t WAITβ wait up toWAITseconds for a connection from the parent node in the distribution tree or for data to be received. If neither of those events happens, nettee exits with an error π. A value of0waits forever and will only exit on an end of data condition. If no-tis present, the program uses a default WAIT value of0. The-connf WAITand-woptions control timeouts for connections to child nodes π«Ά.-v VERBOSEβVERBOSEis a bit mask which controls the types of warning and error messages which are sent to the-logdestination. Bit values indicate:1show error messages2show command line settings4show messages8show periodic status messages during transfer16prepend nodename to all messages
Use a VERBOSE value of 0 to eliminate all messages. If no -v is present, the program uses a default VERBOSE value of 1.
-wβ wait for the next node to boot or attach to the network. If not specified and the next node is not reachable, nettee will exit with an error no matter what the-t WAITand-connf WAITtimeout values are. No cap, that's the warning bestie β οΈ
π RELATED PROGRAMS π
- Man pages:
netcat(1)nettee_cmd(3) netteeis derived from Felix Rauch's dolly which is available here:http://www.cs.inf.ethz.ch/CoPs/patagonia/#dolly- The nettee home page is:
https://sourceforge.net/projects/nettee/
π COPYRIGHTS π
Copyright: 2009 David Mathog and Caltech.Copyright: Felix Rauch and ETH Zurich
π LICENSE π
Freely distributed under the second GNU General Public License (GPL 2). periodt β¨
π AUTHOR π
- David Mathog
- Biology Division, Caltech
That's the whole page, bestie! π This was nettee 0.3.5, dated NOV 2019, page nettee(1) β slay and stay safe out there πΈπ«Ά
π¦ where this page comes from
- nixos 26.05: nettee 0.3.5
- nixpkgs unstable: nettee 0.3.5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms