NETDATA: adaptation to version 1.34.1
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com> Change-Id: I73c132cbe8bd8299060a31ec1efd62e8a83bea82
This commit is contained in:
committed by
bernard PUEL
parent
f16fc78d27
commit
4f4944ecc8
@ -20,13 +20,15 @@ ORDER = [
|
||||
|
||||
CHARTS = {
|
||||
'usage': {
|
||||
'options': [None, 'Usage', 'percent', 'usage', None, 'line'],
|
||||
'options': [None, 'Usage', 'percent', 'usage', 'gpu.usage', 'line'],
|
||||
'lines': [
|
||||
['usage', None, 'absolute', 1, 100]
|
||||
['usage', 'Usage', 'absolute', 0, 100]
|
||||
]
|
||||
},
|
||||
}
|
||||
|
||||
_DATA_TEMPLATE = {
|
||||
'usage': 0,
|
||||
}
|
||||
|
||||
def getpipeoutput(cmds):
|
||||
p = Popen(cmds[0], stdout = PIPE, shell = True)
|
||||
@ -53,24 +55,35 @@ class Service(SimpleService):
|
||||
return True
|
||||
|
||||
def _get_data(self):
|
||||
data = 0.0
|
||||
result = getpipeoutput(["cat /sys/kernel/debug/gc/idle"]).split('\n')
|
||||
for line in result:
|
||||
parts = line.split(' ')
|
||||
subline = " ".join(parts[1:]).replace(" ", "")
|
||||
subline = re.sub("ns", "", subline, flags=re.UNICODE)
|
||||
subline = re.sub(",", "", subline, flags=re.UNICODE)
|
||||
if parts[0] == "On:":
|
||||
on = int(subline)
|
||||
if parts[0] == "Off:":
|
||||
off = int(subline)
|
||||
if parts[0] == "Idle:":
|
||||
idle = int(subline)
|
||||
if parts[0] == "Suspend:":
|
||||
suspend = int(subline)
|
||||
data = float( (on - self.sysfs_on) * 100 / (on + off + idle + suspend - self.sysfs_start) )
|
||||
on = 0
|
||||
off = 0
|
||||
idle = 0
|
||||
suspend = 0
|
||||
try:
|
||||
data = dict(_DATA_TEMPLATE)
|
||||
|
||||
self.sysfs_on = on
|
||||
self.sysfs_start = on + off + idle + suspend
|
||||
return { 'usage': int(data * 100) }
|
||||
percent_data = 0.0
|
||||
result = getpipeoutput(["cat /sys/kernel/debug/gc/idle"]).split('\n')
|
||||
for line in result:
|
||||
parts = line.split(' ')
|
||||
subline = " ".join(parts[1:]).replace(" ", "")
|
||||
subline = re.sub("ns", "", subline, flags=re.UNICODE)
|
||||
subline = re.sub(",", "", subline, flags=re.UNICODE)
|
||||
if parts[0] == "On:":
|
||||
on = int(subline)
|
||||
if parts[0] == "Off:":
|
||||
off = int(subline)
|
||||
if parts[0] == "Idle:":
|
||||
idle = int(subline)
|
||||
if parts[0] == "Suspend:":
|
||||
suspend = int(subline)
|
||||
percent_data = float( (on - self.sysfs_on) * 100 / (on + off + idle + suspend - self.sysfs_start) )
|
||||
|
||||
self.sysfs_on = on
|
||||
self.sysfs_start = on + off + idle + suspend
|
||||
data['usage'] = percent_data * 100
|
||||
|
||||
return data
|
||||
except (ValueError, AttributeError):
|
||||
return None
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,13 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
[Unit]
|
||||
Description=Netdata, Real-time performance monitoring
|
||||
Description=Real time performance monitoring
|
||||
RequiresMountsFor=/var
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=simple
|
||||
ExecStartPre=/bin/mkdir -p /var/log/netdata
|
||||
ExecStartPre=/bin/chown -R root.root @@datadir/netdata/web
|
||||
ExecStartPre=/bin/chown -R root.root /var/cache/netdata
|
||||
ExecStartPre=/bin/chown -R root.netdata /var/log/netdata
|
||||
ExecStart=/usr/sbin/netdata -D -u root
|
||||
ExecStop=/usr/bin/kill_netdata
|
||||
|
||||
|
||||
@ -9,30 +9,43 @@
|
||||
# Enable / disable the whole python.d.plugin (all its modules)
|
||||
enabled: yes
|
||||
|
||||
# Prevent log flood
|
||||
# Define how many log messages can be written to log file in one log_interval
|
||||
logs_per_interval: 200
|
||||
|
||||
# Define how long is one logging interval (in seconds)
|
||||
log_interval: 3600
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Enable / Disable python.d.plugin modules
|
||||
#default_run: yes
|
||||
#
|
||||
# If "default_run" = "yes" the default for all modules is enabled (yes).
|
||||
# Setting any of these to "no" will disable it.
|
||||
#
|
||||
#
|
||||
# If "default_run" = "no" the default for all modules is disabled (no).
|
||||
# Setting any of these to "yes" will enable it.
|
||||
|
||||
# apache_cache: yes
|
||||
# Enable / Disable explicit garbage collection (full collection run). Default is enabled.
|
||||
gc_run: yes
|
||||
|
||||
# Garbage collection interval in seconds. Default is 300.
|
||||
gc_interval: 300
|
||||
|
||||
# apache: yes
|
||||
|
||||
# apache_cache has been replaced by web_log
|
||||
# adaptec_raid: yes
|
||||
# alarms: yes
|
||||
# am2320: yes
|
||||
# anomalies: no
|
||||
apache_cache: no
|
||||
# beanstalk: yes
|
||||
# bind_rndc: yes
|
||||
# cpufreq: yes
|
||||
# cpuidle: yes
|
||||
# boinc: yes
|
||||
# ceph: yes
|
||||
chrony: no
|
||||
# changefinder: no
|
||||
# couchdb: yes
|
||||
# dns_query_time: yes
|
||||
# dnsdist: yes
|
||||
# dockerd: yes
|
||||
# dovecot: yes
|
||||
# elasticsearch: yes
|
||||
# energid: yes
|
||||
|
||||
# this is just an example
|
||||
example: no
|
||||
@ -40,31 +53,60 @@ example: no
|
||||
# exim: yes
|
||||
# fail2ban: yes
|
||||
# freeradius: yes
|
||||
# gearman: yes
|
||||
go_expvar: no
|
||||
|
||||
# gunicorn_log has been replaced by web_log
|
||||
gunicorn_log: no
|
||||
|
||||
# haproxy: yes
|
||||
# hddtemp: yes
|
||||
# httpcheck: yes
|
||||
hpssa: no
|
||||
# icecast: yes
|
||||
# ipfs: yes
|
||||
# isc_dhcpd: yes
|
||||
# mdstat: yes
|
||||
# litespeed: yes
|
||||
logind: no
|
||||
# megacli: yes
|
||||
# memcached: yes
|
||||
# mongodb: yes
|
||||
# monit: yes
|
||||
# mysql: yes
|
||||
# nginx: yes
|
||||
# nginx_plus: yes
|
||||
# nvidia_smi: yes
|
||||
|
||||
# nginx_log has been replaced by web_log
|
||||
nginx_log: no
|
||||
|
||||
# nsd: yes
|
||||
# ntpd: yes
|
||||
# openldap: yes
|
||||
# oracledb: yes
|
||||
# ovpn_status_log: yes
|
||||
# phpfpm: yes
|
||||
# portcheck: yes
|
||||
# postfix: yes
|
||||
# postgres: yes
|
||||
# powerdns: yes
|
||||
# proxysql: yes
|
||||
# puppet: yes
|
||||
# rabbitmq: yes
|
||||
# redis: yes
|
||||
# rethinkdbs: yes
|
||||
# retroshare: yes
|
||||
# riakkv: yes
|
||||
# samba: yes
|
||||
sensors: yes
|
||||
# smartd_log: yes
|
||||
# spigotmc: yes
|
||||
# springboot: yes
|
||||
# squid: yes
|
||||
# traefik: yes
|
||||
# tomcat: yes
|
||||
# tor: yes
|
||||
# uwsgi: yes
|
||||
# varnish: yes
|
||||
# w1sensor: yes
|
||||
# web_log: yes
|
||||
# zscores: no
|
||||
gpu: yes
|
||||
|
||||
@ -1,235 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>NetData STMicroelectronics Dashboard</title>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
<script>
|
||||
// this section has to appear before loading dashboard.js
|
||||
|
||||
// Select a theme.
|
||||
// uncomment on of the two themes:
|
||||
|
||||
//var netdataTheme = 'default'; // this is white
|
||||
var netdataTheme = 'slate'; // this is dark
|
||||
|
||||
|
||||
// Set the default netdata server.
|
||||
// on charts without a 'data-host', this one will be used.
|
||||
// the default is the server that dashboard.js is downloaded from.
|
||||
|
||||
// var netdataServer = 'http://my.server:19999/';
|
||||
</script>
|
||||
|
||||
<!--
|
||||
Load dashboard.js
|
||||
|
||||
to host this HTML file on your web server,
|
||||
you have to load dashboard.js from the netdata server.
|
||||
|
||||
So, pick one the two below
|
||||
If you pick the first, set the server name/IP.
|
||||
|
||||
The second assumes you host this file on /usr/share/netdata/web
|
||||
and that you have chown it to be owned by netdata:netdata
|
||||
-->
|
||||
<!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
|
||||
<script type="text/javascript" src="dashboard.js"></script>
|
||||
|
||||
<script>
|
||||
// Set options for TV operation
|
||||
// This has to be done, after dashboard.js is loaded
|
||||
|
||||
// destroy charts not shown (lowers memory on the browser)
|
||||
NETDATA.options.current.destroy_on_hide = true;
|
||||
|
||||
// set this to false, to always show all dimensions
|
||||
NETDATA.options.current.eliminate_zero_dimensions = true;
|
||||
|
||||
// always update the charts, even if focus is lost
|
||||
NETDATA.options.current.stop_updates_when_focus_is_lost = false;
|
||||
|
||||
// Since you may render charts from many servers and any of them may
|
||||
// become offline for some time, the charts will break.
|
||||
// This will reload the page every RELOAD_EVERY minutes
|
||||
var RELOAD_EVERY = 5;
|
||||
setTimeout(function(){
|
||||
location.reload();
|
||||
}, RELOAD_EVERY * 60 * 1000);
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div style="width: 100%; text-align: center; display: inline-block;">
|
||||
<H1>STM32MP1 Dashboard</H1>
|
||||
|
||||
<div style="width: 100%; height: 24vh; text-align: center; display: inline-block;">
|
||||
<div style="width: 100%; max-height: calc(100% - 15px); text-align: center; display: inline-block;">
|
||||
<div style="width: 49%; height:100%; align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="system.cpu"
|
||||
data-title="CPUs Average"
|
||||
data-chart-library="gauge"
|
||||
data-width="20%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
data-colors="#DDDD00"
|
||||
></div>
|
||||
<div data-netdata="cpu.cpu0"
|
||||
data-title="CPU0 Average"
|
||||
data-chart-library="gauge"
|
||||
data-width="20%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
data-colors="#DD0000"
|
||||
></div>
|
||||
<div data-netdata="cpu.cpu1"
|
||||
data-title="CPU1 Average"
|
||||
data-chart-library="gauge"
|
||||
data-width="20%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
data-colors="#0000DD"
|
||||
></div>
|
||||
<div data-netdata="gpu.usage"
|
||||
data-title="GPU Average"
|
||||
data-chart-library="gauge"
|
||||
data-width="20%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<center>
|
||||
<table width="80%">
|
||||
<TR>
|
||||
<TD>
|
||||
<!-- cpu-->
|
||||
<div style="width: 100%; height: 24vh; text-align: center; display: inline-block;">
|
||||
<div style="width: 100%; height: 15px; text-align: center; display: inline-block;">
|
||||
<div style="width: 100%; height: calc(100% - 15px); text-align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="system.cpu"
|
||||
data-title="CPU usage"
|
||||
data-chart-library="dygraph"
|
||||
data-width="100%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<div style="width: 100%; height: 24vh; text-align: center; display: inline-block;">
|
||||
<div style="width: 100%; height: 15px; text-align: center; display: inline-block;">
|
||||
<div style="width: 100%; height: calc(100% - 15px); text-align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="cpu.cpu0"
|
||||
data-title="CPU usage of CPU0"
|
||||
data-chart-library="dygraph"
|
||||
data-width="49%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
></div>
|
||||
<div data-netdata="cpu.cpu1"
|
||||
data-title="CPU usage of CPU1"
|
||||
data-chart-library="dygraph"
|
||||
data-width="49%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</TD>
|
||||
</TR>
|
||||
<!-- interrup -->
|
||||
<TR>
|
||||
<TD>
|
||||
<div style="width: 100%; height: 24vh; text-align: center; display: inline-block;">
|
||||
<div style="width: 100%; height: 15px; text-align: center; display: inline-block;">
|
||||
<div style="width: 100%; height: calc(100% - 15px); text-align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="gpu.usage"
|
||||
data-title="CPUs Average"
|
||||
data-chart-library="dygraph"
|
||||
data-width="100%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</TD>
|
||||
</TR>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<div style="width: 100%; height: 23vh; text-align: center; display: inline-block;">
|
||||
<div style="width: 100%; height: 15px; text-align: center; display: inline-block;">
|
||||
<b>Netdata statistics</b>
|
||||
</div>
|
||||
<div style="width: 100%; max-height: calc(100% - 15px); text-align: center; display: inline-block;">
|
||||
<div style="width: 49%; height:100%; align: center; display: inline-block;">
|
||||
Network
|
||||
<br/>
|
||||
<div data-netdata="system.ipv4"
|
||||
data-dimensions="received"
|
||||
data-chart-library="easypiechart"
|
||||
data-title="IPv4 Inbound"
|
||||
data-units="kbps"
|
||||
data-width="20%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
<div data-netdata="system.ipv4"
|
||||
data-dimensions="sent"
|
||||
data-chart-library="easypiechart"
|
||||
data-title="IPv4 Outbound"
|
||||
data-units="kbps"
|
||||
data-width="20%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
<div data-netdata="ipv4.bcast"
|
||||
data-title="Ipv4 Broadcast"
|
||||
data-chart-library="easypiechart"
|
||||
data-units="kbps"
|
||||
data-width="20%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
<div data-netdata="ipv4.mcast"
|
||||
data-title="Ipv4 Multicast"
|
||||
data-chart-library="easypiechart"
|
||||
data-units="kbps"
|
||||
data-width="20%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
262
recipes-webadmin/netdata/netdata/stm32mp13.html
Normal file
262
recipes-webadmin/netdata/netdata/stm32mp13.html
Normal file
@ -0,0 +1,262 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>NetData STMicroelectronics Dashboard</title>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
</head>
|
||||
<script>
|
||||
// this section has to appear before loading dashboard.js
|
||||
|
||||
// Select a theme.
|
||||
// uncomment on of the two themes:
|
||||
|
||||
//var netdataTheme = 'default'; // this is white
|
||||
var netdataTheme = 'slate'; // this is dark
|
||||
|
||||
|
||||
// Set the default netdata server.
|
||||
// on charts without a 'data-host', this one will be used.
|
||||
// the default is the server that dashboard.js is downloaded from.
|
||||
|
||||
// var netdataServer = 'http://my.server:19999/';
|
||||
</script>
|
||||
|
||||
<!--
|
||||
Load dashboard.js
|
||||
|
||||
to host this HTML file on your web server,
|
||||
you have to load dashboard.js from the netdata server.
|
||||
|
||||
So, pick one the two below
|
||||
If you pick the first, set the server name/IP.
|
||||
The second assumes you host this file on /usr/share/netdata/web
|
||||
and that you have chown it to be owned by netdata:netdata
|
||||
-->
|
||||
<!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
|
||||
<script type="text/javascript" src="dashboard.js?v20190902-0"></script>
|
||||
|
||||
<script>
|
||||
// Set options for TV operation
|
||||
// This has to be done, after dashboard.js is loaded
|
||||
|
||||
// destroy charts not shown (lowers memory on the browser)
|
||||
NETDATA.options.current.destroy_on_hide = true;
|
||||
|
||||
// set this to false, to always show all dimensions
|
||||
NETDATA.options.current.eliminate_zero_dimensions = true;
|
||||
|
||||
// lower the pressure on this browser
|
||||
NETDATA.options.current.concurrent_refreshes = false;
|
||||
|
||||
// if the tv browser is too slow (a pi?)
|
||||
// set this to false
|
||||
NETDATA.options.current.parallel_refresher = true;
|
||||
|
||||
// always update the charts, even if focus is lost
|
||||
// NETDATA.options.current.stop_updates_when_focus_is_lost = false;
|
||||
|
||||
// Since you may render charts from many servers and any of them may
|
||||
// become offline for some time, the charts will break.
|
||||
// This will reload the page every RELOAD_EVERY minutes
|
||||
|
||||
var RELOAD_EVERY = 5;
|
||||
setTimeout(function(){
|
||||
location.reload();
|
||||
}, RELOAD_EVERY * 60 * 1000);
|
||||
|
||||
</script>
|
||||
<body>
|
||||
|
||||
<center><H1>STM32MP1 Dashboard</H1></center>
|
||||
|
||||
<div style="width: 100%; text-align: center; display: inline-block;">
|
||||
|
||||
<!-- -------------------------------- -->
|
||||
|
||||
<div style="width: 100%; height: 23vh; text-align: center; display: inline-block;">
|
||||
<div style="width: 100%; height: 100%; text-align: center; display: inline-block;">
|
||||
<div style="width: 49%; height: 100%; align: center; display: inline-block;">
|
||||
General
|
||||
<br/>
|
||||
<div data-netdata="system.cpu"
|
||||
data-title="CPUs Average"
|
||||
data-chart-library="gauge"
|
||||
data-width="20%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
data-colors="#DDDD00"
|
||||
></div>
|
||||
<div data-netdata="cpu.cpu0"
|
||||
data-title="CPU0 Average"
|
||||
data-chart-library="gauge"
|
||||
data-width="20%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
data-colors="#DD0000"
|
||||
></div>
|
||||
<div data-netdata="cpu.cpu1"
|
||||
data-title="CPU1 Average"
|
||||
data-chart-library="gauge"
|
||||
data-width="20%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
data-colors="#0000DD"
|
||||
></div>
|
||||
<div data-netdata="sensors.cpu_thermal_virtual_0_temperature"
|
||||
data-title="Temperature"
|
||||
data-chart-library="gauge"
|
||||
data-width="20%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
data-colors="#0000DD"
|
||||
></div>
|
||||
</div>
|
||||
<div style="width: 49%; height: 100%; align: center; display: inline-block;">
|
||||
Network
|
||||
<br/>
|
||||
<div data-netdata="system.net"
|
||||
data-dimensions="received"
|
||||
data-chart-library="easypiechart"
|
||||
data-title=""
|
||||
data-width="20%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
<div data-netdata="system.net"
|
||||
data-dimensions="sent"
|
||||
data-chart-library="easypiechart"
|
||||
data-title="IPv4 Outbound"
|
||||
data-units="kbps"
|
||||
data-width="20%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
<div data-netdata="system.ip"
|
||||
data-dimensions="received"
|
||||
data-title="IP Bandwidth"
|
||||
data-chart-library="easypiechart"
|
||||
data-units="kbps"
|
||||
data-width="20%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
<div data-netdata="system.ip"
|
||||
data-dimensions="sent"
|
||||
data-title="IP Bandwidth"
|
||||
data-chart-library="easypiechart"
|
||||
data-units="kbps"
|
||||
data-width="20%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -------------------------------- -->
|
||||
|
||||
<!-- CPU -->
|
||||
<div style="width: 100%; height: 12vh; text-align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="system.cpu"
|
||||
data-title="CPU usage"
|
||||
data-chart-library="dygraph"
|
||||
data-width="100%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[0, 100]"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div style="width: 100%; height: 12vh; text-align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="cpu.cpu0"
|
||||
data-title="CPU usage of CPU0"
|
||||
data-chart-library="dygraph"
|
||||
data-width="49%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[0, 100]"
|
||||
></div>
|
||||
<div data-netdata="cpu.cpu1"
|
||||
data-title="CPU usage of CPU1"
|
||||
data-chart-library="dygraph"
|
||||
data-width="49%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[0, 100]"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<!-- temperature-->
|
||||
<div style="width: 100%; height: 12vh; text-align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="sensors.cpu_thermal_virtual_0_temperature"
|
||||
data-title="Temperature"
|
||||
data-chart-library="dygraph"
|
||||
data-width="100%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[35, 100]"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<!-- NET -->
|
||||
<div style="width: 100%; height: 12vh; text-align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="system.net"
|
||||
data-title="Physical Network Interfaces Aggregated Bandwidth"
|
||||
data-chart-library="dygraph"
|
||||
data-width="49%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[0, 100]"
|
||||
></div>
|
||||
<div data-netdata="system.ip"
|
||||
data-title="IP Bandwidth"
|
||||
data-chart-library="dygraph"
|
||||
data-width="49%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[0, 100]"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div style="width: 100%; height: 12vh; text-align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="net.eth0"
|
||||
data-title="Bandwith ETH0"
|
||||
data-chart-library="dygraph"
|
||||
data-width="49%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[0, 100]"
|
||||
></div>
|
||||
<div data-netdata="net.eth1"
|
||||
data-title="Bandwith ETH1"
|
||||
data-chart-library="dygraph"
|
||||
data-width="49%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[0, 100]"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
270
recipes-webadmin/netdata/netdata/stm32mp15.html
Normal file
270
recipes-webadmin/netdata/netdata/stm32mp15.html
Normal file
@ -0,0 +1,270 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>NetData STMicroelectronics Dashboard</title>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
</head>
|
||||
<script>
|
||||
// this section has to appear before loading dashboard.js
|
||||
|
||||
// Select a theme.
|
||||
// uncomment on of the two themes:
|
||||
|
||||
//var netdataTheme = 'default'; // this is white
|
||||
var netdataTheme = 'slate'; // this is dark
|
||||
|
||||
|
||||
// Set the default netdata server.
|
||||
// on charts without a 'data-host', this one will be used.
|
||||
// the default is the server that dashboard.js is downloaded from.
|
||||
|
||||
// var netdataServer = 'http://my.server:19999/';
|
||||
</script>
|
||||
|
||||
<!--
|
||||
Load dashboard.js
|
||||
|
||||
to host this HTML file on your web server,
|
||||
you have to load dashboard.js from the netdata server.
|
||||
|
||||
So, pick one the two below
|
||||
If you pick the first, set the server name/IP.
|
||||
The second assumes you host this file on /usr/share/netdata/web
|
||||
and that you have chown it to be owned by netdata:netdata
|
||||
-->
|
||||
<!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
|
||||
<script type="text/javascript" src="dashboard.js?v20190902-0"></script>
|
||||
|
||||
<script>
|
||||
// Set options for TV operation
|
||||
// This has to be done, after dashboard.js is loaded
|
||||
|
||||
// destroy charts not shown (lowers memory on the browser)
|
||||
NETDATA.options.current.destroy_on_hide = true;
|
||||
|
||||
// set this to false, to always show all dimensions
|
||||
NETDATA.options.current.eliminate_zero_dimensions = true;
|
||||
|
||||
// lower the pressure on this browser
|
||||
NETDATA.options.current.concurrent_refreshes = false;
|
||||
|
||||
// if the tv browser is too slow (a pi?)
|
||||
// set this to false
|
||||
NETDATA.options.current.parallel_refresher = true;
|
||||
|
||||
// always update the charts, even if focus is lost
|
||||
// NETDATA.options.current.stop_updates_when_focus_is_lost = false;
|
||||
|
||||
// Since you may render charts from many servers and any of them may
|
||||
// become offline for some time, the charts will break.
|
||||
// This will reload the page every RELOAD_EVERY minutes
|
||||
|
||||
var RELOAD_EVERY = 5;
|
||||
setTimeout(function(){
|
||||
location.reload();
|
||||
}, RELOAD_EVERY * 60 * 1000);
|
||||
|
||||
</script>
|
||||
<body>
|
||||
|
||||
<center><H1>STM32MP15 Dashboard</H1></center>
|
||||
|
||||
<div style="width: 100%; text-align: center; display: inline-block;">
|
||||
|
||||
<!-- -------------------------------- -->
|
||||
|
||||
<div style="width: 100%; height: 23vh; text-align: center; display: inline-block;">
|
||||
<div style="width: 100%; height: 100%; text-align: center; display: inline-block;">
|
||||
<div style="width: 49%; height: 100%; align: center; display: inline-block;">
|
||||
General
|
||||
<br/>
|
||||
<div data-netdata="system.cpu"
|
||||
data-title="CPUs Average"
|
||||
data-chart-library="gauge"
|
||||
data-width="18%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
data-colors="#DDDD00"
|
||||
></div>
|
||||
<div data-netdata="cpu.cpu0"
|
||||
data-title="CPU0 Average"
|
||||
data-chart-library="gauge"
|
||||
data-width="18%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
data-colors="#DD0000"
|
||||
></div>
|
||||
<div data-netdata="cpu.cpu1"
|
||||
data-title="CPU1 Average"
|
||||
data-chart-library="gauge"
|
||||
data-width="18%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
data-colors="#0000DD"
|
||||
></div>
|
||||
<div data-netdata="netdata.runtime_gpu"
|
||||
data-title="GPU Average"
|
||||
data-chart-library="gauge"
|
||||
data-width="18%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
<div data-netdata="sensors.cpu_thermal_virtual_0_temperature"
|
||||
data-title="Temperature"
|
||||
data-chart-library="gauge"
|
||||
data-width="18%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
data-colors="#0000DD"
|
||||
data-gauge-max-value="100"
|
||||
data-gauge-stroke-color="#373B40"
|
||||
></div>
|
||||
<div style="width: 49%; height: 100%; align: center; display: inline-block;">
|
||||
Network
|
||||
<br/>
|
||||
<div data-netdata="system.net"
|
||||
data-dimensions="received"
|
||||
data-chart-library="easypiechart"
|
||||
data-title=""
|
||||
data-width="20%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
<div data-netdata="system.net"
|
||||
data-dimensions="sent"
|
||||
data-chart-library="easypiechart"
|
||||
data-title="IPv4 Outbound"
|
||||
data-units="kbps"
|
||||
data-width="20%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
<div data-netdata="system.ip"
|
||||
data-dimensions="received"
|
||||
data-title="IP Bandwidth"
|
||||
data-chart-library="easypiechart"
|
||||
data-units="kbps"
|
||||
data-width="20%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
<div data-netdata="system.ip"
|
||||
data-dimensions="sent"
|
||||
data-title="IP Bandwidth"
|
||||
data-chart-library="easypiechart"
|
||||
data-units="kbps"
|
||||
data-width="20%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-points="300"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -------------------------------- -->
|
||||
|
||||
<!-- CPU -->
|
||||
<div style="width: 100%; height: 12vh; text-align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="system.cpu"
|
||||
data-title="CPU usage"
|
||||
data-chart-library="dygraph"
|
||||
data-width="100%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[0, 100]"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div style="width: 100%; height: 12vh; text-align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="cpu.cpu0"
|
||||
data-title="CPU usage of CPU0"
|
||||
data-chart-library="dygraph"
|
||||
data-width="49%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[0, 100]"
|
||||
></div>
|
||||
<div data-netdata="cpu.cpu1"
|
||||
data-title="CPU usage of CPU1"
|
||||
data-chart-library="dygraph"
|
||||
data-width="49%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[0, 100]"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<!-- temperature-->
|
||||
<div style="width: 100%; height: 12vh; text-align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="sensors.cpu_thermal_virtual_0_temperature"
|
||||
data-title="Temperature"
|
||||
data-chart-library="dygraph"
|
||||
data-width="100%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[35, 100]"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<!-- NET -->
|
||||
<div style="width: 100%; height: 12vh; text-align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="system.net"
|
||||
data-title="Physical Network Interfaces Aggregated Bandwidth"
|
||||
data-chart-library="dygraph"
|
||||
data-width="49%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[0, 100]"
|
||||
></div>
|
||||
<div data-netdata="system.ip"
|
||||
data-title="IP Bandwidth"
|
||||
data-chart-library="dygraph"
|
||||
data-width="49%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[0, 100]"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div style="width: 100%; height: 12vh; text-align: center; display: inline-block;">
|
||||
<br/>
|
||||
<div data-netdata="net.eth0"
|
||||
data-title="Bandwith ETH0"
|
||||
data-chart-library="dygraph"
|
||||
data-width="49%"
|
||||
data-height="50%"
|
||||
data-after="-300"
|
||||
data-dygraph-valuerange="[0, 100]"
|
||||
></div>
|
||||
<div data-netdata="gpu.usage"
|
||||
data-title="GPU usage"
|
||||
data-chart-library="dygraph"
|
||||
data-width="100%"
|
||||
data-height="100%"
|
||||
data-after="-300"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
33
recipes-webadmin/netdata/netdata_%.bbappend
Normal file
33
recipes-webadmin/netdata/netdata_%.bbappend
Normal file
@ -0,0 +1,33 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/:"
|
||||
|
||||
SRC_URI:append:stm32mp1common = " file://stm32mp15.html "
|
||||
SRC_URI:append:stm32mp1common = " file://stm32mp13.html "
|
||||
SRC_URI:append = " file://python.d.conf "
|
||||
SRC_URI:append = " file://kill_netdata "
|
||||
#SRC_URI:append = " file://charts.d.conf "
|
||||
SRC_URI:append = " file://dashboard_info.js "
|
||||
SRC_URI:append = " file://gpu.chart.py "
|
||||
|
||||
RDEPENDS:${PN}:append = " python3-multiprocessing "
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${sysconfdir}/netdata
|
||||
install -d ${D}${datadir}/netdata/web
|
||||
install -d ${D}${bindir}/netdata/web
|
||||
|
||||
install -m 0644 ${WORKDIR}/python.d.conf ${D}${sysconfdir}/netdata/
|
||||
install -m 0755 ${WORKDIR}/kill_netdata ${D}${bindir}/
|
||||
|
||||
#install -m 0644 ${WORKDIR}/charts.d.conf ${D}${sysconfdir}/netdata/
|
||||
install -m 0644 ${WORKDIR}/dashboard_info.js ${D}${datadir}/netdata/web/
|
||||
|
||||
install -d ${D}${libexecdir}/netdata/python.d/
|
||||
install -m 0644 ${WORKDIR}/gpu.chart.py ${D}${libexecdir}/netdata/python.d/
|
||||
}
|
||||
|
||||
do_install:append:stm32mp1common() {
|
||||
install -d ${D}${datadir}/netdata/web
|
||||
|
||||
install -m 0644 ${WORKDIR}/stm32mp15.html ${D}${datadir}/netdata/web/
|
||||
install -m 0644 ${WORKDIR}/stm32mp13.html ${D}${datadir}/netdata/web/
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/:"
|
||||
|
||||
SRC_URI_append = " file://stm32.html "
|
||||
SRC_URI_append = " file://python.d.conf "
|
||||
SRC_URI_append = " file://kill_netdata "
|
||||
#SRC_URI_append = " file://charts.d.conf "
|
||||
SRC_URI_append = " file://dashboard_info.js "
|
||||
SRC_URI_append = " file://gpu.chart.py "
|
||||
|
||||
RDEPENDS_${PN}_append = " python3-multiprocessing "
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}${sysconfdir}/netdata
|
||||
install -d ${D}${datadir}/netdata/web
|
||||
install -d ${D}${bindir}/netdata/web
|
||||
|
||||
install -m 0644 ${WORKDIR}/stm32.html ${D}${datadir}/netdata/web/
|
||||
install -m 0644 ${WORKDIR}/python.d.conf ${D}${sysconfdir}/netdata/
|
||||
install -m 0755 ${WORKDIR}/kill_netdata ${D}${bindir}/
|
||||
|
||||
#install -m 0644 ${WORKDIR}/charts.d.conf ${D}${sysconfdir}/netdata/
|
||||
install -m 0644 ${WORKDIR}/dashboard_info.js ${D}${datadir}/netdata/web/
|
||||
|
||||
install -d ${D}${libexecdir}/netdata/python.d/
|
||||
install -m 0644 ${WORKDIR}/gpu.chart.py ${D}${libexecdir}/netdata/python.d/
|
||||
}
|
||||
Reference in New Issue
Block a user