Command for inventory



  • hello,

    just wanna know if there is a command on how to show all the serial numbers of the board and all addons on a pfsense driven box. will be useful for inventory on an environment with pfsense as main router/firewall OSs.

    thanks


  • Rebel Alliance Developer Netgate

    In most cases it's difficult or impossible to determine all of that.

    Though you can try running "kenv" and/or "dmidecode" and see what shows up there. On devices we sell in the pfSense store, the serial number is stored there. Peripherals are not so easy. You might get some info about USB devices from "usbconfig dump_device_desc", the hard drive serial may show up in smartctl output.



  • This is about the best you will get.

    https://www.freebsd.org/doc/handbook/kernelconfig-devices.html

    If FreeBSD is the only installed operating system, use dmesg(8) to determine the hardware that was found and listed during the boot probe. 
    Most device drivers on FreeBSD have a manual page which lists the hardware supported by that driver. 
    For example, the following lines indicate that the psm(4) driver found a mouse:
    
    psm0: <ps 2="" mouse="">irq 12 on atkbdc0
    psm0: [GIANT-LOCKED]
    psm0: [ITHREAD]
    psm0: model Generic PS/2 mouse, device ID 0
    Since this hardware exists, this driver should not be removed from a custom kernel configuration file.
    
    If the output of dmesg does not display the results of the boot probe output, instead read the contents of /var/run/dmesg.boot.
    
    Another tool for finding hardware is pciconf(8), which provides more verbose output. For example:
    % pciconf -lv
    ath0@pci0:3:0:0:        class=0x020000 card=0x058a1014 chip=0x1014168c rev=0x01 hdr=0x00
        vendor     = 'Atheros Communications Inc.'
        device     = 'AR5212 Atheros AR5212 802.11abg wireless'
        class      = network
        subclass   = ethernet</ps> 
    


  • dmidecode atleast shows the sn of the board…thanks jimp..will try the rest