查看系统信息等命令

查看ip和连接数

netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

查看 centos 版本信息

[root@localhost ~]# lsb_release -a
LSB Version:     :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID:     CentOS
Description:     CentOS release 6.4 (Final)
Release:     6.4
Codename:     Final

查看 CPU 位数

getconf LONG_BIT

查看内存大小

top

查看逻辑cpu个数:

cat /proc/cpuinfo | grep "processor" | wc -l

查看物理cpu个数:

cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

查看每个物理cpu的核数cores:

cat /proc/cpuinfo | grep "cpu cores"

1.查看物理cpu个数

grep 'physical id' /proc/cpuinfo | sort -u | wc -l

2.查看核心数量

grep 'core id' /proc/cpuinfo | sort -u | wc -l

3.查看线程数

grep 'processor' /proc/cpuinfo | sort -u | wc -l

4.查看cpu型号

dmidecode -s processor-version

5.实例
命令执行结果如图所示,根据结果得知,此服务器有1个cpu,6个核心,每个核心2线程,共12线程。
通过dmidecode可以查看cpu型号,根据型号也可以查到这个cpu的具体参数

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值