How to Buy Quality Traffic for Website

A website is vital in today’s digital world for both organizations and individuals. However, simply having a website does not ensure success. To attract visitors and potential customers, you need…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Managing Processes and Jobs

Small, Sharp Software Tools — by Brian P. Hogan (74 / 107)

👈 Reusing Previous Commands and Arguments | TOC | Terminating Processes 👉

The ps command, short for Process Status, shows you the running processes on your computer, as well as information about who’s running them. It’s good for finding out what’s currently running and for identifying a process ID with a program so you can stop it.

The ps command takes different options based on which OS you’re using. In this book, we’ll cover the Linux options, which also work on macOS.

When you execute the ps command without any arguments, you see the processes running in your current session:

The output shows the PID, or Process ID, the terminal session that’s running the command, how long it’s been running, and the command itself. In this case, the only results you see are the Bash shell itself and the ps command you just ran, since it’s only showing you what’s running in this particular session.

Use the -f flag to get a more detailed output:

The UID column shows the user that started the process. The PPID is the ID of the parent process. Some processes spawn child processes, so it’s often helpful to know what process is responsible for creating the process you’re looking at. The C column shows the CPU usage of the process, and STIME shows the time the process was started.

To see all of the processes running on the system, use ps -e. This generates a very long list, as your OS has a lot of background processes running.

Pipe the output to the less command to make it easier to read:

Some of the processes aren’t attached to a terminal session, so you see a question mark (?) in the TTY column.

Add a comment

Related posts:

Training Developers

Adoption is more than programming. Elixir is an exciting new language, but to successfully get your application from start to finish, you're going to need to know more than just the language. The case studies and strategies in this book will get you there. Learn the best practices for the whole life of your application, from des

Seeking for the Sun

My eight-year-old daughter Dione has always been a late sleeper and a late riser. But three mornings ago, she woke me up to show me pictures she had taken with my phone. They were pictures of the…

MOST IGNORED ORGAN

I never knew that my migraines, mood swings, and feeling bloated and lousy were due to my ignored gut. ⁣ Dr. Michael Mosley’s book would be an excellent place to start if you want to know why Gut…