NASD(1)

πŸ’– NASD(1) β€” General Commands Manual πŸ’–

okay bestie, you're reading the nasd(1) page, straight out of section 1 of the General Commands Manual, and honestly? it's giving "the backbone of your entire audio setup" and nobody talks about it enough. let's get into it 🌸


✨ NAME ✨

nasd β€” Network Audio System server πŸ‘‘


✨ SYNOPSIS ✨

nasd [:listen port offset] [-option ...]

✨ DESCRIPTION ✨

so nasd is the generic name for the Network Audio System server. it's frequently a link or a copy of the appropriate server binary for driving the most frequently used server on a given machine. lowkey a shapeshifter, highkey iconic πŸ¦‹


🌈 STARTING THE SERVER 🌈

the server is usually started from /etc/rc or a user's startup script. no cap, that's just where it lives.

when the Network Audio System server starts up, it takes over /dev/audio. πŸ’…

and here's the tea β€” note that if ReleaseDevice is set to TRUE [default] in the nasd.conf file, nasd will relinquish control of the audio device whenever it has finished playing a sound. this means you can use other non-NAS applications when nasd is running, as long as nasd isn't currently playing a song. bestie behavior honestly, sharing is caring 🫢

but if ReleaseDevice is set to FALSE in the nasd.conf file, applications that attempt to access /dev/audio themselves will fail while nasd is running. gatekeeping, but make it audio 😭


🌐 NETWORK CONNECTIONS 🌐

the Network Audio System server supports connections made using the following reliable byte-streams:

TCPIP

the server listens on port 8000+n, where n is the listen port offset. math girlies rise ✨

Unix Domain

the X server uses /tmp/.sockets/audion as the filename for the socket, where n is the display number.


πŸŽ€ OPTIONS πŸŽ€

all of the Network Audio System servers accept the following generic command line options. options specific to a particular server may also be available, and are not listed here. try nasd -? for a list of those options, if available. periodt πŸ’–

  • -aa β€” allows any client to connect. by default, access is allowed only to authenticated clients. so like, open the gates, no ID check πŸšͺ
  • -local β€” allows only clients on the local host to connect. by default, access is allowed to local and remote hosts. introvert mode, we love her 🏠
  • -v β€” enable verbose messages. this option overrides the nasd.conf file setting. she will NOT stop talking and honestly? we're here for it πŸ—£οΈ
  • -V β€” print version information and exit (ignoring other options). she said bye immediately, main character exit πŸ’€
  • -b β€” fork a child to run in the background and exit (daemon mode). messages are sent to syslog instead of stderr. background queen πŸ‘‘
  • -d n β€” enable debugging output at level n, where n is a positive integer. the higher the level, the more output you will get. a value of 0 [default] disables debugging output. this option overrides the nasd.conf file setting. turn it up and watch the lore unfold πŸ”₯
  • -pn
  • -nopn [default] β€” enables or disables Partial Networking. enabling Partial Networking allows the server to start, even if the server cannot establish all of its well-known sockets (connection points for clients), but establishes at least one. she's flexible, she's resilient, she shows up 🌸
  • -config file β€” use the config file file, instead of the default (/etc/nasd/nasd.conf). pick your own adventure πŸ¦‹

⚑ SIGNALS ⚑

the Network Audio System server attaches special meaning to the following signals:

  • SIGHUP β€” this signal causes the server to close all existing connections, free all resources, and restore all defaults. factory reset energy, dramatic but necessary πŸ’…
  • SIGTERM β€” this signal causes the server to exit cleanly. graceful queen, no mess left behind ✨
  • SIGUSR1 β€” this signal is used quite differently from either of the above. when the server starts, it checks to see if it has inherited SIGUSR1 as SIG_IGN instead of the usual SIG_DFL. in this case, the server sends a SIGUSR1 to its parent process after it has set up the various connection schemes. she texts her mom when she's settled in, that's the vibe 🫢

😭 DIAGNOSTICS 😭

too numerous to list them all. literally. there are so many. we are not doing that today πŸ™ˆ


πŸ“ FILES πŸ“

  • /tmp/.sockets/audio* β€” Unix domain socket
  • /usr/adm/audio*msgs
  • /dev/audio β€” Audio device

πŸ”— SEE ALSO πŸ”—

nas(1), auinfo(1), auplay(1), auctl(1), nasd.conf(1)


πŸ’€ BUGS πŸ’€

  • if au dies before its clients, new clients won't be able to connect until all existing connections have their TCP TIME_WAIT timers expire. the way that this just *waits*… so real 😭
  • the current access control support is weak at best. ngl she's not passing the vibe check on security fr fr πŸ™ˆ

Copyright 1993, Network Computing Devices, Inc.


πŸ‘‘ AUTHORS πŸ‘‘

the Network Audio System server was originally written by Greg Renda and Dave Lemke, with large amounts of code borrowed from the sample X server. legends, both of them πŸ’œ

the sample X server was originally written by Susan Angebranndt, Raymond Drewry, Philip Karlton, and Todd Newman, from Digital Equipment Corporation, with support from a large cast. it has since been extensively rewritten by Keith Packard and Bob Scheifler, from MIT. the lore is DEEP, the collaboration is unmatched πŸŽ€


and that's the whole nasd(1) page, bestie β€” general commands manual, section 1, start to finish. you're officially in the know, go forth and serve audio like the icon you are πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from