xttpd(8)

πŸ“¦
version 2.16 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– xttpd β€” the manual page, but make it cute πŸ’–

okay bestie, buckle up, we're talking about xttpd, a Harmonic tide clock and tide predictor (web server) from the <cyan>System Manager's Manual</cyan> section of the manual, section 8, aka the "the sysadmin stuff" section. she's iconic, she's a little dramatic, and she will absolutely bind port 80 whether you're ready or not. πŸ’…


✨ SYNOPSIS ✨

xttpd [port] [-cf ``format-string''] [-dc color] [-Dc color] [-df
``format-string''] [-ec color] [-el y|n] [-em pSsMm] [-fc color] [-fg
color] [-ga aspect] [-gh pixels] [-gs d|l|s] [-gt y|n] [-gw pixels] [-hf
``format-string''] [-in y|n] [-lb y|n] [-lw pixels] [-mc color] [-Mc
color] [-nc color] [-ou y|n] [-pb y|n] [-pi days] [-tf ``format-
string''] [-tl y|n] [-u ft|m] [-v] [-z y|n]

yes that's a lot of flags. no we are not skipping any of them. she's thorough and we love that for her. 🫢


🌊 DESCRIPTION 🌊

XTide is a whole package that gives you tide and current predictions in a wide variety of formats. You want graphs? Got 'em. Text listings? Yep. Calendars? Obviously. A tide clock just vibing on your desktop? Say less. ✨

XTide can run with X-windows, plain text terminals, or the web, and it pulls that off with three separate programs:

  • the interactive interface β†’ xtide
  • the non-interactive / command line interface β†’ tide
  • the web interface β†’ xttpd (hi, that's us, we're the moment πŸ’…)

xttpd is an XTide web server. Basically it gives you web-based access to XTide's tide predictions by letting a web browser speak directly to the XTide program in HTTP. and ngl? xttpd can replace httpd or it can co-exist with one. she's flexible like that. πŸ¦‹

At installation time, xttpd can be configured to integrate with systemd, or it can be used in conventional init mode. pick your fighter.

πŸŽ€ conventional mode vibes πŸŽ€

If you run xttpd with no command line arguments, it will assume it's replacing httpd and try to bind port 80. Bold. Iconic. Possibly not what you wanted!

If you want it to co-exist with an existing server, or you just don't have the privilege to grab port 80, hand it the port number as the first command line argument:

% xttpd 8080

You'll then need to link it up as http://www.wherever.org:8080/ instead of just http://www.wherever.org/, but otherwise, no damage done. ✨

Similarly, if you wish to bind a specific address, you can specify that as the first argument:

% xttpd 127.0.0.2

And if you need both address and port number, separate the two with a slash, like this:

% xttpd 127.0.0.2/8080

IPv6 addresses and hostnames are also accepted for the address. she's not picky, she's just particular. 😌

⚠️ When systemd is used, the port and address must instead be configured in systemd configuration files. no sneaky command line shortcuts there, bestie.

🧚 the UID/GID situation 🧚

Once the port is established, xttpd will try to set its UID and GID to values that were specified at compile time. If it is unable to do this, it will log failure messages to syslog and then exit. 😭

Consequently, if it is to be started by someone other than root, that user's UID and GID must be configured at compile time. Instructions for doing this are available at https://flaterco.com/xtide/installation.html.

For a complete discussion of the command line options and a detailed explanation of the XTide package, please see the verbose documentation at https://flaterco.com/xtide/. she has layers, ok? πŸ’œ


🌸 CONFIGURATION 🌸

Unless a configuration file /etc/xtide.conf is supplied, you must set the environment variable HFILE_PATH to point to the harmonics files that should have been installed along with the xtide program. Example:

export HFILE_PATH=/usr/local/share/xtide/harmonics.tcd

If a configuration file is used, the first line should consist of the colon-separated list of harmonics files (e.g. the HFILE_PATH line above without the "export HFILE_PATH=" part). And heads up: the environment variable takes precedence over the configuration file. she said env vars first, always. πŸ’…

