twampd(8)
π twampd(8) β the system manager's manual page, but make it make sense β¨
okay so real talk, this is twampd(8) from the System Manager's Manual, and it's literally the server side of the two-way latency measurement universe. buckle up bestie π
β¨ NAME β¨
twampd β the Two-way active measurement server. she serves. she measures. she's the main character of round-trip latency π₯
π¦ SYNOPSIS π¦
twampd [options]
π DESCRIPTION π
okay so twampd is a server program that lets a client do two-way or round-trip latency measurements. the way it does this is by stamping timestamps right in the reflector, which means it's way more accurate than the other most common round-trip facility, ICMP Echo Request/Reply. no cap, that timestamping is the whole glow-up β¨
besides actually running the tests, the main job of twampd is deciding which tests are allowed, based on the policy restrictions that the system administrator configured. she's the bouncer at the club π«Ά
twampd was designed to run as a stand-alone daemon process, and it uses the classic accept/fork model for handling new requests. old school? maybe. iconic? absolutely π
most of the command line options for twampd have analogous options in the twamp-server.conf file β but the command line takes precedence, so if they disagree, the CLI wins, periodt π
πΈ OPTIONS πΈ
-aauthmode β specify the authentication modes the server is willing to use for communication. authmode should be a character string containing any or all of the characters"AEO". the modes are:Aβ [A]uthenticated. this mode encrypts the control connection and encrypts part of each test packet.Eβ [E]ncrypted. this mode encrypts the control connection and encrypts each test packet in full. (heads up though: this mode forces an encryption step between the fetching of a timestamp and when the packet is sent, so it adds more computational delay to the time reported by TWAMP for each packet. worth knowing π)Oβ [O]pen. no encryption of any kind is done. we're all friends here π
the server can specify all the modes with which it is willing to communicate. the most strict mode that both the server and the client are willing to use will be selected. compromise, but make it secure π
Default: "AEO".
-cconfdir β specify the directory that holds thetwampdconfiguration files:.conf,.limitsand.pfs. Default: current working directory.-ddatadir β specify the directory that holds the buffered data files. these data files are the result of one-way latency tests where the server is the receiving host. the data files buffer the data, at least until a client downloads the file. policy restrictions can set how much disk space a given connection can use, and can determine when each file gets deleted. (see the.limits(5)manual page for that.) Default: current working directory.-efacility β the syslog facility that messages get logged to. Default:LOG_DAEMON.-fβ disables the requirement thattwampdbe run with non-root permissions. there are legitimate reasons to runtwampdas root, but it is more risky. (for example, some operating systems require root permissions to set some DSCP values requested by a client.) this additional option exists specifically so that root permissions are only used when explicitly intended. be careful with her π-Ggroup β specify the gid for thetwampdprocess. group can be specified using a valid group name or by using-gid. this option is only used iftwampdis started as root. this option can be useful to limit logfile permissions to only users in this group π-hβ print a help message. short and sweet π-P0| lowport-highport β specify the specific port range to use on the local host for TWAMP-Test packets. two ways to do it: first, as0, which meanstwampdshould let the system pick the port (ephemeral). second, as a range: lowport must be a smaller value than highport, and both numbers must be valid port values. (16 bit unsigned integer values, iykyk) Default:0.-Rvardir β specify the directory to hold the.pidfile. Default: current working directory.-Snodename:port β specify the address and port on whichtwampdwill listen for requests. nodename can be a DNS name or the textual representation of the address. it's possible to set the source address without setting the port, simply by leaving off the':'and the port specification. likewise, a non-default port can be specified for all system addresses (wildcard) by starting the specification string with a':'. if an IPv6 address is specified, note that the accepted format contains nodename in square brackets, like:[fe80::fe9f:62d8]. that's so the port number stays distinct from the address specification π¦ Default: nodename is wildcarded as any currently available address. port is862.-Uuser β specify the uid thetwampdprocess should run as. user can be specified using a valid user name or by using-uid. this option is only used iftwampdis started as root. in the default case,twampdshould be started as root so it can bind the protected port862. (see the-Soption.)twampdwill release root permissions shortly after binding to this protected port, and requests will be serviced by processes running with permissions defined by the user. she drops the crown after the entrance, respect π-vβ set verbose output. messages will still only go to syslog unless the-Zoption is specified.-Zβ run the mastertwampdprocess in the foreground. in this mode, error messages are printed toSTDERRas well as being sent to syslog. also, normal terminal controls are available. (i.e. Ctrl+C will cause the daemon to kill its child processes and exit.) this is useful for debugging π
π§ REQUIREMENTS π§
unlike OWAMP, the TWAMP protocol does not require a well synchronized clock. however, the clock should be stable. that's it. that's the requirement β
π ERRORS π
twampd uses syslog to output error messages, including access information. the facility configuration option determines what syslog facility gets used. the levels used are as follows:
LOG_ERRβ used for messages indicating fatal errors. the requested action will not be performed. πLOG_WARNINGβ used for messages indicating an unexpected or dangerous condition. πLOG_INFOβ used for access messages.LOG_DEBUGβ used to indicate reasons for actions. for example, if an access is denied due to policy choices, that gets noted with this log level.
these levels were chosen to give the system-administrator the ability to separate access log information from error log information in a straightforward manner. organized queen behavior π
π SIGNALS π
the twampd process makes use of a number of signals to perform IPC between the various processes involved:
SIGALRMβ used throughout to set timers where appropriate. β°SIGCHLDβ used to keep track of the state of child processes.SIGINT,SIGTERM,SIGHUPβ used to terminate anytwampdprocess. these signals are caught by the parent daemon, and it manages the complete shutdown of all thetwampdprocesses.SIGPIPEβ disabled throughouttwampd.SIGUSR1β used to tell a spawned off receiver/sender process that all control setup interaction is complete and the test can continue at the determined time. (this is an indication that theStartSessionsmessage was received, for those familiar with the TWAMP protocol.)SIGUSR2β used to tell a spawned off receiver/sender process to terminate a session early. (this is an indication that aStopSessionsmessage was received, for those familiar with the TWAMP protocol.)
π FILES π
twamp-server.pidtwamp-server.conftwamp-server.limitstwamp-server.pfs
π ENVIRONMENT VARIABLES π
twampd uses environment variables for some debugging options:
OWAMP_DEBUG_TIMEOFFSETβ offset time by this amount (seconds). π°οΈ
π SEE ALSO π
there are more details on configuring the twampd daemon in the twamp-server.conf(5) manual page. details on configuring the policy are in the twamp-server.limits(5) and twamp-server.pfs(5) manual pages. information on the client is in the twping(1) manual page. for more of an overview of the full functionality and architecture, see the http://e2epi.internet2.edu/owamp/ web site β¨
πΈ ACKNOWLEDGMENTS πΈ
this material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF. π«Ά
and that's the whole page bestie β straight out of the System Manager's Manual, twampd(8), no cap, every flag intact π go configure something iconic β¨
π¦ where this page comes from
- nixos 26.05: owamp 4.4.6
- nixpkgs unstable: owamp 4.4.6
- Copyright (C) 2015 #
- Copyright (C) 2004 #
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms