From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id AFD2C94311 for ; Wed, 21 Feb 2024 17:08:17 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 895551BABC for ; Wed, 21 Feb 2024 17:07:47 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 21 Feb 2024 17:07:46 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 470904457F for ; Wed, 21 Feb 2024 17:07:46 +0100 (CET) Message-ID: <1ec7feb7-e3e2-4717-8bb2-fbfabbea95fc@proxmox.com> Date: Wed, 21 Feb 2024 17:07:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Christoph Heiss Cc: Proxmox VE development discussion References: <20240221110805.931925-1-a.lauterer@proxmox.com> <20240221110805.931925-19-a.lauterer@proxmox.com> <3bocddpb6wlnclu5frfje6qf6c6u5zu42ppxtczs2ocgnfwikn@4vfcgpnpwnj7> Content-Language: en-US From: Aaron Lauterer In-Reply-To: <3bocddpb6wlnclu5frfje6qf6c6u5zu42ppxtczs2ocgnfwikn@4vfcgpnpwnj7> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.060 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pve-devel] [PATCH v2 18/22] auto-installer: fetch: add gathering of system identifiers and restructure code X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Feb 2024 16:08:17 -0000 On 2/21/24 15:09, Christoph Heiss wrote: > While looking at this and reading the `dmidecode` manpage a bit, it > looks like everything collected here is also available under > /sys/devices/virtual/dmi/id as separate files, e.g. > > # ls /sys/devices/virtual/dmi/id/ > bios_date chassis_asset_tag product_name > bios_release chassis_serial product_serial > bios_vendor chassis_type product_sku > bios_version chassis_vendor product_uuid > board_asset_tag chassis_version product_version > board_name ec_firmware_release subsystem > board_serial modalias sys_vendor > board_vendor power uevent > board_version product_family > > Most of these file are even world-readable, just some (e.g. *_serial) > need root to read. So it could be a simple list of filenames to read > from there. > > So that could be a nice alternative to calling and parsing the > `dmidecode` output. The names of the files would also serve as good keys > for matching. Maybe you already considered it? Just wanted to throw this > in there. > > Not everything seems to be available there, e.g. "Boot-up State", "Power > Supply State" and "Thermal State", but at least everything which is > interesting to identify machines uniquely seems to be there. I did not check where dmidecode gets the info from. Thanks! This sounds even more suitable and easier to implement :) And AFAICT that should be all that is interesting to identify a system.