ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Regarding output message of launch-prefix="time"

asked 2012-02-25 03:57:22 -0600

alfa_80 gravatar image

I was running 2 nodes using launch file in which I include launch-prefix="time". The following is the obtained output message:

2.58user 2.89system 2:01.48elapsed 4%CPU (0avgtext+0avgdata 307200maxresident)k
0inputs+0outputs (0major+664215minor)pagefaults 0swaps
0.77user 0.23system 2:01.95elapsed 0%CPU (0avgtext+0avgdata 221712maxresident)k
0inputs+8outputs (0major+14178minor)pagefaults 0swaps

I have several questions regarding this which are listed as follow:

  1. How do I interpret the output of it after killing all the running processes. Is it elapsed means time taken for that node and CPU means it used certain percent of it?
  2. How do I know that which output message is corresponding to which node? Were they ordered in ascending or descending order, I mean the output message with respect to nodes placed in launch file?

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-02-25 05:23:35 -0600

joq gravatar image

updated 2012-02-27 09:01:08 -0600

You can add a --format= option to your time prefix, with a printf()-style formatting string.

See "man time" for the details.


Launch the nodes with different prefix arguments, like this (untested):

launch-prefix = "/usr/bin/time --format='node1: %E sec, %P'"
launch-prefix = "/usr/bin/time --format='node2: %E sec, %P'"
edit flag offensive delete link more


Could you give me an example of line that I can determine which node belongs to in order to differentiate them, printf()-style that u meant. How do I append that?

alfa_80 gravatar image alfa_80  ( 2012-02-27 06:40:08 -0600 )edit

Thanks a lot, that works! I only edit the above as the following (launch-prefix = "time --format='node1: %E sec, %P'"), no difference I guess, feature-wise..

alfa_80 gravatar image alfa_80  ( 2012-02-27 21:36:36 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-02-25 03:57:22 -0600

Seen: 208 times

Last updated: Feb 27 '12