[Xymon] get server serial no in xymon

Richard L. Hamilton rlhamil2 at gmail.com
Sat May 25 04:31:45 CEST 2019


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.

Oh, and the Windows command did work for me once I figured out that the examples I saw were missing a space.  It should be

wmic bios get SerialNumber

(although SerialNumber isn't case-sensitive)

> On May 24, 2019, at 21:40, Bruce Ferrell <bferrell at baywinds.org> wrote:
> 
> 
> On Linux systems (even VMs) dmidecode is a good bet.  It works on Macs too, if it's installed and the output is VERY regular and standardized
> 
> 
> On 5/24/19 6:14 PM, Richard L. Hamilton wrote:
>> Having been provoked by the question, I dug further...which still doesn't mean it's always possible!  Here's my notes to date:
>> 
>> MacOS (at least 10.6 and later, Intel):
>>     /usr/sbin/ioreg -l|sed -n -e 's/.*IOPlatformSerialNumber" = "\([^"]\{1,\}\)"$/\1/p'
>> 
>> Solaris on T5240 (probably most sun4v, maybe even genuine Sun x86 hardware, that has a system controller
>> that responds to ipmitool):
>>     ipmitool -H _system_controller_hostname_ -U _user_ -P _password_  sunoem getval /SYS/product_serial_number|sed -e 's/.*alue: *//'
>>     (substitute for the _tokens_ above the actual values described)
>>     note: this requires a version of ipmitool that supports "sunoem"
>> 
>> Linux (no guarantees, since not all PCs can provide software-readable hardware serial number, and Linux runs on lots of systems that aren't PCs):
>>     see https://www.2daygeek.com/how-to-check-system-hardware-manufacturer-model-and-serial-number-in-linux/
>>     (for VMs, the results will depend on the VM hosting software, and may not be obviously meaningful)
>> 
>> Windows:
>>     see https://www.howtogeek.com/294712/how-to-find-your-windows-pcs-serial-number/
>> 
>> Various:
>>     see http://kb.mit.edu/confluence/pages/viewpage.action?pageId=152578725
>> 
>> Solaris x86 on Sun hardware (haven't tried):
>>     see https://www.linuxquestions.org/questions/solaris-opensolaris-20/how-to-find-machine-serial-number-of-solaris-machine-642552/
>> 
>> Comment:
>> The Macs, which in some respects aren't that amenable to large-scale management (nothing quite equivalent to Windows policies in Active Directory, for example), are by far the best about this, IMO. Probably that's because anyone placing a trouble call will need that info, and with Macs, that might be done by an end user themselves...who would doubtless just use Apple Menu -> About This Mac to do it with the GUI, rather than using the command line at all. Of course, having the serial in the Xymon history is nice if the system is down and won't respond to queries, and your other records are too unreliable to find it easily.  But given the difficulty of getting it into Xymon for that or similar purposes on enough physical platforms, I don't see that there's a lot of hope in it for that purpose.
>> 
>> 
>>> On May 24, 2019, at 19:42, David Boyer <davieb at gmail.com <mailto:davieb at gmail.com>> wrote:
>>> 
>>> Yea, what he said! ;-)
>>> 
>>> Dave
>>> 
>>> On Fri, May 24, 2019 at 6:15 PM Richard L. Hamilton <rlhamil2 at gmail.com <mailto:rlhamil2 at gmail.com>> wrote:
>>> 
>>>    Not consistently; depends on that system's make, model, and OS.  For instance, on my Sun SPARC systems, I can do it on the T5240 (using ipmitool to talk to its system
>>>    controller; on x86 Sun systems, smbios might be used instead), but not the Sun Blade 100 or Sun Blade 2000 (although if you google solaris sneep, you'll find a tool that
>>>    will let you manually store it in the eeprom, where it's easily enough retrievable). On PCs, and esp. with the convoluted (to my mind) nature of Windows, to say "your
>>>    results may vary" is understating it - I looked up a trick for doing that (at command prompt, wmic bios getserialnumber) and it failed.  Some systems may not even make the
>>>    serial number visible to software at all.
>>> 
>>>    > On May 24, 2019, at 17:34, Yadvendra kushwaha <yyyadvendra at gmail.com <mailto:yyyadvendra at gmail.com>> wrote:
>>>    >
>>>    > Hi Guys
>>>    > Is there any way to pull out server serial no under info section in xymon?
>>>    >
>>>    > Thanks
>>>    >
>>>    > _______________________________________________
>>>    > Xymon mailing list
>>>    > Xymon at xymon.com <mailto:Xymon at xymon.com>
>>>    > http://lists.xymon.com/mailman/listinfo/xymon
>>> 
>>>    _______________________________________________
>>>    Xymon mailing list
>>>    Xymon at xymon.com <mailto:Xymon at xymon.com>
>>>    http://lists.xymon.com/mailman/listinfo/xymon
>>> 
>> 
>> 
>> _______________________________________________
>> Xymon mailing list
>> Xymon at xymon.com
>> http://lists.xymon.com/mailman/listinfo/xymon
> 
> 
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon



More information about the Xymon mailing list