Skip to content

ROS node that publishes all nodes' CPU and memory usage

License

Notifications You must be signed in to change notification settings

locusrobotics/cpu_monitor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpu_monitor

monitor.py is a ROS node that will ask the ROS master for a list of nodes and publish their CPU and memory usage as ROS topics. It will also publish the total system CPU and memory usage.

Only nodes running on the same machine will have their CPU and memory usage published.

Dependencies

  • psutil for the Python version you are using (2 or 3).

One of the following should work on most machines.

python -m pip install psutil
python3 -m pip install psutil
sudo apt install python-psutil
sudo apt install python3-psutil

Configuration

The polling period can be configured by setting the poll_period argument when launching. The default value if not specified is 1.0 seconds.

Setting poll_period to 10 seconds on the command line:

roslaunch cpu_monitor cpu_monitor.launch poll_period:=10

Setting poll_period to 10 seconds in a launch file_

<!-- mylaunchfile.launch -->
<launch>
  <include file="$(find cpu_monitor)/launch/cpu_monitor.launch">
    <arg name="poll_period" value="10.0"/>
  </include>
</launch>

About

ROS node that publishes all nodes' CPU and memory usage

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 91.5%
  • CMake 8.5%