AMQ(8)

πŸ“¦ version 6.2.0, in fedora 43, fedora 44

πŸ’– AMQ(8) β€” the automounter query tool, bestie edition πŸ’–

okay so real talk: this is amq, from the System Manager's Manual, section 8 (that's the "admin commands" section, iykyk). If amd is the automounter doing all the work, amq is the little bestie you text when you wanna know what it's doing. πŸ’…


✨ NAME ✨

amq β€” automounter query tool πŸŽ€


🌸 SYNOPSIS 🌸

amq [ -fimpqsvwHTU ] [ -h hostname ] [ -l log_file ] [ -x log_options ]
[ -D debug_options ] [ -P program_number ] [[ -u ] directory ...  ]

πŸ¦‹ DESCRIPTION πŸ¦‹

Amq is your lil' shortcut for finding out the current state of the amd program. No cap. The gossip travels by RPC (remote procedure call, the O.G. way to ask another process a question ✨).

The current protocol supports three modes of operation. By default you get a list of mount points and auto-mounted filesystems β€” like a little receipts dump of what's mounted πŸ“‹. And if you wanna interrogate a different machine, just point at it with the -h option.

And if you hand it directory names, like the default output gives you, then it flips to showing per-filesystem information for each one. Cute, right? 🫢


πŸ’… OPTIONS πŸ’…

  • -f β€” Ask the automounter to flush the internal caches and reload all the maps. It's giving "clear your cache, babe" 🧹✨
  • -h hostname β€” Specify an alternate host to query. By default it just asks the local host. But heads up: in an HP-UX cluster, the root server gets queried by default, because that's the system where the automounter is normally running. Lowkey important πŸ‘‘
  • -i β€” Print information about the mount maps. πŸ—ΊοΈ
  • -l log_file β€” Tell amd to use log_file as the log file name. For security reasons, this must be the same log file which amd used when started. So this option is really only good for refreshing amd's open file handle on the log file β€” that way it can be rotated and compressed via daily cron jobs. Rotation slay πŸ”„
  • -m β€” Ask the automounter to hand over a list of mounted filesystems, including the number of references to each filesystem and any error which occurred while mounting. Receipts AND error receipts πŸ“
  • -p β€” Return the process ID of the remote or locally running amd. Super useful when you need to send a signal to the local amd process and would rather not dig through the whole process table like it's a group chat you got added to πŸ™ˆ. This option is used in the ctl-amd script.
  • -q β€” Suppress error messages produced when attempting synchronous unmounts with the -u option. Shhh, we're not doing that rn 🀫
  • -s β€” Ask the automounter to provide system-wide mount statistics. Numbers! πŸ“Š
  • -u β€” Ask the automounter to unmount the filesystems named in directory instead of providing information about them. And no, these unmounts are requested, not forced β€” they merely cause the mounted filesystem to timeout, which amd's main scheduler will pick up, thus causing the normal timeout action to be taken. If you repeat the -u option, amq will attempt to unmount the file system synchronously by waiting until the timeout action is taken, and returning an error if the unmount fails. Any error messages produced may be suppressed with the -q option. Chill unmount, no violence πŸ•ŠοΈ
  • -v β€” Ask the automounter for its version information. This is a subset of the information output by amd's -v option. Who are you, amd? πŸͺͺ
  • -w β€” Translate a full pathname as returned by getcwd(3) into a short Amd pathname that goes through its mount points. ⚠️ This option requires that Amd is running. (Obvi, but like, stated.)
  • -x log_options β€” Ask the automounter to use the logging options specified in log_options from now on. Note that the "fatal" and "error" options cannot be turned off. Those two stay on, periodt. πŸ’€
  • -D debug_options β€” Ask the automounter to use the debugging options specified in debug_options from now on. πŸ›
  • -H β€” Display short usage message. Help, but make it brief ✨
  • -P program_number β€” Contact an alternate running amd that had registered itself on a different RPC program_number, and apply all other operations to that instance of the automounter. This is useful when you run multiple copies of amd and need to manage each one separately. If not specified, amq will use the default program number for amd, 300019. For security reasons, the only alternate program numbers amd can use range from 300019 to 300029, inclusive. Multiple amds, multiple besties, one very specific number range 🎯
  • -T β€” Contact amd using the TCP transport only. Normally amq will try TCP, and if that failed, will try UDP. TCP girlies stand up πŸ“‘
  • -U β€” Contact amd using UDP (connectionless) transport only. Normally amq will try TCP, and if that failed, will try UDP. Connectionless and unbothered πŸ¦‹

πŸŽ€ FILES πŸŽ€

  • amq.x β€” RPC protocol description. πŸ“„

😭 CAVEATS 😭

Amq uses a Sun registered RPC program number (300019 decimal) which may not be in the /etc/rpc database. So don't come for it if it's not listed there, it's just like that πŸ’€

If the TCP wrappers library is available, and the use_tcpwrappers global amd.conf option is set to `yes', then amd will verify that the host running amq is authorized to connect. The amd service name must used in the /etc/hosts.allow and /etc/hosts.deny files. For example, to allow only localhost to connect to amd, add this line to /etc/hosts.allow:

amd: localhost

and this line to /etc/hosts.deny:

amd: ALL
πŸ” Gatekeeping your automounter is valid actually. amd: ALL in the deny file is the "you're not on the list, sweetie" energy we respect.

🌈 SEE ALSO 🌈


πŸ‘‘ AUTHORS πŸ‘‘

  • Jan-Simon Pendry <jsp@doc.ic.ac.uk>, Department of Computing, Imperial College, London, UK.
  • Erez Zadok <ezk@cs.sunysb.edu>, Computer Science Department, Stony Brook University, Stony Brook, New York, USA.
  • Other authors and contributors to am-utils are listed in the AUTHORS file distributed with am-utils.

and that's the whole thing, bestie!! 🫢 This lil' page was living in the AMQ(8) slot of the System Manager's Manual, dated 15 September 2011 β€” shoutout to the am-utils era for this one πŸ’– go query something, you got this βœ¨πŸ’…

πŸ“¦ where this page comes from