-
Notifications
You must be signed in to change notification settings - Fork 1
/
make_cluster_csv.sh
executable file
·159 lines (124 loc) · 4.64 KB
/
make_cluster_csv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/bin/bash
machines=`ls -1 ceph_cluster_hardware_results/ | grep hw_data_results | awk -F'hw_data_results_' {'print $2'}`
echo "MACHINE, TEST, VALUE";
for machine in ${machines};
do
rootfolder="ceph_cluster_hardware_results/hw_data_results_${machine}/results_${machine}"
disks=`ls -1 ${rootfolder}/disks/*_model.txt`
echo -n "${machine},"
echo -n "cpu_model,"
echo -n "\""; cat ${rootfolder}/cpu/cpuinfo.txt | awk -F':' {'print $2'} | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "local_cpulist,"
echo -n "\""; cat ${rootfolder}/cpu/local_cpulist.txt | tr -d "\n"; echo -n "\"";
echo;
for disk in ${disks};
do
curdisk=`basename $disk | awk -F'_model.txt' {'print $1'}`;
echo -n "${machine},"
echo -n "${curdisk}_model,"
echo -n "\""; cat ${rootfolder}/disks/${curdisk}_model.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "${curdisk}_queue_hw_sector_size,"
echo -n "\""; cat ${rootfolder}/disks/${curdisk}_queue_hw_sector_size.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "${curdisk}_queue_max_hw_sectors_kb,"
echo -n "\""; cat ${rootfolder}/disks/${curdisk}_queue_max_hw_sectors_kb.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "${curdisk}_queue_max_sectors_kb,"
echo -n "\""; cat ${rootfolder}/disks/${curdisk}_queue_max_sectors_kb.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "${curdisk}_queue_nomerges,"
echo -n "\""; cat ${rootfolder}/disks/${curdisk}_queue_nomerges.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "${curdisk}_queue_nr_requests,"
echo -n "\""; cat ${rootfolder}/disks/${curdisk}_queue_nr_requests.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "${curdisk}_queue_read_ahead_kb,"
echo -n "\""; cat ${rootfolder}/disks/${curdisk}_queue_read_ahead_kb.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "${curdisk}_queue_rq_affinity,"
echo -n "\""; cat ${rootfolder}/disks/${curdisk}_queue_rq_affinity.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "${curdisk}_queue_scheduler,"
echo -n "\""; cat ${rootfolder}/disks/${curdisk}_queue_scheduler.txt | tr -d "\n"; echo -n "\"";
echo;
done;
echo -n "${machine},"
echo -n "total_memory,"
echo -n "\""; grep 'MemTotal' ${rootfolder}/memory/meminfo.txt | awk {'print $2 " " $3'} | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "dirty_background_ratio,"
echo -n "\""; cat ${rootfolder}/memory/dirty_background_ratio.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "dirty_ratio,"
echo -n "\""; cat ${rootfolder}/memory/dirty_ratio.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "vfs_cache_pressure,"
echo -n "\""; cat ${rootfolder}/memory/vfs_cache_pressure.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "min_free_kbytes,"
echo -n "\""; cat ${rootfolder}/memory/min_free_kbytes.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "rmem_max,"
echo -n "\""; cat ${rootfolder}/net/rmem_max.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "wmem_max,"
echo -n "\""; cat ${rootfolder}/net/wmem_max.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "tcp_rmem,"
echo -n "\""; cat ${rootfolder}/net/tcp_rmem.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "tcp_wmem,"
echo -n "\""; cat ${rootfolder}/net/tcp_wmem.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "netdev_max_backlog,"
echo -n "\""; cat ${rootfolder}/net/netdev_max_backlog.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "tcp_timestamps,"
echo -n "\""; cat ${rootfolder}/net/tcp_timestamps.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "tcp_sack,"
echo -n "\""; cat ${rootfolder}/net/tcp_sack.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "tcp_available_congestion_control,"
echo -n "\""; cat ${rootfolder}/net/tcp_available_congestion_control.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "os_version,"
echo -n "\""; cat ${rootfolder}/os_version.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "ceph_version,"
echo -n "\""; cat ${rootfolder}/ceph/version.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "dmi_product_name,"
echo -n "\""; cat ${rootfolder}/dmi/product_name.txt | tr -d "\n"; echo -n "\"";
echo;
echo -n "${machine},"
echo -n "dmi_product_version,"
echo -n "\""; cat ${rootfolder}/dmi/product_version.txt | tr -d "\n"; echo -n "\"";
echo;
done;