you can do this quickly on the command line by running curl against your server with the -I option which will just print the headers and the -s option to prevent the connection info from being displayed. Then we send it to grep to see if there is an X-Mod-Pagespeed header.
curl -Is http://IP.AD.DR.ES/ | grep X-Mod-Pagespeed
if you want to make this easier to use you could use the following shell script which takes a server as the first parameter and a string to match in the output as the second.
#!/bin/bash
HEADERS=$(curl -Is $1)
RETURN=1
echo "Fetched these headers from $1":
echo "$HEADERS"
if [[ $( echo "$HEADERS" | grep $2) ]]
then
echo "$1 returns the $2 header"
RETURN=0
else
echo "$2 header not found"
RETURN=1
fi
exit $RETURN
You can then run it as
script http://server/ X-Mod-Pagespeed
adjust the return values to suit if you need specific responses and remove the echo statements if they are making the output harder to read.