var options = {
sparklines_registry: {},
- interfaces_registry: {},
+ submenu_names: {},
data: null,
hostname: 'netdata_server', // will be overwritten by the netdata server
categories: new Array(),
info: 'System processes, read from <code>/proc/stat</code>. <b>Blocked</b> are processes that are willing to execute but they cannot, e.g. because they wait for disk activity.'
},
+ 'system.active_processes': {
+ info: 'All system active processes, read from <code>/proc/loadavg</code>.'
+ },
+
'system.ctxt': {
info: '<a href="https://en.wikipedia.org/wiki/Context_switch" target="_blank">Context Switches</a>, read from <code>/proc/stat</code>, is the switching of the CPU from one process, task or thread to another. If there are many processes or threads willing to execute and very few CPU cores available to handle them, the system is making more context switching to balance the CPU resources among them. The whole process is computationally intensive. The more the context switches, the slower the system gets.'
},
},
'disk.backlog': {
- colors: '#CCCC00'
+ colors: '#0099CC'
},
'disk.io': {
var tmp = chart.type.split('_')[0];
switch(tmp) {
- case 'disk':
- chart.menu = tmp;
- break;
-
case 'ap':
case 'net':
+ case 'disk':
chart.menu = tmp;
-
- // set the family using the name
- if(typeof options.interfaces_registry[chart.family] !== 'undefined' && options.interfaces_registry[chart.family] !== chart.family)
- chart.family += ' (' + options.interfaces_registry[chart.family] + ')';
-
break;
case 'tc':
chart.menu = tmp;
// find the interface name from the name
- if(typeof options.interfaces_registry[chart.family] === 'undefined' || options.interfaces_registry[chart.family] === chart.family)
- options.interfaces_registry[chart.family] = chart.name.split('.')[1].split('_')[0];
-
- // set the family using the name
- if(typeof options.interfaces_registry[chart.family] !== 'undefined' && options.interfaces_registry[chart.family] !== chart.family)
- chart.family += ' (' + options.interfaces_registry[chart.family] + ')';
+ if(typeof options.submenu_names[chart.family] === 'undefined' || options.submenu_names[chart.family] === chart.family)
+ options.submenu_names[chart.family] = chart.name.split('.')[1].split('_')[0];
// increase the priority of IFB devices
if(chart.id.match(/.*-ifb$/))
menus[charts[c].menu].submenus[charts[c].submenu] = {
priority: charts[c].priority,
charts: new Array(),
- title: submenuTitle(charts[c].menu, charts[c].submenu),
+ title: null,
info: submenuInfo(charts[c].menu, charts[c].submenu),
height: submenuHeight(charts[c].menu, charts[c].submenu, menus[charts[c].menu].height)
};
menus[charts[c].menu].submenus[charts[c].submenu].charts.push(charts[c]);
}
+ for(var m in menus) {
+ for(var s in menus[m].submenus) {
+ // set the family using a name
+ if(typeof options.submenu_names[s] !== 'undefined') {
+ menus[m].submenus[s].title = s + ' (' + options.submenu_names[s] + ')';
+ }
+ else {
+ menus[m].submenus[s].title = submenuTitle(m, s);
+ }
+ }
+ }
+
renderPage(menus, data);
}