initial commit; version 22.5.12042
This commit is contained in:
20
scripts/agent-local/dmi
Executable file
20
scripts/agent-local/dmi
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# report hardware information
|
||||
# requires dmidecode
|
||||
|
||||
dmidecode=`which dmidecode`
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
# Check if we can read from /dev/mem. The command should not be:
|
||||
# head: cannot open `/dev/mem' for reading: Operation not permitted
|
||||
# This is a problem on virtual instances.
|
||||
# if [ `head -c1 /dev/mem 2>&1 | awk '{print $1}'` -eq 'head:' ]
|
||||
# then
|
||||
echo '<<<dmi>>>'
|
||||
for FIELD in bios-vendor bios-version bios-release-date system-manufacturer system-product-name system-version system-serial-number system-uuid baseboard-manufacturer baseboard-product-name baseboard-version baseboard-serial-number baseboard-asset-tag chassis-manufacturer chassis-type chassis-version chassis-serial-number chassis-asset-tag processor-family processor-manufacturer processor-version processor-frequency
|
||||
do
|
||||
echo $FIELD=$($dmidecode -s $FIELD|grep -v ^\#)
|
||||
done
|
||||
# fi
|
||||
fi
|
Reference in New Issue
Block a user