Quick way to get specs and serial number from laptop

×

Statusmeldung

You are not a member of this team. If you want to be part of this team, click on 'Subscribe to this team'.

Hi,

Is there any trick to quickly get the specifications form a laptop?
I heard some volunteers keep a script in the labtix pendrive which returns this info very easily to help tag them
Thanks

Kommentare

Bild des Benutzers tinplate
Gespeichert von tinplate am Mi, 05/13/2020 - 10:48

I'm using a script I created to get the techincal specs easily.
I have attached the script in this comment.
I have created the folder "scripts" in my Labtix USB drive. There, I have this scripts (names "get_info.sh").

Once Labdoo is installed in the laptop, I plug the USB drive, open a terminal, and execute:
sudo sh /media/labdoo/ANTIXLIVE/scripts/get_info.sh

It will execute some commands to display the technical specifications of the computer.
Hope this helps!
M

Bild des Benutzers tinplate
Gespeichert von tinplate am Mi, 05/13/2020 - 10:49

I'm having problems attaching the script file, so this is the code:
echo "-----------------------------------------------"
echo "Product Name:"
echo "-----------------------------------------------"
dmidecode -t system | grep "Family"
dmidecode -t system | grep "Product Name"

echo "-----------------------------------------------"
echo "Serial number:"
dmidecode -t system | grep Serial
echo "-----------------------------------------------"

echo "CPU speed:"
dmidecode -t processor | grep "Current Speed"
echo "-----------------------------------------------"

echo "Number of cores:"
dmidecode -t processor | grep "Core Count"
dmidecode -t processor | grep "Version"
echo "-----------------------------------------------"

echo "Memory:"
echo "* from meminfo:"
awk '$3=="kB"{$2=$2/1024;$3="MB"} 1' /proc/meminfo | column -t | grep MemTotal
echo "* from dmidecode:"
dmidecode -t 17 | grep "Size.*MB"
#| awk '{s+=$2} END {print s / 1024 "GB"}'

echo "-----------------------------------------------"

echo "Disk space:"
parted /dev/sda print | grep "/dev/sda"

Bild des Benutzers Rhein-Ruhr-Hub
Gespeichert von Rhein-Ruhr-Hub am Mi, 05/13/2020 - 12:44

Hi,

I am answering for Thomsen, one of the Labtix developer of Labdoo (Germany):

There are several ways to get information about donated hardware:

  1. A look into the BIOS/UEFI can give informations about the device e.g. the used CPU, its speed or informations about the motherboard or the amount of installed memory. On some devices there are even informations about the serial-number etc. , but not on all.
  2. Using labtix there is a program called inxi that gives a lot of information. Open a terminal (Ctrl+Alt+T) and type:

    The "5" indicates the verbosity level of the output from inxi, the maximum level is "7"

    The information you can get is specified by the manufacturer, so on different devices you might get acces to different informations. So it is useless to make a script for that.

  3. To get informations about the cpu simply type lscpu into the terminal.
    The interesting information is in the second line ( 32_Bit , 64_Bit ) and the lines "sockets" and "Cores per Socket". You have to multeply this both values to get the amount of cores in the cpu. The "CPU"-Line represents the threads the cpu can handle, not the amout of cores !
  4. There's another terminal-program called dmidecode:

    sudo dmidecode
    It gives a very deep view inside the hardware, but like inxi it depends on the information the manufacturer puts into the BIOS/UEFI/Firmware.

  5. There is a graphical tool called "hardinfo" on the Labtix desktop. In my opinion working with the terminal is much faster because you don't need a lot of mouseclicks to get the informations you want.
  6. The value for the amount of installed memory shown in the conky-output in the upper right corner might be incorrect because for some reasons labtix is a 32_Bit OS that cannot recognize more than 4 Gbytes of RAM. If you need the correct amount and you don't want to open the device use the terminal command "free" in the fresh installed Labdoo Desktop.

best regards

thomsen

Bild des Benutzers jprisab
Gespeichert von jprisab am Mi, 05/13/2020 - 19:29

Hello Marcos,
In the autodeploy script included in Labtix I use the following commands:
(you can see it in the GitHub project https://github.com/jprisab/labdoo_labtix/blob/master/autodeploy_18.sh and contribute to it ;)

###
# PART6: Since the deletion is going to start and give you some time, gather the parameters, in case you want to copy down
###
#Javier: Collect and show some info, to make the wait a bit shorter :)
no_of_CPU_cores=`lscpu | grep -m 1 "CPU(s)" | awk -F ' ' '{print $2}'`

CPU_freq_max_MHz=`lscpu | grep -m 1 "MHz:" | awk -F ' ' '{print $3}' | awk -F ',' '{print $1}'`

DISK_size_Gb=`lsblk -b --output SIZE -n -d /dev/$target_disk`
DISK_size_Gb=$((DISK_size_Gb / 1000000000))

MEM_size_Mb=`free mem | grep -m 1 "Mem:" | awk -F ' ' '{print $2}'`
MEM_size_Mb=$((MEM_size_Mb / 1000))

SERNUM=`dmidecode -s system-serial-number`

echo "--------------------------------------------------"
echo " These are the current values, you might want to write them down"
echo "--------------------------------------------------"
echo "Nr of CPU cores: $no_of_CPU_cores"
echo "CPU max Freq: $CPU_freq_max_MHz [MHz]"
echo "HD Size: $DISK_size_Gb [Gb]"
echo "MEM_size_Mb: $MEM_size_Mb [Mb]"
echo "Serial Number: $SERNUM"
echo "--------------------------------------------------"