ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The ROS master does not track how long a node has been online, and the node list is reported by the nodes themselves, so there are some cases where a node may not be removed from the list because it shuts down improperly (ie segfault or runtime exception).
You'll probably need to write your own code which monitors which nodes are online, and keeps track of the PID for each process; changes in the PID will indicate that the process has been restarted or replaced by a new node with the same name.
The rosprofiler package keeps track of which nodes are running, their PID and their CPU time, but doesn't track overall node uptime. It might be a good starting point for the tool you're trying to build.
2 | No.2 Revision |
The ROS master does not track how long a node has been online, and the node list is reported by the nodes themselves, so there are some cases where a node may not be removed from the list because it shuts down improperly (ie segfault or runtime exception).
You'll probably need to write your own code which monitors which nodes are online, online (using the node ping method), and keeps track of the PID for each process; changes in the PID will indicate that the process has been restarted or replaced by a new node with the same name.
The rosprofiler package keeps track of which nodes are running, their PID and their CPU time, but doesn't track overall node uptime. It might be a good starting point for the tool you're trying to build.