dysize - Linux


dysize is a command-line tool used to display the dynamic memory usage of a process. It provides detailed insights into the memory utilization of a running process, helping diagnose memory leaks, optimize resource allocation, and monitor application performance.


dysize [pid] [options]


  • pid is the process ID of the target process.
  • options are command-line flags to configure the output and behavior.


  • -a, --all: Display memory usage of all processes.
  • -c, --cumulative: Display cumulative memory usage, including shared memory.
  • -g, --giga: Print memory usage in gigabytes.
  • -h, --help: Display help information.
  • -k, --kilo: Print memory usage in kilobytes.
  • -m, --mega: Print memory usage in megabytes.
  • -s, --sort: Sort output by memory usage, descending order.


Display dynamic memory usage of a process (PID 1234):

dysize 1234

Display memory usage of all processes, sorted by usage:

dysize -a -s

Display memory usage in gigabytes:

dysize -g -c

Common Issues

  • Invalid PID: The provided PID might be invalid or the process may have terminated.
  • Permission Denied: User might not have sufficient permissions to access process information.
  • Out-of-Memory Errors: dysize may fail if the operating system runs out of memory while executing the command.


dysize can be integrated with other Linux utilities for advanced tasks:

  • Monitor memory usage over time: watch dysize -a -s continuously displays memory usage of all processes.
  • Create memory usage reports: Pipe the output of dysize to less -S or column -t to format and display the results.
  • Automate memory analysis: Use dysize in scripts to monitor memory usage and trigger alerts or take corrective actions.

Related Commands

  • top: Provides a real-time view of CPU and memory usage across all processes.
  • ps: Displays information about running processes, including memory usage.
  • sar: Collects and reports system activity information, including memory utilization.