[Xymon] get server serial no in xymon
    Richard L. Hamilton 
    rlhamil2 at gmail.com
       
    Sat May 25 04:48:58 CEST 2019
    
    
  
> On May 24, 2019, at 22:31, Richard L. Hamilton <rlhamil2 at gmail.com> wrote:
> 
> Hmm.  MacPorts has it (I think homebrew might too, not sure about fink).  This worked for me:
> dmidecode -t system 2>/dev/null | awk '/Serial Number:/ {print $NF}'
> 
> The 2>/dev/null was because it kept spitting out a "Bad address" message, although it otherwise worked fine.
> 
This works better in case there are spaces in the serial number (there were in my Linux VM's under Parallels on my Macs), and still works on MacOS itself:
dmidecode -t 1 2>/dev/null | sed -n -e 's/.*Serial Number: *//p'
    
    
More information about the Xymon
mailing list