-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the missing ctrigger files and a gnuplot template.
- Loading branch information
Showing
3 changed files
with
160 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
gmon.out | ||
a.out | ||
*.0 | ||
*.so | ||
*.pyc | ||
*.o | ||
*.ut | ||
*.a | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/** | ||
* Copyright (c) 2009 Ma Can <ml.macana@gmail.com> | ||
* <macan@ncic.ac.cn> | ||
* | ||
* Armed with EMACS. | ||
* Time-stamp: <2010-11-18 00:28:55 macan> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* 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 for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
* | ||
*/ | ||
|
||
#include "mds.h" | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
struct dt_ccode dc = {}, saved_dc; | ||
char *error; | ||
int err = 0; | ||
|
||
if (argc < 2) { | ||
hvfs_info(mds, "Usage: %s so_file\n", argv[0]); | ||
return -EINVAL; | ||
} | ||
|
||
strcpy(dc.tmp_file, argv[1]); | ||
|
||
dc.dlhandle = dlopen(dc.tmp_file, RTLD_NOW | RTLD_LOCAL); | ||
if (!dc.dlhandle) { | ||
hvfs_err(mds, "dlopen() %s failed w/ %s\n", | ||
dc.tmp_file, dlerror()); | ||
err = -errno; | ||
goto out; | ||
} | ||
|
||
dlerror(); | ||
|
||
dc.dtmain = dlsym(dc.dlhandle, "dt_main"); | ||
if ((error = dlerror()) != NULL) { | ||
hvfs_err(mds, "dlsym() dt_main failed w/ %s\n", | ||
error); | ||
goto out; | ||
} | ||
|
||
/* call the dt_main function now */ | ||
{ | ||
struct itb i; | ||
struct ite e; | ||
struct hvfs_index hi; | ||
struct dir_trigger dt = { | ||
.code = &dc, | ||
}; | ||
|
||
i.h.puuid = 900; | ||
e.s.mdu.ctime = 10000; | ||
err = dc.dtmain(10, &i, &e, &hi, 10, &dt); | ||
printf("ITE.s.mdu.version = %d\n", e.s.mdu.version); | ||
} | ||
|
||
dlclose(dc.dlhandle); | ||
|
||
out: | ||
return err; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Template for plot mds pictures | ||
# | ||
# Copyright (c) Ma Can <ml.macana@gmail.com> | ||
# <macan@ncic.ac.cn> | ||
# | ||
reset | ||
set terminal png transparent size 1200 250 | ||
set size 1,1 | ||
set origin 0.0, 0.0 | ||
set grid | ||
set output "mdsl.gXXX.png" | ||
set auto x | ||
set xtics out | ||
set auto y | ||
|
||
#set xrange [START:END] | ||
|
||
set multiplot | ||
set size .5, 1 | ||
set origin 0.0, 0 | ||
set xlabel "TimeStamp (s)" | ||
set ylabel "IOPS (#/s) | ||
set ytics nomirror | ||
set y2label "# of Requests (#)" | ||
set y2tics | ||
set key right box | ||
|
||
plot "< awk '{if (ts == 0) {ts = $2; A = $12;} \ | ||
{print ($2 - ts)\" \"($12 - A);} \ | ||
A = $12;}' xnet/CP-BACK-mdsl.FIRST" \ | ||
using 1:2 t "reqin_total" w linesp ls 1 axes x1y2, \ | ||
"< awk '{if (ts == 0) {ts = $2; A = $13;} \ | ||
{print ($2 - ts)\" \"($13 - A)} \ | ||
A = $13;}' xnet/CP-BACK-mdsl.FIRST" \ | ||
using 1:2 t "reqin_hand" w linesp ls 2 axes x1y2, \ | ||
"< awk '{if (ts == 0) {ts = $2; A = $21;} \ | ||
{print ($2 - ts)\" \"($21 - A)/5.0;} \ | ||
A = $21;}' xnet/CP-BACK-mdsl.FIRST" \ | ||
using 1:2 t "writes" w linesp ls 3 axes x1y1, \ | ||
"< awk '{if (ts == 0) {ts = $2; A = $22;} \ | ||
{print ($2 - ts)\" \"($22 - A)/5.0;} \ | ||
A = $22;}' xnet/CP-BACK-mdsl.FIRST" \ | ||
using 1:2 t "reads" w linesp ls 4 axes x1y1, \ | ||
"< awk '{if (ts == 0) {ts = $2; A = $24;} \ | ||
{print ($2 - ts)\" \"($24 - A);} \ | ||
A = $24;}' xnet/CP-BACK-mdsl.FIRST" \ | ||
using 1:2 t "submit" w linesp ls 5 axes x1y2, \ | ||
"< awk '{if (ts == 0) {ts = $2; A = $25;} \ | ||
{print ($2 - ts)\" \"($25 - A);} \ | ||
A = $25;}' xnet/CP-BACK-mdsl.FIRST" \ | ||
using 1:2 t "handle" w linesp ls 6 axes x1y2 | ||
|
||
set size .5, 1 | ||
set origin 0.5, 0 | ||
set xlabel "TimeStamp (s)" | ||
set ylabel "Net BW (MB/s)" | ||
set ytics nomirror | ||
set y2label "IO BW (MB/s)" | ||
set y2tics | ||
set key right box | ||
|
||
plot "< awk '{if (ts == 0) {ts = $2; A = $16;} \ | ||
{print ($2 - ts)\" \"(($16 - A)/5/1024/1024);} \ | ||
A = $16;}' xnet/CP-BACK-mdsl.FIRST" \ | ||
using 1:2 t "inBW" w linesp ls 1 axes x1y1, \ | ||
"< awk '{if (ts == 0) {ts = $2; A = $17;} \ | ||
{print ($2 - ts)\" \"(($17 - A)/5/1024/1024);} \ | ||
A = $17;}' xnet/CP-BACK-mdsl.FIRST" \ | ||
using 1:2 t "outBW" w linesp ls 2 axes x1y1, \ | ||
"< awk '{if (ts == 0) {ts = $2; A = $19;} \ | ||
{print ($2 - ts)\" \"(($19 - A)/5/1024/1024);} \ | ||
A = $19;}' xnet/CP-BACK-mdsl.FIRST" \ | ||
using 1:2 t "write" w linesp ls 3 axes x1y2, \ | ||
"< awk '{if (ts == 0) {ts = $2; A = $20;} \ | ||
{print ($2 - ts)\" \"(($20 - A)/5/1024/1024);} \ | ||
A = $20;}' xnet/CP-BACK-mdsl.FIRST" \ | ||
using 1:2 t "read" w linesp ls 4 axes x1y2, \ | ||
"< awk '{if (ts == 0) {ts = $2; A = $23;} \ | ||
{print ($2 - ts)\" \"(($23 - A)/5/1024/1024);} \ | ||
A = $23;}' xnet/CP-BACK-mdsl.FIRST" \ | ||
using 1:2 t "copy" w linesp ls 5 axes x1y2 |