系统信息查看命令

一. 系统信息查看命令
查看磁盘剩余空间:df -hl
查看节点数(inode):df -li
查看内存:free
查看系统版本:lsb_release -a
查看linux内核版本:uname -a;  cat/proc/version
查看端口占用情况:ps -aux;  例如 ps -aux | grep tomcat
查看所有进程和端口使用情况:netstat -apn
查看CPU信息:cat /proc/cpuinfo
查看开机自启动:ls -Rl /etc/rc* | grep tomcat (以tomcat为例),有以s开头的即是开机自启动,例如:s08tomcat7;
另外一个查看命令是chkconfig (centos),如果想加入到开机启动项,chkconfig --add tomcat,然后用命令chkconfig tomcat on来启动
 
 
二. 用命令判断几个物理CPU,几个核等:
逻辑CPU个数:
# cat /proc/cpuinfo | grep "processor" | wc -l;
# lscpu | grep 'CPU(s):'| awk 'NR==1'
物理CPU个数:
# cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
每个物理CPU中Core的个数:
# cat /proc/cpuinfo | grep "cpu cores" 
是否为超线程?
如果有两个逻辑CPU具有相同的”core id”,那么超线程是打开的。
每个物理CPU中逻辑CPU(可能是core, threads或both)的个数:
# cat /proc/cpuinfo | grep "siblings"
http://www.cnblogs.com/xd502djj/archive/2011/02/28/1967350.html
 
CPU逻辑核心数和物理核心数
一般来说,物理CPU个数×每颗核数就应该等于逻辑CPU的个数,如果不相等的话,则表示服务器的CPU支持超线程技术
原文地址:https://www.cnblogs.com/regit/p/9473582.html