From mboxrd@z Thu Jan 1 00:00:00 1970 From: ajitrzid@yahoo.com (Ajit R) Date: Thu, 27 Aug 2009 03:31:17 -0700 (PDT) Subject: [ltt-dev] Change process name to be command line In-Reply-To: <7660C7A486834C48B1487748EA32BCA362B40FBB06@spec-ty-exch.fihspec.com> Message-ID: <458481.77854.qm@web63205.mail.re1.yahoo.com> Hi --- On Thu, 8/27/09, Bryan Hsieh wrote: > From: Bryan Hsieh > Subject: [ltt-dev] Change process name to be command line > To: "'ltt-dev at lists.casi.polymtl.ca'" > Date: Thursday, August 27, 2009, 2:26 PM > Hi All, > > My user space process name are all the same - "app_process" > in LTTV, I'd like to distinguish with them, it seems LTT cat > from /proc/[number]/stat. I'd like to change to be command > line from /proc/[number]/cmdline when the process name is > specific name or just like what the busybox implement in PS, > where can I modify in LTT patch? > Thank you very much! > > Best regards, > Bryan Hsieh _______________________________________________ > ltt-dev mailing list > ltt-dev at lists.casi.polymtl.ca > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev > You could change the app names by using the prctl system call. This works for threads too. Refer to this discussion on the ltt-dev about how you can get thread/process names and can be seen by ltt: http://lists.casi.polymtl.ca/pipermail/ltt-dev/2009-August/001859.html Also if you have an older ltt implementation you might have to use the marker differently, in "set_task_comm" add this line trace_mark(fs_exec, "filename %s", tsk->comm). In Busybox too you would have to enable code to use the task structure's "comm" field printing. Regards Ajit