版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/thebigdipperbdx/article/details/82287646
内存
- free命令
[root@host-192-168-4-200 ~]# free
total used free shared buffers cached
Mem: 6931468 5599092 1332376 0 9976 101712
-/+ buffers/cache: 5487404 1444064
Swap: 4128760 3717832 410928
- 对于free命令,可以加上-m参数,使其显示单位为Mb
[root@host-192-168-4-200 ~]# free -m
total used free shared buffers cached
Mem: 6769 5957 811 0 5 51
-/+ buffers/cache: 5899 869
Swap: 4031 3971 60
硬盘
- df命令用于显示磁盘分区上的可使用的磁盘空间
[root@host-192-168-4-68 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 537G 38G 472G 8% /
tmpfs 16G 0 16G 0% /dev/shm
/dev/vda1 485M 39M 421M 9% /boot
- 查看硬盘和分区分布
[root@host-192-168-4-200 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 50G 0 disk
├─vda1 252:1 0 500M 0 part /boot
└─vda2 252:2 0 49.5G 0 part
├─VolGroup-lv_root (dm-0) 253:0 0 144.6G 0 lvm /
└─VolGroup-lv_swap (dm-1) 253:1 0 4G 0 lvm [SWAP]
vdb 252:16 0 100G 0 disk
└─VolGroup-lv_root (dm-0) 253:0 0 144.6G 0 lvm /
- 查看硬盘和分区的详细信息
[root@host-192-168-4-200 ~]# fdisk -l
Disk /dev/vda: 53.7 GB, 53687091200 bytes
16 heads, 63 sectors/track, 104025 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000bd363
Device Boot Start End Blocks Id System
/dev/vda1 * 3 1018 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/vda2 1018 104026 51915776 8e Linux LVM
Partition 2 does not end on cylinder boundary.
Disk /dev/vdb: 107.4 GB, 107374182400 bytes
16 heads, 63 sectors/track, 208050 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/VolGroup-lv_root: 155.2 GB, 155231191040 bytes
255 heads, 63 sectors/track, 18872 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/VolGroup-lv_swap: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000