From 6c449b41d0a441d3df1c996070459690689612a7 Mon Sep 17 00:00:00 2001 From: Svennd Date: Wed, 5 Jul 2017 21:20:30 +0200 Subject: [PATCH] webui: Split up the complex nfs v3 graphs (#6963) * split up the complex graph * overview page had some excessive graphs --- .../application/nfs-server_stats_io.inc.php | 49 ++++++++++++++++ .../application/nfs-server_stats_read.inc.php | 56 +++++++++++++++++++ ...inc.php => nfs-server_stats_write.inc.php} | 14 +---- html/pages/apps.inc.php | 8 --- html/pages/device/apps/nfs-server.inc.php | 4 +- 5 files changed, 109 insertions(+), 22 deletions(-) create mode 100755 html/includes/graphs/application/nfs-server_stats_io.inc.php create mode 100755 html/includes/graphs/application/nfs-server_stats_read.inc.php rename html/includes/graphs/application/{nfs-server_stats.inc.php => nfs-server_stats_write.inc.php} (70%) mode change 100644 => 100755 mode change 100644 => 100755 html/pages/apps.inc.php mode change 100644 => 100755 html/pages/device/apps/nfs-server.inc.php diff --git a/html/includes/graphs/application/nfs-server_stats_io.inc.php b/html/includes/graphs/application/nfs-server_stats_io.inc.php new file mode 100755 index 0000000000..37eb51345a --- /dev/null +++ b/html/includes/graphs/application/nfs-server_stats_io.inc.php @@ -0,0 +1,49 @@ + +*/ + +require 'includes/graphs/common.inc.php'; +$scale_min = 0; +$colours = 'mixed'; +$unit_text = 'v3 read vs write'; +$unitlen = 10; +$bigdescrlen = 15; +$smalldescrlen = 15; +$dostack = 0; +$printtotal = 0; +$addarea = 1; +$transparency = 33; + +$rrd_filename = rrd_name($device['hostname'], array('app', 'nfs-server-proc3', $app['app_id'])); + +$array = array( + 'proc3_read' => array('descr' => 'Read'), + 'proc3_write' => array('descr' => 'Write'), + ); + +$i = 0; + +if (rrdtool_check_rrd_exists($rrd_filename)) { + foreach ($array as $ds => $var) { + $rrd_list[$i]['filename'] = $rrd_filename; + $rrd_list[$i]['descr'] = $var['descr']; + $rrd_list[$i]['ds'] = $ds; + $rrd_list[$i]['colour'] = $config['graph_colours'][$colours][$i]; + $i++; + } +} else { + echo "file missing: $rrd_filename"; +} + +require 'includes/graphs/generic_v3_multiline.inc.php'; diff --git a/html/includes/graphs/application/nfs-server_stats_read.inc.php b/html/includes/graphs/application/nfs-server_stats_read.inc.php new file mode 100755 index 0000000000..5b0e5e066d --- /dev/null +++ b/html/includes/graphs/application/nfs-server_stats_read.inc.php @@ -0,0 +1,56 @@ + +*/ + +require 'includes/graphs/common.inc.php'; +$scale_min = 0; +$colours = 'mixed'; +$unit_text = 'v3 read operations'; +$unitlen = 10; +$bigdescrlen = 15; +$smalldescrlen = 15; +$dostack = 0; +$printtotal = 0; +$addarea = 1; +$transparency = 33; + +$rrd_filename = rrd_name($device['hostname'], array('app', 'nfs-server-proc3', $app['app_id'])); + +$array = array( + 'proc3_getattr' => array('descr' => 'Get attributes'), + 'proc3_lookup' => array('descr' => 'Lookup'), + 'proc3_access' => array('descr' => 'Access'), + 'proc3_readlink' => array('descr' => 'Read link'), + 'proc3_readdir' => array('descr' => 'Read dir'), + 'proc3_readdirplus' => array('descr' => 'Read dir plus'), + 'proc3_fsstat' => array('descr' => 'FS stat'), + 'proc3_fsinfo' => array('descr' => 'FS info'), + 'proc3_pathconf' => array('descr' => 'Pathconf'), + ); + +$i = 0; + +if (rrdtool_check_rrd_exists($rrd_filename)) { + foreach ($array as $ds => $var) { + $rrd_list[$i]['filename'] = $rrd_filename; + $rrd_list[$i]['descr'] = $var['descr']; + $rrd_list[$i]['ds'] = $ds; + $rrd_list[$i]['colour'] = $config['graph_colours'][$colours][$i]; + $i++; + } +} else { + echo "file missing: $rrd_filename"; +} + +require 'includes/graphs/generic_v3_multiline.inc.php'; diff --git a/html/includes/graphs/application/nfs-server_stats.inc.php b/html/includes/graphs/application/nfs-server_stats_write.inc.php old mode 100644 new mode 100755 similarity index 70% rename from html/includes/graphs/application/nfs-server_stats.inc.php rename to html/includes/graphs/application/nfs-server_stats_write.inc.php index 6e3a6d9efd..701689caa4 --- a/html/includes/graphs/application/nfs-server_stats.inc.php +++ b/html/includes/graphs/application/nfs-server_stats_write.inc.php @@ -16,7 +16,7 @@ require 'includes/graphs/common.inc.php'; $scale_min = 0; $colours = 'mixed'; -$unit_text = 'NFS v3 Operations'; +$unit_text = 'v3 write operations'; $unitlen = 10; $bigdescrlen = 15; $smalldescrlen = 15; @@ -28,13 +28,7 @@ $transparency = 33; $rrd_filename = rrd_name($device['hostname'], array('app', 'nfs-server-proc3', $app['app_id'])); $array = array( - 'proc3_null' => array('descr' => 'Null'), - 'proc3_getattr' => array('descr' => 'Get attributes'), 'proc3_setattr' => array('descr' => 'Set attributes'), - 'proc3_lookup' => array('descr' => 'Lookup'), - 'proc3_access' => array('descr' => 'Access'), - 'proc3_read' => array('descr' => 'Read'), - 'proc3_write' => array('descr' => 'Write'), 'proc3_create' => array('descr' => 'Create'), 'proc3_mkdir' => array('descr' => 'Make dir'), 'proc3_mknod' => array('descr' => 'Make nod'), @@ -42,13 +36,7 @@ $array = array( 'proc3_remove' => array('descr' => 'Remove'), 'proc3_rmdir' => array('descr' => 'Remove dir'), 'proc3_rename' => array('descr' => 'Rename'), - 'proc3_readlink' => array('descr' => 'Read link'), - 'proc3_readdir' => array('descr' => 'Read dir'), 'proc3_symlink' => array('descr' => 'Symlink'), - 'proc3_readdirplus' => array('descr' => 'Read dir plus'), - 'proc3_fsstat' => array('descr' => 'FS stat'), - 'proc3_fsinfo' => array('descr' => 'FS info'), - 'proc3_pathconf' => array('descr' => 'Pathconf'), 'proc3_commit' => array('descr' => 'Commit'), ); diff --git a/html/pages/apps.inc.php b/html/pages/apps.inc.php old mode 100644 new mode 100755 index 376d8b844d..ff2d2952ca --- a/html/pages/apps.inc.php +++ b/html/pages/apps.inc.php @@ -110,15 +110,7 @@ $graphs['nfs-v3-stats'] = array( ); $graphs['nfs-server'] = array( - 'stats_v2', - 'stats', - 'stats_v4', - 'v4ops', 'io', - 'fh', - 'rc', - 'ra', - 'net', 'net_tcp_conns', 'rpc', ); diff --git a/html/pages/device/apps/nfs-server.inc.php b/html/pages/device/apps/nfs-server.inc.php old mode 100644 new mode 100755 index bfc1a1dc1e..db3f934fbc --- a/html/pages/device/apps/nfs-server.inc.php +++ b/html/pages/device/apps/nfs-server.inc.php @@ -72,7 +72,9 @@ $graphs['proc2'] = array( ); $graphs['proc3'] = array( - 'nfs-server_stats' => array('NFS v3 Statistics', 'proc3') + 'nfs-server_stats_io' => array('NFS v3 Read/Write operations', 'proc3'), + 'nfs-server_stats_read' => array('NFS v3 other read operations', 'proc3'), + 'nfs-server_stats_write' => array('NFS v3 other write operations', 'proc3') ); $graphs['proc4'] = array(