mobilityakp.blogg.se

Linux check cpu and memory usage
Linux check cpu and memory usage











linux check cpu and memory usage

You can then use that information to either delete some files if there are not needed or extend the size of the logical volume if necessary. Note: That you can switch to any of the above subdirectories to find out exactly what’s in them and how much each item occupies. The example is given for /var, which as you can see in the first image above, is used at its 67%. If the use of a certain file system is above a predefined percentage, you can use du (short for disk usage) to find out what are the files that are occupying the most space. Example 4: Examining disk usage by directory Let’s check again the number of used / available nodes again in /home: # df -hTi | grep homeĪs you can see, there are 142 used inodes now (4 less than before). Use the following commands to find empty files or directories (which occupy 0B) that are using inodes without a reason: # find /home -type f -emptyĪlso, you can add the -delete flag at the end of each command if you also want to delete those empty files and directories: # find /home -type f -empty -delete For that reason, you need to monitor not only the storage space utilization but also the number of inodes used by file system. Note that you can run out of storage space long before running out of inodes, and vice-versa. Example 3: Finding and / or deleting empty files and directories You can see the amount of used and available inodes: Inode Disk UsageĪccording to the above image, there are 146 used inodes ( 1%) in /home, which means that you can still create 226K files in that file system. Example 2: Inspecting inode usage by file system in human-readable format with # df -hTi All files in a file system are mapped to an inode that contains its metadata. That’s certainly nice – but there’s another limitation that can render a file system unusable, and that is running out of inodes. Note that this report also includes the total size of each file system (in 1-K blocks), the free and available spaces, and the mount point of each storage device.

linux check cpu and memory usage linux check cpu and memory usage

With the -h flag it will display the same information using MB or GB instead. Without options, df reports disk space usage in bytes.













Linux check cpu and memory usage