在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
此脚本已经在ubuntu以及centos版本上测试通过,脚本如下: 复制代码 代码如下: #!/bin/bash Line='===========' #linux发行版名称 echo -e "${Line}\nOS:\n${OS}\n${Line}" ###################################################################################################### #查看系统是否为64位:uname -m,若出现x86_64,则为64位
#cpu型号 #物理cpu个数 #物理cpu内核数 #逻辑cpu个数 #查看CPU当前运行模式是64位还是32位
#Memtotal 内存总大小 #系统支持最大内存 #查看内存类型、频率、条数、最大支持内存等信息:dmidecode -t memory,或dmidecode | grep -A16 "Memory Device$"
#Buffers size #Cached size #空闲内存 + buffers/cache #显示硬盘,以及大小 #各挂载分区使用情况 ---------------------------------------------------------------------------------------- 测试结果展示: 复制代码 代码如下: =========== OS: Red Hat Enterprise Linux Server release 5.6 (Tikanga) =========== OS_version: i686 =========== Kernel_version: 2.6.18-238.el5 =========== CPU model: AMD A6-3400M APU with Radeon(tm) HD Graphics =========== Total of physical CPU: 2 =========== Number of CPU cores 2 =========== Number of logical CPUs: 4 =========== Present Mode Of CPU: 32 =========== Support Mode Of CPU: 64 =========== Total Memory: 514744 kB =========== Maxinum Memory Capacity: 1024 GB =========== Number of Physical Memory: 1 =========== Total Swap: 1044216 kB =========== Buffers: 101936 kB =========== Cached: 267356 kB =========== Available Memory: 369 MB =========== Amount Of Disks: Disk /dev/sda: 107.3 GB =========== Usage Of partions: /dev/sda3 96G 4.6G 87G 6% / /dev/sda1 99M 12M 83M 13% /boot tmpfs 252M 0 252M 0% /dev/shm /dev/hdc 3.0G 3.0G 0 100% /media/RHEL_5.6 i386 DVD =========== |
请发表评论