首页 > 系统相关 >linux服务器出厂测试抓包

linux服务器出厂测试抓包

时间:2022-11-30 13:44:43浏览次数:39  
标签:info grep FW 出厂 dmidecode linux print egrep 抓包

注:适用于超微x86_64主板,已测阿里龙蜥8.4,华为欧拉20.03,centos7,centos8,细节部分根据自己实际情况调整

[root@test ~]# cat TheServer_test_supermicro_x86_64.sh
Baseboard_info=$(dmidecode 2>/dev/null | egrep -iA9 'Base Board Information|System Information' | grep -i Manufacturer|sort |uniq| awk -F: '{print $2}')
Baseboard_name=$(dmidecode 2>/dev/null | egrep -iA9 'Base Board Information|System Information' | grep -i 'Product Name'|sort |uniq| awk -F: '{print $2}')
Cpu_info=$(lscpu |grep '^Model name' |cut -d: -f2|sed 's/^ *//')
Cpu_num=$(cat /proc/cpuinfo|grep 'physical id'|sort|uniq|wc -l)
Memory_info=$(dmidecode -t memory|grep  'Volatile Size'|egrep -v 'No Module Installed|None')
Memory_num=$(dmidecode -t memory|grep  'Volatile Size'|egrep -v 'No Module Installed|None'|wc -l)
MegaRAID_info=$(storcli /c0 show | grep MegaRAID|awk -F'Mega' '{print $2}')
QLogic_info=$(lspci -vv 2> /dev/null | grep  QLE)
Ethernet_info=$(lspci -vv 2> /dev/null|grep Ethernet)
Disk_info=$(storcli /call/eall/sall show | grep -A100 -B1 'EID:Slt' | egrep -v '^$|=')

RAID_cfg=$(storcli /c0 show | grep -A100 TOP|grep -B100 'VD LIST'|grep -vE '^$|=|LIST|TOP')
RAID_FW=$(storcli /c0 show | grep 'FW Version' | awk -F= '{print $NF}')
Qlogic_FW=$(qaucli -pr fc -i all|egrep 'Flash Firmware Version|Running Firmware Version')
Ethernet_FW=$(net_card=$(ip a|awk -F ': ' '{print $2}'|grep ^e);for i in $net_card;do echo "${i}的firmware-version:";ethtool -i $i|awk -F ": " '/^firmware/{print $2}' ;done)
sys_info=$(uname -r;cat /etc/system-release  /etc/redhat-release 2>/dev/null|sort|uniq)
bios_version=$(dmidecode -s bios-version)
bios_info=$(dmidecode -t bios|egrep -v '^$|^#')
memory_info_add=$(dmidecode -t memory|egrep 'Locator|Configured Memory Speed:|Manufacturer:|Memory Technology:|Volatile Size:'|egrep -v 'Unknown|None|Node')
CPU_info_add=$(lscpu |egrep '^Architecture:|^CPU\(s\):|^On-line CPU\(s\) list:')
IPMI=$(ipmitool lan print |grep '^IP Address')


echo "
主板厂商: $Baseboard_info 主板型号: $Baseboard_name
系统信息: $sys_info bios版本:$bios_version CPU型号: $Cpu_info cpu数量: $Cpu_num cpu其他信息: $CPU_info_add 内存: $Memory_info 内存条数量: $Memory_num 其他内存信息: $memory_info_add RAID卡:$MegaRAID_info RAID卡FW: $RAID_FW RAID组: $RAID_cfg 光纤卡: $QLogic_info 光纤卡FW: $Qlogic_FW 网卡: $Ethernet_info 网卡FW: $Ethernet_FW 硬盘: $Disk_info IPMI地址: $IPMI "

 

标签:info,grep,FW,出厂,dmidecode,linux,print,egrep,抓包
From: https://www.cnblogs.com/santia-god/p/16938144.html

相关文章

  • 初学者需掌握的12条基本 Linux 命令
    对于初学者来说,在Linux中使用命令行进行操作,很容易就会出错,有时候这种错误会带来灾难性的后果。比如,让你尝试删除某个文件夹的时候,使用了rm-rf*,而恰巧,你当前在根路径下........
  • VMware虚拟机上安装Linux系统
    VMware虚拟机上安装Linux系统......
  • 性能测试中常用的linux命令
    在做性能测试中有没有遇到分析需求的情况,如果有,下面这几个命令就能帮助到您啦,我们直奔主题1.grep 作用:搜索工具 用法:grep“搜索的关键词” 2.awk 作用:分析工......
  • Linux- Nginx简单的负载均衡(一)
    这里先进行简单的nginx负载,安装nginx这里就不多说了,我们情景假设在已经安装好了nginx上:1)查询nginx中的upstrea负载均衡模块 默认是有安装的。进入nginx源码目录中./config......
  • apache 日志轮询 linux cronolog
    Linux下运行的Web服务器Apache,默认日志文件是不分割的,一个整文件既不易于管理,也不易于分析统计。安装cronolog后,可以将日志文件按时间分割,易于管理和分析。cronolog安装配置......
  • linux进程管理(一)
    进程介绍程序和进程程序是为了完成某种任务而设计的软件,比如OpenOffice是程序。什么是进程呢?进程就是运行中的程序。一个运行着的程序,可能有多个进程。比如自......
  • Linux NFS服务器的安装与配置
    最近用到了nfs的文件共享和数据分发,一个简单的分发步骤如下【测试通过】:1)查看NFS软件包是否安装:rpm-aqnfs-utilsportmaprpcbind2)NFS依赖于rpcbind服务,所以检查rpc服......
  • How to Install Python on Linux
    SummaryHostmonsterusesthepreinstalledversionofPythonthatshipswithCentOS.Becauseofthisitisoftennotthelatestrelease.Thisarticlewillexplain......
  • Linux软件安装
    1.RPM安装1.1RPM包管理工具   Red-HatPackageManager由RedHat公司提出,被众多Linux发行版所采用建立统一的数据库文件(一张对应表将信息写入)详细记录软件包安装......
  • linux中安装doker
    1.更新yum为最新的yum-yupdate 2.卸载旧版的dockersudoyumremove-ydocker* 3.安装需要的软件包yuminstall-yyum-utils 4.设置yum源,并更新yum的包索......