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 查看脚本的更多相关文章

  1. centos shell脚本编程1 正则 shell脚本结构 read命令 date命令的用法 shell中的逻辑判断 if 判断文件、目录属性 shell数组简单用法 $( ) 和${ } 和$(( )) 与 sh -n sh -x sh -v 第三十五节课

    centos   shell脚本编程1 正则  shell脚本结构  read命令  date命令的用法  shell中的逻辑判断  if 判断文件.目录属性  shell数组简单用法 $( ) 和$ ...

  2. centos查看设置端口开放状态

    centos查看端口是否已开放/etc/init.d/iptables status centos开放端口/sbin/iptables -I INPUT -p tcp --dport 8000 -j ...

  3. Centos查看端口占用情况和开启端口命令

    Centos查看端口占用情况命令,比如查看80端口占用情况使用如下命令: lsof -i tcp:80 列出所有端口 netstat -ntlp 1.开启端口(以80端口为例)方法一: /sbin/i ...

  4. CentOS查看端口是否被占用

    CentOS查看端口是否被占用 本文介绍了linux中查看某一端口是否被占用的方法,有关netstat命令的使用技巧,感兴趣的朋友可以参考下. 使用命令: netstat -tunlp 会显示所有端口 ...

  5. [转帖]CentOS 查看系统信息汇总

    CentOS 查看系统信息汇总 http://blog.itpub.net/15498/viewspace-2637493/ 感觉应该是 centos相关的 改了下名字 日志文件说明 /var/log ...

  6. Centos查看端口占用和开启端口命令

    Centos查看端口占用情况命令,比如查看80端口占用情况使用如下命令: lsof -i tcp:80 列出所有端口 netstat -ntlp 1.开启端口(以80端口为例) 方法一: /sbin/ ...

  7. [转]Centos 查看端口占用情况和开启端口命令

    http://www.cnblogs.com/xqzt/p/4919191.html 1.Centos 查看端口占用 比如查看 80 端口占用情况使用如下命令: lsof -i tcp:80 2.列出 ...

  8. centos shell脚本编程2 if 判断 case判断 shell脚本中的循环 for while shell中的函数 break continue test 命令 第三十六节课

    centos  shell脚本编程2 if 判断  case判断   shell脚本中的循环  for   while   shell中的函数  break  continue  test 命令   ...

  9. Centos查看端口占用和关闭端口

    Centos查看端口占用情况命令,比如查看80端口占用情况使用如下命令:   lsof -i tcp:80   列出所有端口   netstat -ntlp   1.开启端口(以80端口为例)     ...

随机推荐

  1. WKWebView浅析

    原文链接:supermokey WKWebView 一个WKWebView对象展示交互的web内容,例如应用于app内的浏览器.你可以在你的App中使用WKWebView. 综述 Important: ...

  2. 最新Android系统版本与API等级对应关系表

    最新Android系统版本与API等级对应关系表 从Android官网拷过来的,方便查阅... 官网地址:https://developer.android.com/guide/topics/mani ...

  3. js的replace函数入参为function时的疑问

    近期在写js导出excel文件时运用到replace方法,此处详细的记录下它各个参数所代表的的意义. 定义和用法 replace() 方法用于在字符串中用一些字符替换另一些字符,或替换一个与正则表达式 ...

  4. (五)什么是RDD-Java&Python版Spark

    什么是RDD 视频教程: 1.优酷 2.YouTube RDD是个抽象类,全称为Resilient Distributed Datasets,是一个容错的.并行的数据结构,可以让用户显式地将数据存储到 ...

  5. id,clientid 和 uniqueid 的区别

    一. ID是设计的时候所指定的ID. ClientID是当这个控件生成到客户端页面时候,需要在客户端访问时候用的. UniqueID是当需要参与服务端回传的时候用的. 备注:当控件是子控件的时候(例如 ...

  6. Oracle计算两个时间戳相差秒数,精确到毫秒

    with t as (select to_timestamp('2015-01-01 11:13:15.023456', 'yyyy-mm-dd hh24:mi:ss.ff9') t1, to_tim ...

  7. github常用操作

    1.创建一个新的repository: $cd ~/hello-world        //到hello-world目录,本地目录名与repository的名字不一定相同 $git init    ...

  8. java工具类

    1.HttpUtilsHttp网络工具类,主要包括httpGet.httpPost以及http参数相关方法,以httpGet为例:static HttpResponse httpGet(HttpReq ...

  9. webpack入门——webpack的安装与使用

    一.简介 1.什么是webpack webpack是近期最火的一款模块加载器兼打包工具,它能把各种资源,例如JS(含JSX).coffee.样式(含less/sass).图片等都作为模块来使用和处理. ...

  10. [LeetCode] H-Index II 求H指数之二

    Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize ...