What Are Sleeping Processes in Linux?
Contents

Sleeping: a sleeping process is a process waiting for a resource to be available (for example, a I/O operation to complete) or an event to happen (like a certain amount of time to pass).

How do I see sleep processes in Linux?

Just grep -l sleeping /proc/[0-9]*/status and maybe pipe it via | xargs -n1 dirname | xargs -n1 basename or something like that. Looping and checking return value and echo will be very slow. Using { } instead of do done is discouraged – it’s a (strange) bash extension, just do done .

What is sleeping in top command?

The status of any process can be: Ready: when it ready for execution and it’s in the queue waiting the processor call with specific priority. Sleeping: When it was running and it was blocked for I/O operation or when executing sleep() Running: When the processor executes a process it becomes running.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest