Skip to content

Instantly share code, notes, and snippets.

@jvantuyl
Created June 30, 2009 02:42
Show Gist options
  • Save jvantuyl/137953 to your computer and use it in GitHub Desktop.
Save jvantuyl/137953 to your computer and use it in GitHub Desktop.
cat gfs_fops_pre <(samurai oshi -C xc88 -E 6 -s ./gfs_fops ) gfs_fops_post | dc
# Pre-store recursive macro that sums all of the op counts
[Lf Lf + Sf 1 - d0<s] Ss
# Initialize Counter
0
23715.35
Su
0
757791
+
36335864
+
59380634
+
34927648
+
31170223
+
40322454
+
29674805
+
67378012
+
37530445
+
Sf
1 +
23708.88
Su
0
2925494
+
6206448
+
8291074
+
8671139
+
8387941
+
13613539
+
5291901
+
11360972
+
6790295
+
Sf
1 +
23703.67
Su
0
2843370
+
6576656
+
6901665
+
6571286
+
8372009
+
18285259
+
6022393
+
29204495
+
8430355
+
Sf
1 +
23701.54
Su
0
3241631
+
6081023
+
5978734
+
6017506
+
8944328
+
13071718
+
6073806
+
15287652
+
7647760
+
Sf
1 +
23697.12
Su
0
3284823
+
6660031
+
6115705
+
6425330
+
7533145
+
18412092
+
6439293
+
11623669
+
8391975
+
Sf
1 +
23589.76
Su
0
275545295
+
6958772
+
6178587
+
15675497
+
4569713
+
16770703
+
4332473
+
6956116
+
5138277
+
Sf
1 +
1 - d0<s lf # Sum Up All of the File Ops
[File Ops ]P p
[Uptime ]P lu p
/ # Calculate Avg File Ops
[File Ops per Second ]P p
q
#!/bin/sh
# Snag Uptime
cat /proc/uptime | cut -d ' ' -f 1
# Store Uptime
echo Su
# Initialize Sum
echo 0
for i in $(grep ' gfs ' /proc/mounts | cut -d ' ' -f 2 ) ; do
gfs_tool counters $i | grep 'file operations' | sed -e 's/[^0-9]//g'
echo +
done
# Store Sum of File Ops
echo Sf
# Bump Counter
echo 1 +
1 - d0<s lf # Sum Up All of the File Ops
[File Ops ]P p
[Uptime ]P lu p
/ # Calculate Avg File Ops
[File Ops per Second ]P p
q
# Pre-store recursive macro that sums all of the op counts
[Lf Lf + Sf 1 - d0<s] Ss
# Initialize Counter
0
File Ops 991579821
Uptime 23589.76
File Ops per Second 42034
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment