9 commands to check hard disk partitions and disk space on Linux

Here's why it might take 20 years. Particularly useful when downloading from mass storage devices Simplify workflow by automating the creation of sets of related directories for each download directory e. Other OSes also exist that use the same kernel such as Android and more traditional distributions like Fedora or Ubuntu , and others that use different kernels e. However, have you bothered to check drive space on those servers? Submit it here to become an TecMint author. What are the available GUI-based or command-line tools for checking current memory usage of Linux? But what is the line for?

The du command

The df command

It can be used to list out the existing partitions as well as create or modify them. Cfdisk works with one partition at a time. So if you need to see the details of a particular disk, then pass the device name to cfdisk. Parted is yet another command line utility to list out partitions and modify them if needed.

Here is an example that lists out the partition details. Df is not a partitioning utility, but prints out details about only mounted file systems. The list generated by df even includes file systems that are not real disk partitions. Improved version of df, written in python. Prints out all the hard disk partitions in a easy to read manner. Lists out all the storage blocks, which includes disk partitions and optical drives. Lsblk is capbale of displaying more information about each device like the label and model.

Check out the man page for more information. Prints the block device partitions and storage media attributes like uuid and file system type. The top command is much userful for system administrator to monitor and take correct action when required. For more examples of Top command read: By default vmstat command is not available under Linux systems you need to install a package called sysstat that includes a vmstat program.

The common usage of command format is. For more Vmstat examples read: The open files included are disk files , network sockets , pipes , devices and processes.

One of the main reason for using this command is when a disk cannot be unmounted and displays the error that files are being used or opened. With this commmand you can easily identify which files are in use. The most common format for this command is. More lsof command usage and examples: It also provides a option to save captured packages in a file for later analysis. For more tcpdump usage read: Netstat is a command line tool for monitoring incoming and outgoing network packets statistics as well as interface statistics.

It is very useful tool for every system administrator to monitor network performance and troubleshoot network related problems. Htop is a much advanced interactive and real time Linux process monitoring tool. This is much similar to Linux top command but it has some rich features like user friendly interface to manage process , shortcut keys , vertical and horizontal view of the processes and much more.

For more information on installation read our article below. For Htop installation read: For Ioptop installation and usage read: Install Iotop in Linux. IoStat is simple tool that will collect and show system input and output storage device statistics. This tool is often used to trace storage device performance issues including devices , local disks , remote disks such as NFS. For more Iostat usage and examples visit: For more information and usage of IPTraf tool, please visit: Both daemons runs in the background and keeps a close watch on the overall activity of each user on the system and also what resources are being consumed by them.

These tools are very useful for system administrators to track each users activity like what they are doing, what commands they issued, how much resources are used by them, how long they are active on the system etc.

For installation and example usage of commands read the article on Monitor User Activity with psacct or acct. Monit is a free open source and web based process supervision utility that automatically monitors and managers system processes, programs, files, directories, permissions, checksums and filesystems.

The system status can be viewed from the command line or using it own web interface. Linux Process Monitoring with Monit. NetHogs is an open source nice small program similar to Linux top command that keeps a tab on each process network activity on your system. It also keeps a track of real time network traffic bandwidth used by each program or application.

It has a built in HTTP web server that regularly collects system and network information and display them in graphs. It Monitors system load average and usage , memory allocation , disk driver health , system services , network ports , mail statistics Sendmail , Postfix , Dovecot , etc , MySQL statistics and many more.

It designed to monitor overall system performance and helps in detecting failures, bottlenecks, abnormal activities etc. Thanks for the detailed, all in one place article.

Personally, I use smem for a quick look at the top processes consuming memory their swap usage, if any. Gnome system monitor Under KDE: But sar can be using directly from command line too: Also sar is really useful because you can look back to see resource usage hours or even days ago. By the way, I have question about that output. Each library appears 4 times: But what is the line for?

It is neither readable, writable nor executable and it can never be used. Its RSS column when using -x is always 0 which shows that it is indeed never used so it costs nothing. I wonder what data points they use?

I have found top to be most flexible and simple to use. The first few lines itself gives me cpu and mem utilization. I would suggest to include sysstat package too, because sar can display a real-time memory usage as well as extract historical data. I'm surprised nobody mentioned slab memory, often where many leaks can be spotted. Collectl not only monitors everything all the other tools look at, it can also show consumption by slabs by name.

Both real time, historical and even across a cluster, via colmux.

Your Answer

Leave a Reply