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

  • 相关阅读:
    65 组件 静态文件相关 视图
    作者和书籍的增删改查 多对多
    64 装饰器函数: 母版 csrf防御机制 cookie
    61 书籍和出版社 的增删改查 几秒后跳转一个页面
    60 Django项目 单表(出版社)的增删改查 __str__方法及格式化输出 的两个方法
    模块 itertools
    59 Django基础三件套 , 模板{{}}语言 , 程序连mysql Django项目app Django中ORM的使用
    nginx 并发数
    设置tomcat最大内存
    goaccess安装
  • 原文地址:https://www.cnblogs.com/arcer/p/3563857.html
Copyright © 2011-2022 走看看