View linux disk space and cpu usage

1, view the CPU number of
cat / proc / cpuinfo | grep " physical id" | uniq

top can view real-time cpu usage
2, view the CPU core number
CAT / proc / cpuinfo | grep "cpu Cores" | uniq
3 to check the CPU type
CAT / proc / cpuinfo | grep 'Model name' | uniq
4, view memory
CAT / proc / meminfo | grep MemTotal
5, view the disk space
fdisk -l // see the physical disk size (including the physical size of the swap partition)
df -h // see the file system usage (not including swap partition)

original link: https: //blog.csdn.net/sinat_27933301/article/details/82894358

df command:

Function in linux df command is used to check the file system of linux server disk space occupancy. You can use this command to obtain the hard drive is taking up much space, how much space is left in the current information.

1. Format:

df [options] [file]

2. Function:

Displays the specified disk file space available. If no file name is specified, all available space is currently mounted file system will be displayed. By default, 1KB of disk space will be displayed as a unit, unless the environment variable POSIXLY_CORRECT is specified as 512 bytes will be displayed as a unit.

3. Command parameters:

Necessary parameters:

-a list of all file system

-h easy to read fashion show

-H is equal to "-h", but the calculation formula, 1K = 1000, rather than 1K = 1024

-i display inode information

-k block is 1024 bytes

-l displays only the local file system

-m block is 1048576 bytes

--no-sync ignore sync command

-P output format POSIX

--sync disk before obtaining the information, execute sync command

-T file system type

Select parameters:

--block-size = <block size> designated block size

-t <file system type> only displays information about the selected disk file system

-x <file system type> does not display the information for the selected disk file system

--help display help information

--version display version information

"Df -h" This command familiar. It displays the current disk space usage and a more readable way.

"Df -i" to inode mode to display disk usage.

What is the difference df -h and df -i is? Also show disk usage, why show the percentage of occupied far?

Better explanation df -h is to check the use of disk capacity.

As df -i, inode first need to understand what
to blog owners understand, the simplest way, inode contains information: number of bytes in the file, the owner of id, group id, permissions, modification time, the number of links, data block location. On the contrary it does not mean that the file size. That's why the results and df -h df -i show is not the same reason.

PS : display usage and 100% df -h df -i, the basic solution is to delete the file.

df -h is to delete large useless files ----------- large files take up a lot of disk capacity.

df -i to delete the excessive number of small files ----------- too many files take up a lot of inode number.

Guess you like

Origin www.cnblogs.com/hanmengya/p/11487149.html