zoukankan      html  css  js  c++  java
  • linux基本信息查询

    1、通过fdisk命令查看

    [root@gaosheng bjdb_script]# fdisk -l
    
    Disk /dev/sda: 32.2 GB, 32212254720 bytes
    255 heads, 63 sectors/track, 3916 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        3394    27262273+  83  Linux
    /dev/sda2            3395        3916     4192965   82  Linux swap / Solaris
    [root@gaosheng bjdb_script]# 

     参考文章

    参考文章二

    参考文章三

    2、如何查看物理内存的个数

    /*
      有几个Size值,就表示有几个物理内存条
    */

    A机器

    [root@fboccserver64 ~]# dmidecode |grep -A16 "Memory Device$" | grep Size
            Size: 4096 MB
            Size: 4096 MB
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: 4096 MB
            Size: No Module Installed
            Size: 4096 MB
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
    [root@fboccserver64 ~]#

    B机器

    [root@fbccserver ~]# dmidecode |grep -A16 "Memory Device$" | grep Size
            Size: 4096 MB
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: 4096 MB
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed

    C机器 

    [root@fbccserver ~]# dmidecode |grep -A16 "Memory Device$" | grep Size
            Size: 4096 MB
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: 4096 MB
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
            Size: No Module Installed
    [root@fbccserver ~]# 

     查看CPU大小型号和相关信息

    --查看物理cpu的个数
    cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

    --查看逻辑cpu的个数
    cat /proc/cpuinfo | grep "processor" | wc -l

    --物理内存查看方法
    top

    --查看内存信息方法
    cat /proc/meminfo

    --查看CPU大小型号和相关信息
    dmidecode -t 4

    --查看物理内存个数
    /*
    有几个Size值,就表示有几个物理内存条
    */
    dmidecode |grep -A16 "Memory Device$" | grep Size

    --Linux查看CPU信息、机器型号等硬件信息

    查看linux系统版本命令

  • 相关阅读:
    HTML Rendering Error
    PyCharm将选中的内容加上引号
    Scrapy中的Request和日志分析
    PyCharm关闭按两次Shift进入搜索框的功能
    博客园更换模板的链接
    Scrapy的Spider类和CrawlSpider类
    Scrapy安装和简单使用
    计算π的近似值
    Python用pip安装第三方库时换源下载
    网页解析 -- bs4 和 xpath 的简单使用
  • 原文地址:https://www.cnblogs.com/arcer/p/3563857.html
Copyright © 2011-2022 走看看