Only one user is logged on to the system, and the load average during the last 1, 5, and 15 minutes, respectively. The current time (8:41:32 pm) and uptime (7 hours and 41 minutes). In rows 1 through 5 the following information is displayed:ġ. Let’s examine a typical top output: List All Running Processes in Linux To start top, simply type the following command in your command line, and hit Enter. Example 5: Displaying a live status of your system with top There other tools that could be used for the same purpose, such as htop, but I have settled for top because it is installed out-of-the-box in any Linux distribution. ![]() In addition, top displays a real-time view of a running system. The classic tool in Linux that is used to perform an overall check of CPU / memory utilization and process management is top command. 10 Useful “du” Commands to Find Disk Usage of Files and Directories.12 Useful “df” Commands to Check Disk Space.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. With the -h flag it will display the same information using MB or GB instead. Without options, df reports disk space usage in bytes.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |