1:查看下当前服务器是多少个CPU
top
使用top之后,按下数字1键,这个时候屏幕上就会出现CPU的信息
当然,我们也可以通过如下命令来查看cpu个数
grep -c ^processor /proc/cpuinfo,例如我台式机的话就会显示
8
2:查看本机主机名称及IP地址
hostname
ip addr
3:查看哪些服务已经启动了
systemctl list-units -t service |awk ‘$3==”active”‘
4:停止非必要的服务libvirtd ,smartd ,ModemManager
先查看一下这些服务占用了多少资源
ps aux |head -n1;ps aux|grep -e ‘[l]ibvirtd’ -e ‘[s]martd’ -e ‘[M]odemManager’
systemctl status libvirtd smartd ModemManager
systemctl stop libvirtd smartd ModemManager
systemctl disable libvirtd smartd ModemManager
虚拟机中的这些服务是没有太多用处的,
Latest posts by Zhiming Zhang (see all)
- aws eks node 自动化扩展工具 Karpenter - 8月 10, 2022
- ReplicationController and ReplicaSet in Kubernetes - 12月 20, 2021
- public key fingerprint - 5月 27, 2021