-
Notifications
You must be signed in to change notification settings - Fork 0
/
RelatorioSOeHW.sh
77 lines (77 loc) · 5.62 KB
/
RelatorioSOeHW.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/env bash
yum install -y lshw
reset
echo -e '\033[01;31m########################################################################################################'
echo '# Relatório SO e Hardware #'
echo '########################################################################################################'
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mSistema Operacional: \033[00;37m'$(uname -o)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mArquitetura: \033[00;37m'$(uname -i)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mVersão do Kernel: \033[00;37m'$(uname -r)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mHostname: \033[00;37m'$(uname -n)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mVersão do SO: \033[00;37m'$(uname -v)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mName: \033[00;37m'$USER
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mHD: \033[00;37m'$(df -h --total | grep total | awk '{print $2}')
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mMemoria Ram: \033[00;37m'$(free -m | grep Mem: | awk '{print $2}') 'Mb'
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mProcessador: \033[00;37m'$(lscpu | egrep 'Model name' | cut -d ':' -f 2)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mQuantidade de nucleos: \033[00;37m'$(nproc)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mFrequencia CPU: \033[00;37m'$(lscpu | egrep 'CPU MHz' | cut -d ':' -f 2) 'Mhz'
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mVersao do hardware da placa de rede: \033[00;37m'$(lshw -C network | egrep 'product' | cut -d ':' -f 2)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mMAC Ethernet: \033[00;37m'$(cat /sys/class/net/*/address)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mBarramento USB: \033[00;37m'$(lsusb)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mBios: \033[00;37m'
echo -e '\033[01;32m \033[00;37m'$(dmidecode -t 0 | grep Vendor)
echo -e '\033[01;32m \033[00;37m'$(dmidecode -t 0 | grep Version)
echo -e '\033[01;32m \033[00;37m'$(dmidecode -t 0 | grep Release)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mSistema: \033[00;37m'
echo -e '\033[01;32m \033[00;37m'$(dmidecode -t 1 | grep Manufacturer)
echo -e '\033[01;32m \033[00;37m'$(dmidecode -t 1 | grep Product)
echo -e '\033[01;32m \033[00;37m'$(dmidecode -t 1 | grep Version)
echo -e '\033[01;32m \033[00;37m'$(dmidecode -t 1 | grep Serial)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mPlaca Mae: \033[00;37m'
echo -e '\033[01;32m \033[00;37m'$(dmidecode -t 1 | grep Manufacturer)
echo -e '\033[01;32m \033[00;37m'$(dmidecode -t 1 | grep Product)
echo -e '\033[01;32m \033[00;37m'$(dmidecode -t 1 | grep Serial)
echo -e '\033[01;32m \033[00;37m'$(dmidecode -t 1 | grep UUID)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mBoot: \033[00;37m'
echo -e '\033[01;32m \033[00;37m'$(dmidecode -t 32 | grep Status)
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
disk=$(cat /sys/block/sda/queue/rotational)
if [[ $disk = 1 ]]; then
disk=HD
else
disk=SSD
fi
echo -e '\033[01;32mDisco Atual: \033[00;37m'
echo -e '\033[01;32m \033[00;37m'$(echo $disk)
lshw -short -C disk
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mInterface Firmware MOBO/SO: \033[00;37m'
if [ -d /sys/firmware/efi ]; then
echo 'UEFI'
else
echo 'BIOS'
fi
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'
echo -e '\033[01;32mDisco particionado em: \033[00;37m'
exec1=$(parted -l | grep Disco | awk $'{print $2 " " "de" " " $3 ","}')
exec2=$(parted -l | grep Tabela | awk $'{print $4}')
echo 'Disco: '$exec1 'particionado em: '$exec2
echo -e '\033[01;31m--------------------------------------------------------------------------------------------------------'