datadir = $CONFIG['datadir']; $obj->path_format = '{host}/{plugin}-{pinstance}/{type}-{tinstance}.rrd'; $obj->args = array( 'host' => $host, 'plugin' => $plugin, 'pinstance' => $pinstance, 'type' => $type, 'tinstance' => $tinstance, ); $obj->data_sources = array('value'); $obj->order = array('idle', 'nice', 'user', 'wait', 'system', 'softirq', 'interrupt', 'steal'); $obj->ds_names = array( 'idle' => 'Idle ', 'nice' => 'Nice ', 'user' => 'User ', 'wait' => 'Wait-IO', 'system' => 'System ', 'softirq' => 'SoftIRQ', 'interrupt' => 'IRQ ', 'steal' => 'Steal ', ); $obj->colors = array( 'idle' => 'e8e8e8', 'nice' => '00e000', 'user' => '0000ff', 'wait' => 'ffb000', 'system' => 'ff0000', 'softirq' => 'ff00ff', 'interrupt' => 'a000a0', 'steal' => '000000', ); $obj->width = $width; $obj->heigth = $heigth; $obj->seconds = $seconds; $obj->rrd_title = "CPU-$pinstance usage on $host"; $obj->rrd_vertical = 'Jiffies'; $obj->rrd_format = '%5.2lf'; $obj->rrd_graph(); ?>