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

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

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

Postby Jin Choi on Tue Mar 26, 2013 10:18 am

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 Jin Choi on Tue Mar 26, 2013 9:22 pm, edited 1 time in total.
Jin Choi
Level 1
Level 1
 
Posts: 18
Joined: Fri Mar 22, 2013 2:52 am

Linux Mint is funded by ads and donations.
 

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

Postby bigj231 on Tue Mar 26, 2013 10:43 am

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.
Running on a 4-slot toaster @ 60Hz
User avatar
bigj231
Level 5
Level 5
 
Posts: 793
Joined: Fri Feb 26, 2010 10:16 am
Location: Middle of Nowhere

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

Postby semicolon on Tue Mar 26, 2013 11:01 am

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
semicolon
Level 2
Level 2
 
Posts: 58
Joined: Sat Mar 09, 2013 7:26 am
Location: Netherlands

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

Postby karlchen on Tue Mar 26, 2013 11:11 am

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
User avatar
karlchen
Level 11
Level 11
 
Posts: 3776
Joined: Sat Dec 31, 2011 7:21 am

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

Postby Jin Choi on Tue Mar 26, 2013 9:12 pm

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
Level 1
Level 1
 
Posts: 18
Joined: Fri Mar 22, 2013 2:52 am

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

Postby Jin Choi on Tue Mar 26, 2013 9:16 pm

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
Level 1
Level 1
 
Posts: 18
Joined: Fri Mar 22, 2013 2:52 am

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

Postby Jin Choi on Tue Mar 26, 2013 9:22 pm

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!
Jin Choi
Level 1
Level 1
 
Posts: 18
Joined: Fri Mar 22, 2013 2:52 am

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 26 guests