Locate Dell Service Tag: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
(Created page with "On a Linux Platform <pre> yum -y install dmidecode </pre> <pre> dmidecode | grep -i serial </pre> Category : Linux")
 
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
On a Linux Platform
= Linux Platform =
<pre>
<pre>
yum -y install dmidecode
yum -y install dmidecode
Line 5: Line 5:


<pre>
<pre>
dmidecode | grep -i serial
dmidecode -s system-serial-number
</pre>
</pre>


[[Category : Linux]]
== Script ==
<pre>
vi /usr/bin/details
</pre>
 
<pre>
#!/bin/bash
 
boot=$(uptime -s)
up=$(uptime -p)
zone=$(date +%Z )
gmt=$(date +%z)
 
model=$(dmidecode -s system-product-name)
tag=$(dmidecode -s system-serial-number)
bios=$(dmidecode -s bios-version)
cpu=$(dmidecode -s  processor-version)
hn=$(hostname)
ram=$(dmidecode -t 17 | awk '( /Size/ && $2 ~ /^[0-9]+$/ ) { x+=$2 } END{ print x "MB"}')
os=$(cat /etc/redhat-release)
kern=$(uname -r)
 
echo
echo '==============================================================='
echo -e ' ' $model
echo '==============================================================='
echo -e 'System Boot :' $boot ' ('$zone','$gmt')'
echo -e '    Uptime :' $up
echo
echo -e '  Hostname :' $hn
echo -e 'Service Tag :' $tag
echo -e '      BIOS :' $bios
echo -e '        CPU :' $cpu
echo -e '        RAM :' $ram
echo -e '        OS :' $os
echo -e '    Kernel :' $kern
echo
echo
</pre>
 
<pre>
chmod +x /usr/bin/details
</pre>
 
= Windows Platform =
From a Command Prompt
<pre>
wmic bios get serialnumber
</pre>
 
[[Category : Linux]] [[Category : Windows]] [[Category : Dell]]

Latest revision as of 00:17, 10 August 2016

Linux Platform

yum -y install dmidecode
dmidecode -s system-serial-number

Script

vi /usr/bin/details
#!/bin/bash

boot=$(uptime -s)
up=$(uptime -p)
zone=$(date +%Z )
gmt=$(date +%z)

model=$(dmidecode -s system-product-name)
tag=$(dmidecode -s system-serial-number)
bios=$(dmidecode -s bios-version)
cpu=$(dmidecode -s  processor-version)
hn=$(hostname)
ram=$(dmidecode -t 17 | awk '( /Size/ && $2 ~ /^[0-9]+$/ ) { x+=$2 } END{ print x "MB"}')
os=$(cat /etc/redhat-release)
kern=$(uname -r)

echo
echo '==============================================================='
echo -e ' ' $model
echo '==============================================================='
echo -e 'System Boot :' $boot ' ('$zone','$gmt')'
echo -e '     Uptime :' $up
echo
echo -e '   Hostname :' $hn
echo -e 'Service Tag :' $tag
echo -e '       BIOS :' $bios
echo -e '        CPU :' $cpu
echo -e '        RAM :' $ram
echo -e '         OS :' $os
echo -e '     Kernel :' $kern
echo
echo
chmod +x /usr/bin/details

Windows Platform

From a Command Prompt

wmic bios get serialnumber