Giter VIP home page Giter VIP logo

cpu_monitor's Introduction

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>

cpu_monitor's People

Contributors

alspitz avatar jorgenfb avatar kjaget avatar mpowelson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.