首页 > 代码库 > centos 查看脚本
centos 查看脚本
centos 查看脚本
#!/bin/bash
date >>info.txt
echo "本机centos版本为" >>info.txt
cat /etc/issue >>info.txt
cat /etc/redhat-release >>info.txt
rpm -q centos-release. >>info.txt
echo "本机centos 版本详细信息" >>info.txt
cat /proc/version >>info.txt
echo "本机centos为32位还是64位" >>info.txt
getconf LONG_BIT >>info.txt
echo "本机内核版本详细信息" >>info.txt
uname -a >>info.txt
echo "本机cpu名称" >>info.txt
more /proc/cpuinfo | grep "model name" >>info.txt
echo "本机cpu位数" >>info.txt
getconf LONG_BIT >>info.txt
echo "本机cpu逻辑个数" >>info.txt
cat /proc/cpuinfo | grep "processor" | wc -l >>info.txt
echo "本机cpu物理个数" >>info.txt
cat /proc/cpuinfo | grep "physicalph id" | sort | uniq | wc -l >>info.txt
echo "本机每个物理cpu的核数cores" >>info.txt
cat /proc/cpuinfo | grep "cpu cores" >>info.txt
getconf LONG_BIT >>info.txt
yum install dmidecode -y
echo "本机内存插槽数以及内存分别多大" >>info.txt
dmidecode|grep -P -A5 "Memory\s+Device"| grep Size | grep -v Range >>info.txt
echo "本机支持最大内存为" >>info.txt
dmidecode | grep -P ‘Maximum\s+Capacity‘ >>info.txt
echo "本机内存条的频率 备注:主板兼容内存频率,并非真实内存频率" >>info.txt
dmidecode | grep ‘Speed‘ >>info.txt
echo "本机硬盘分区情况" >>info.txt
lsblk >>info.txt
echo "本机硬盘使用情况" >>info.txt
df -h >>info.txt
yum install -y curl
echo "本机公网IP为" >>info.txt
curl icanhazip.com >>info.txt
centos 查看脚本
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。