I tried -23 on an existing mixed but not mastered track and it knocked the whole thing down by about 6dB. What does that mean?
I think it must mean that the track started out around -17 LUFS, so when you requested -23 it dropped the level by 6dB to get to -23.
Is there a program I can use to measure the LUFs of an existing track?
If I recall correctly you are running Debian or Ubuntu based linux distributions, at least on some of your machines.
There is a linux package called ebumeter which has both a real time meter (ebumeter, connected using jackd) and an offline CLI tool (ebur128) that will analyze a file for you. The only limitation I don't like is that the tools do not have true peak analysis (i.e. analyzing after upsampling to evaluate inter-sample peak values). If your distribution package manager does not have ebumeter available you can download the source here:
EBUMeter source download
You may have to download some of the support libraries from the same author to build, but I can't remember off the top of my head (my distribution includes it, so I haven't needed to build it)
all Fons Adrienson source downloads
There are others, the Ardour DAW includes loudness analysis (with true peak evaluation) on export, and newer versions have a button to check at any time you want.
I believe you said you use Audacity, according to this
document from Google there is a loudness meter which works as a plugin for Audacity, but it seems to be Windows/Mac only:
dpMeter
You can use ffmpeg to both analyze and adjust the audio, but the ffmpeg command line options tend to be a little convoluted for me.
Using ffmpeg for loudness analysis
ffmpeg loudness filter documentation
My recommendation:
sudo apt-get install -y ebumeter
Then run ebur128 <audio_filename> from a terminal.