prisme-flow
Version:
prisme platform flow engine
44 lines (38 loc) • 1.53 kB
HTML
<!--
Created by prisme.io on 09/06/2017.
@author <a href="mailto:hello@prisme.io">savane vamara</a> (prisme.io)
-->
<script type="text/javascript">
RED.nodes.registerType('cpu',{
category: 'utility',
color: '#a6bbcf',
defaults: {
name: {value:""}
},
inputs:1,
outputs:1,
icon: "cpu.png",
label: function() {
return this.name||"CPU usage";
}
});
</script>
<script type="text/x-red" data-template-name="cpu">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="cpu">
<p>A node to monitor CPU usage.</p>
<p>The CPU usage will be calculated for each core individually.
Such a CPU core usage is in fact the average usage since the previous calculation.
Therefore the value will become more accurate when it is calculated more frequently (e.g. when a trigger message is put on the input port every second)!</p>
<p>For every core a separate output message will be created, which contains the following properties:
<ul>
<li><code>payload</code> is the core usage (as a percentage)</li>
<li><code>speed</code> is processor speed (in MHz)</li>
<li><code>topic</code> is the name of the (logical) CPU core (<i>core_xxx</i>)</li>
<li><code>model</code> is the CPU model</li>
</ul></p>
</script>