[solved] how to figure out what process I just started?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Jin Choi

[solved] how to figure out what process I just started?

Post by Jin Choi »

Hello, mint users~

Let's suppose I know how to open a file-browser from Mint. When I search for a file-browser in app menu, it comes up. Simple as that.
But, I'd love to know what the corresponding process name. I know it's caja but it's not important. It's just an example. I want to know a general way to figure out under what name of process is an application running.

In this case, I think, I can rephrase my question to 'how to check among all the running processes is the most lastest one, in terms of start_time?
I come up with an multi-piped command like below:
watch 'ps -ef | sort -k 7'

It's half successful and half failed. The problem is, although it sorts processes in order of start_time, there are so many processes with start_time of 00:00:00 and those with the same start_time are secondly alphabetically sorted by process names.
In a nutshell, the start_times are not precise enough to get what I want.

To recap my questions,
1. Is what I want to do possible?
2. Do you know how? (it's feasible even with my command above if start_time more accurate. Do you know how to make it so?
3. Or do you come up with better ways for the result I want?

Thanks :)

Thanks!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
bigj231

Re: Is there a way to figure out what process I just started

Post by bigj231 »

If you just want to know the names of the applications you're using, you can "edit" your menu and check the launch commands there. Right click on the launcher button. If you want to kill something, but aren't exactly sure what it's called, you can use the 'top' utility.
semicolon

Re: Is there a way to figure out what process I just started

Post by semicolon »

Jin Choi wrote:ps -ef | sort -k 7
You were not too far off, but ps also has some inbuilt sort, you can try something like:

Code: Select all

ps -ef --sort start_time
or to show the process id, command and elapsed time since starting the program and sort by the elapsed time you can use:

Code: Select all

ps -eo pid,cmd,etime --sort etime
ps is really flexible :D
User avatar
karlchen
Level 23
Level 23
Posts: 18231
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Is there a way to figure out what process I just started

Post by karlchen »

Hi,

and for GUI lovers: there is gnome-system-monitor, too. You can activate the column "Start time" and sort the process list on this column, ascending or descending, just as you like. :wink:

Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
Jin Choi

Re: Is there a way to figure out what process I just started

Post by Jin Choi »

bigj231 wrote:you can "edit" your menu and check the launch commands there.
Yeah. Isn't it great? Ubuntu doesn't seem to have such things. :) Thanks for your reply
Jin Choi

Re: Is there a way to figure out what process I just started

Post by Jin Choi »

semicolon wrote:

Code: Select all

ps -ef --sort start_time

Code: Select all

ps -eo pid,cmd,etime --sort etime
Shockingly useful! Especially the second one. That just works as I hoped. Problem solved, thanks to you :)
Jin Choi

Re: Is there a way to figure out what process I just started

Post by Jin Choi »

karlchen wrote:Hi,
there is gnome-system-monitor. You can activate the column "Start time" and sort the process list on this column, ascending or descending,
Karl
Hello Karl :)
I figure gnome-system-monitor and mate-system-monitor are the exact same?
I have been using mate-system-monitor embedded in my panel but I realized what to configure, thanks to you :-) Thank you!
Locked

Return to “Beginner Questions”