pid

All posts tagged pid by Linux Bash
  • Posted on
    Featured Image
    The article explores `ps_mem.py`, a Python script for monitoring memory usage of processes on Linux. It accurately allocates shared memory among processes and offers a clear view of individual memory consumption. Offering a comprehensive guide, the article demonstrates installing the tool using wget or curl and setting up a custom script to monitor processes by PID periodically, thus aiding in efficient system management.
  • Posted on
    Featured Image
    The article explains how to capture the Process ID (PID) of background processes in a Bash environment, especially when using pipelines. It highlights the challenges and complexities involved in capturing PIDs in such scenarios and provides practical examples of managing these processes, including monitoring their status and gracefully stopping them. The use of the special variable `$!` to obtain the PID of the last job in the background is demonstrated with scripts, aiding in robust system operations and process management.