Re: Get running time of child process

2023-11-21 Thread tomas
On Tue, Nov 21, 2023 at 08:47:08PM +0100, Franco Martelli wrote: > On 21/11/23 at 17:43, Michael Kjörling wrote: > > > ~$ ps -eo pid,lstart,etime -q 1620,6841 > > > PID STARTED ELAPSED > > > 1620 Mon Nov 20 16:12:47 202323:47:16 > > > 1620 Tue Nov 21 15:59:36

Re: Get running time of child process

2023-11-21 Thread Franco Martelli
On 21/11/23 at 17:43, Michael Kjörling wrote: ~$ ps -eo pid,lstart,etime -q 1620,6841 PID STARTED ELAPSED 1620 Mon Nov 20 16:12:47 202323:47:16 1620 Tue Nov 21 15:59:36 2023 00:28 Maybe for that what you want is "tid" not "pid"? Wonderful this did

Re: Get running time of child process

2023-11-21 Thread Michael Kjörling
On 21 Nov 2023 16:34 +0100, from martelli...@gmail.com (Franco Martelli): >> $ ps -eo pid,lstart,etime -q 1620,3507 > > Thanks it works, but instead of the child PID it is shown the parent PID: > > ~$ ps -eo pid,lstart,etime -q 1620,6841 > PID STARTED ELAPSED >1620

Re: Get running time of child process

2023-11-21 Thread Franco Martelli
On 20/11/23 at 21:22, Michael Kjörling wrote: $ ps -eo pid,lstart,etime -q 1620,3507 If that doesn't return anything for the child process, maybe it simply has exited? Thanks it works, but instead of the child PID it is shown the parent PID: ~$ ps -eo pid,lstart,etime -q 1620,6841 PID

Re: Get running time of child process

2023-11-20 Thread Michael Kjörling
On 20 Nov 2023 20:55 +0100, from martelli...@gmail.com (Franco Martelli): > ~$ ps -eo pid,lstart,etime | grep 1620 >1620 Mon Nov 20 16:12:47 202301:22:39 > > 1620 is the PID of the parent process, the command returns the date when the > parent process had started and the elapsed time as I

Get running time of child process

2023-11-20 Thread Franco Martelli
Hi, Get running time of child process I've Picom running on my system with these PIDs: ~$ pstree -hpan | grep picom | | | | `-grep,6199 picom |-picom,1620 -b --config /home/myuser/.config/picom.conf | `-{picom},3507 If I do: ~$ ps -eo pid,lstart,etime | grep 1620 1620 Mon