This is a short and simple Extension Attribute we're starting to use for Display serials. I don't believe all third-party displays will report a serial via system profiler, but Apple displays and a few third-party displays will.
#!/bin/sh
serial=`system_profiler SPDisplaysDataType | grep -i "Display Serial Number" | sed -e 's/^[ ]*//' | cut -d " " -f 4`
echo "<result>$serial</result>"