首页 > 系统服务 > 详细

linux查看硬件配置命令

时间:2019-02-17 00:27:02      阅读:185      评论:0      收藏:0      [点我收藏+]

 

1、查看服务器的CPU

  • 查看CPU信息:cat /proc/cpuinfo
  • 物理cpu个数:cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
  • 每个物理cpu中core的个数(即核数):cat /proc/cpuinfo | grep "cpu cores" | uniq

  服务器的逻辑CPU = 物理个数 * 核数

2、查看服务器的内存情况 

  [root@localhost ~]# free -h
      total     used      free      shared       buff/cache        available
  Mem:     15G     857M     12G   23M           1.5G                 13G

  参数解释:

  • total 内存总数
  • used 已经使用的内存数
  • free 空闲的内存数
  • shared 多个进程共享的内存总额
  • buffers Buffer Cache和cached Page Cache 磁盘缓存的大小
  • -buffers/cache (已用)的内存数:used - buffers - cached
  • +buffers/cache(可用)的内存数:free + buffers + cached
  • 可用的memory=free memory+buffers+cached

3、服务器磁盘使用情况

  • 查看当前硬盘使用情况: df –h
  • 查看硬盘性能:iostat -x 1 10

4、查看环境变量

  • 查看环境变量:env 

5、网络

  • 查看所有网络接口的属性:ifconfig 
  • 查看防火墙设置:iptables -L
  • 查看路由表:route -n
  • 查看所有监听端口:netstat -lntp
  • 查看所有已经建立的连接:netstat -antp
  • 查看网络统计信息:netstat -s

 

linux查看硬件配置命令

原文:https://www.cnblogs.com/merely/p/10389865.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!