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系统版本命令

  • 相关阅读:
    QT *.pri 语法学习
    qt 的相对路径说法
    openwrt 时间更新
    openwrt network 初始化
    在线配置热加载配置 go-kratos.dev 监听key 通过atomic.Value支持自动热加载
    Monkey patching
    UDP flood UDP Port Denial-of-Service Attack
    一例 Go 编译器代码优化 bug 定位和修复解析
    t
    golang 网络编程之如何正确关闭tcp连接以及管理它的生命周期 socket
  • 原文地址:https://www.cnblogs.com/arcer/p/3563857.html
Copyright © 2011-2022 走看看