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 2023 23: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 the trick: > > ~$ ps -eo tid,lstart,etime -q 1620,6841 > TID STARTED ELAPSED > 1620 Mon Nov 20 16:12:47 2023 1-01:33:53 > 6841 Tue Nov 21 15:59:36 2023 01:47:05 > > I guess TID means Thread IDentifier although in the "ps" man page is not > explicitly mentioned:
Basically, yes -- although "threads" (Linux light-weight processes) are the basis of processes, threads and all other similar things). So a process is just a "thread" with some more baggage (cf. man 2 clone). Might be confusing if you come from other contexts where threads are totally separated from processes. In Linux, a process is just a fat thread. Cheers -- t
signature.asc
Description: PGP signature