#!/usr/bin/perl -w
-#* Copyright (C) 2002 Cluster File Systems, Inc.
-#* Author: Jitendra Pawar <jitendra@clusterfs.com>
-#*
-#* Lustre is free software; you can redistribute it and/or
-#* modify it under the terms of version 2 of the GNU General Public
-#* License as published by the Free Software Foundation.
-#*
-#* Lustre is distributed in the hope that it will be useful,
-#* but WITHOUT ANY WARRANTY; without even the implied warranty of
-#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#* GNU General Public License for more details.
-#*
-#* You should have received a copy of the GNU General Public License
-#* along with Lustre; if not, write to the Free Software
-#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# GPL HEADER START
#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 only,
+# as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License version 2 for more details (a copy is included
+# in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU General Public License
+# version 2 along with this program; If not, see
+# http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+# GPL HEADER END
+#
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved
+# Use is subject to license terms.
+#
+# Copyright (c) 2013, Intel Corporation.
+#
+# This file is part of Lustre, http://www.lustre.org/
+# Lustre is a trademark of Sun Microsystems, Inc.
+#
+# Author: Jitendra Pawar <jitendra@clusterfs.com>
+
# Report generation for plot-obdfilter
# ====================================
# The plot-obdfilter script is used to generate csv file and
$i = 2;
$xrange = 1;
# generate instructions for gnuplot, with adjusting X-axes ranges
- for ($j = $first_thread; $j <= $thread ; $j = $j + $j) {
+ for ($j = $first_obj; $j <= $obj ; $j = $j + $j) {
printf SCRFILE "$plot \"$file-$rsz-$op.dat\" using 1:$i axes x%dy1 title \"$rwlabel-obj$j\" with line\n", $xrange;
$i++;
$plot = "replot";
# Open .csv/.dat file for writing required columns from log file.
open ( DATAFILE, "> $file-$rsz-$op.dat" ) or die "Can't open csv file for writing";
printf DATAFILE "%-6s", "thrd";
- for ($j = $first_thread; $j <= $thread ; $j = $j + $j) {
+ for ($j = $first_obj; $j <= $obj; $j = $j + $j) {
printf DATAFILE "%-10s", "$op-obj$j";
}
- for ( $i = $first_obj; $i <= $obj; $i = $i + $i ) {
+ for ( $i = $first_thread; $i <= $thread; $i = $i + $i ) {
printf DATAFILE "\n%-6s", $i;
- for ($j = $first_thread; $j <= $thread ; $j = $j + $j) {
+ for ($j = $first_obj; $j <= $obj; $j = $j + $j) {
# switch-case can be used instead if else
if ($op eq "rd") {
if ( $ard{$i}{$j} ) {
}
}
}
- if ($rsz != $line[5]) {
+ if ($rsz ne $line[5]) {
&write_files();
$rsz = $line[5];
$first_obj = $line[7];