Linux(查看服务cpu核数和内存)
短信预约 -IT技能 免费直播动态提醒
linux服务器中最重要的两个配置是CPU和内存。那么怎么开始查看CPU核数和内存,以及使用情况,是日常运维中使用最多的操作。
查看linux服务器cpu最简单的命令是 cat /proc/cpuinfo
查看linux服务器cpu最简单的命令是 lscpu
查看linux服务器内存
cat /proc/meminfo
查看linux服务器内存最简单的命令: free -h
lscpu信息
[root@tXX-XXX-app logs]# lscpuArchitecture: x86_64CPU op-mode(s): 32-bit, 64-bitByte Order: Little EndianCPU(s): 4On-line CPU(s) list: 0-3Thread(s) per core: 1Core(s) per socket: 4Socket(s): 1NUMA node(s): 1Vendor ID: GenuineIntelCPU family: 6Model: 85Model name: Intel(R) Xeon(R) Platinum 8255C CPU @ 2.50GHzStepping: 5CPU MHz: 2494.140BogoMIPS: 4988.28Hypervisor vendor: KVMVirtualization type: fullL1d cache: 32KL1i cache: 32KL2 cache: 4096KL3 cache: 36608KNUMA node0 CPU(s): 0-3
可以看出操作系统的架构是x86 64位的操作系统。
CPU 操作模型支持32位 和 64位
byte Order 为 Little Endian
cpu核数为 4核
CPU主频为2.50GHZ
CPU缓存为4级缓存,分别为32k 32k 4096K 36608K
free -h 内存信息
[root@tXX-XXX-app logs]# free -h total used free shared buff/cache availableMem: 15G 6.2G 266M 1.1M 8.7G 8.7GSwap: 0B 0B 0B
总内存 15G 已用 6.2G 可用8.7G
磁盘信息 du -h /home 查看home目录各文件夹占用磁盘空间大小。
[root@tXX-XX-app logs]# du -h /home44M /home/docker/apps/eureka8.0K /home/docker/apps/nginx/conf.d/bak_2023022716K /home/docker/apps/nginx/conf.d8.0K /home/docker/apps/nginx/conf/bak_2023022724K /home/docker/apps/nginx/conf29M /home/docker/apps/nginx/www/ctg-member/ctg-member/assets30M /home/docker/apps/nginx/www/ctg-member/ctg-member30M /home/docker/apps/nginx/www/ctg-member30M /home/docker/apps/nginx/www12G /home/docker/apps/nginx/logs20K /home/docker/apps/nginx/cert12G /home/docker/apps/nginx12G /home/docker/apps16K /home/docker/script/apollo36K /home/docker/script12G /home/docker392M /home/project/ctg-member-plat/jar8.1M /home/project/ctg-member-plat/logs16K /home/project/ctg-member-plat/script/subscript28K /home/project/ctg-member-plat/script400M /home/project/ctg-member-plat52M /home/project/sso/jar56K /home/project/sso/logs8.0K /home/project/sso/script52M /home/project/sso451M /home/project12K /home/redis/myredis/data/appendonlydir16K /home/redis/myredis/data24K /home/redis/myredis28K /home/redis67M /home/tingyun13G /home
来源地址:https://blog.csdn.net/dongjing991/article/details/129254608
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341