
As per the below output the httpd process has been running since Aug 05. The above commands doesn’t show you the exact start date of the process and if you want to know those information then you can use the following command. If you would like to know for how many days the process has been running then use the following format. Use the ps command with etime option to get detailed elapsed time. To do so, you need to find the PID of a process, we can easily identify it by using pidof command. etimes: elapsed time since the process was started, in seconds.etime: elapsed time since the process was started, in the form of hh:]mm:ss.It provides a snapshot of the current processes along with detailed information like username, user id, cpu usage, memory usage, process start date and time command name etc. Ps stands for processes status, it display the information about the active/running processes on the system. So, don’t get confused between top and ps commands. No, It shows you the total CPU time the task has used since it started. Make a note: You may think the same details can be found on top command output. There are multiple options are available in ps command to check this.Įach options comes with different output, which can be used for different purpose. It shows, the given process uptime in the form of hh:]mm:ss, in seconds, and exact start date and time.

We can easily check with the help of “ps” command. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.If you want to figure out how long a process has been running in Linux for some reason. Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If I had to speculate, I would guess that this project will keep going beyond the one year mark, though maybe with a more lenient publishing schedule! It has been good fun and I’ve learned a great deal. We’re approaching the halfway point in this year-long project. Hopefully, we all learned a little something today and hopefully we’ll all learn a little something new in two days – which is when the next article should come out.
#Check running processes linux how to#
There you have it, another article – this one telling how to count the running processes. You can check the man pages for both ‘ps’ and ‘wc’ to learn more about them, but this would be how I’d count the running processes on my Linux boxes. Instead, we’ll run it with the -e flag to show every running process.Īn example output of the latter would look something like this: Counting the processes owned by user ‘kgiii’. Running just ‘ps’ is pretty useless, so be sure to check man ps for more information. With the terminal now open, we’ll start with the ‘ps’ command.

You can open your terminal with your keyboard – just press CTRL + ALT + T and your default terminal should open. Like many other articles on this site, we start with an open terminal.

Even if you’re an expert, have some fun and read on! Count The Running Processes: If you’re an advanced user, it’s likely that you’ll have at least some familiarity with these tools. So, this should actually be a pretty short article and it’s definitely in the beginner territory. I suppose if you have resource constraints, but it’s not so important the number of running processes – but how computationally expensive those processes are. After all, it’s really not all that important to count the running processes. We will be using both of these tools, not just to just count the running processes, but also to expose you to these tools. Wc – print newline, word, and byte counts for each file

Ps – report a snapshot of the current processes. If you’re curious, the man page describes them as: The ‘ps’ command reports the current processes and the ‘wc’ stands for word count and has uses beyond just counting individual words, as this article will show you. The tools in question will be ‘ ps‘ and ‘ wc‘. Like many articles, it will show you how to use some tools that you may not yet know about. This article will show you how to count the running processes on your Linux system.