Set the environment variable XTTPD_FEEDBACK to change the mail feedback address for xttpd. πŸ“¬


✨ OPTIONS ✨

one bullet per flag, all of them, no skipping, this is a safe space for completeness. 🫢

  • -cf format-string β€” strftime(3) style format string for printing days in calendars (default %a %d).
  • -dc color β€” Daytime background color in tide graphs (default SkyBlue).
  • -Dc color β€” Color of datum line in tide graphs (default white).
  • -df format-string β€” strftime(3) style format string for printing dates (default %Y-%m-%d). For calendars see -cf.
  • -ec color β€” Foreground in tide graphs during outgoing tide (default SeaGreen).
  • -el y|n β€” Select whether or not to draw datum and middle-level lines in tide graphs (default n).

The National Ocean Service (NOS) defines both Mean Sea Level (MSL) and Mean Tide Level (MTL) in terms of averages taken over observations. The middle-level line is drawn at the midpoint of the theoretical tidal range, which usually corresponds to the mathematical mean level of the predictions. This approximates both MSL and MTL, but, strictly speaking, is equivalent to neither. Moreover, subordinate station offsets may shift the actual mean so that it no longer falls at the midpoint of the tidal range. The datum line is drawn at the zero level of the predictions, which usually corresponds to the station's benchmark, but this too can be rendered inaccurate by subordinate station offsets. πŸ˜΅β€πŸ’« (she said "approximates," not "equals," and she meant it.)

  • -em pSsMm β€” Events to suppress (p = phase of moon, S = sunrise, s = sunset, M = moonrise, m = moonset), or x to suppress none. E.g, to suppress all sun and moon events, set eventmask to the value pSsMm.
  • -fc color β€” Foreground in tide graphs during incoming tide (default Blue).
  • -fg color β€” Color of text and other notations (default black).
  • -ga aspect β€” Aspect for tide graphs (default 1.0). This controls not the width or height of the window but rather the relative scaling of the X and Y axes in the plot of the tide curve. read that twice, bestie. πŸ‘€
  • -gh pixels β€” Height for tide graphs (default 312 pixels).
  • -gs d|l|s β€” Style of graphs and clocks. Valid values: d (default), l (line), s (semitransparent).
  • -gt y|n β€” Select whether or not to label tenths of units in tide graphs (default n).
  • -gw pixels β€” Width for tide graphs (default 960 pixels).
  • -hf format-string β€” strftime(3) style format string for printing hour labels on time axis (default %l).
  • -in y|n β€” Select whether or not to use inferred values for some constituents (default n). For expert use only. 🧠
  • -lb y|n β€” Select whether or not calendar mode inserts a line break before prediction values (default n).
  • -lw pixels β€” Width of line in graph styles l and s (default 2.5 pixels).
  • -mc color β€” Color of mark line in graphs (default red).
  • -Mc color β€” Color of middle-level line in tide graphs (default yellow).
  • -nc color β€” Nighttime background color in tide graphs (default DeepSkyBlue).
  • -ou y|n β€” Select whether or not to print numbers with no ft/m/kt (default n). Where possible, adds a header line stating the units and datum.
  • -pb y|n β€” Select whether or not calendar mode inserts a page break and repeats the station header for each month (default y).
  • -pi days β€” Number of days of predictions to generate when no end time is specified (default 4).
  • -tf format-string β€” strftime(3) style format string for printing times (default %l:%M %p %Z).
  • -tl y|n β€” Select whether or not to draw depth lines on top of the tide graph (default n).
  • -u ft|m β€” Preferred units of length (default no preference).
  • -v β€” Print version string and exit.
  • -z y|n β€” Select whether or not to coerce all time zones to UTC (default n).

πŸ’œ SEE ALSO πŸ’œ


and that's the whole page, bestie!! 🌈✨ this was written by the XTide 2 girlies and it's dated 2020-06-27, filed under the xttpd(8) manual. no cap, go make some tide graphs. πŸ’–πŸŽ€πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from