Skip to content

Commit cb6f298

Browse files
committed
stupid tabs
1 parent 5d98fab commit cb6f298

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

cl-netstat.pl

+16-16
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ sub cl_netstat {
169169
# 8 16 sdb 2640 380 18329 2860 1751748 13461886 121702720 249041290 78 2654720 249048720
170170
# 8 1 sda1 35383589 4096190 515794290 173085956 58990656 100542811 1276270912 205189188 0 135658516 378268412
171171
# EC2 machines get disks with partitions but not whole disks
172-
# TODO: sort out devices to make sure partitions are not double-counted with whole devices
173-
#
172+
# TODO: sort out devices to make sure partitions are not double-counted with whole devices
173+
#
174174
# from Documentation/iostats.txt:
175175
# Field 1 -- # of reads completed
176176
# Field 2 -- # of reads merged
@@ -231,18 +231,18 @@ sub diff_cl_netstat {
231231
$tdiff = $s2->{$host}{$iface}{tbytes};
232232
}
233233

234-
# 0: read_bytesps, 1: write_bytesps
234+
# 0: read_bytesps, 1: write_bytesps
235235
push @host_traffic, int($rdiff / $seconds), int($tdiff / $seconds);
236-
# 2: total_byteps, 3: 0 (using an array here was silly, should be hash)
237-
push @host_traffic, int($tput / $seconds), 0;
236+
# 2: total_byteps, 3: 0 (using an array here was silly, should be hash)
237+
push @host_traffic, int($tput / $seconds), 0;
238238
}
239239
}
240240

241-
# iops
241+
# iops
242242
$host_traffic[4] = ($s1->{$host}{dsk_rds} - $s2->{$host}{dsk_rds}) / $seconds;
243243
$host_traffic[5] = ($s1->{$host}{dsk_wds} - $s2->{$host}{dsk_wds}) / $seconds;
244244

245-
# iowait
245+
# iowait
246246
$host_traffic[6] = ($s1->{$host}{dsk_rwt} - $s2->{$host}{dsk_rwt});
247247
$host_traffic[7] = ($s1->{$host}{dsk_wwt} - $s2->{$host}{dsk_wwt});
248248

@@ -274,11 +274,11 @@ sub diff_cl_netstat {
274274
qw( hostname net_packets net_rx_bytes net_tx_bytes dsk_riops dsk_wiops rwait_ms wwait_ms );
275275
print CYAN, $header, $/, '-' x length($header), $/, RESET;
276276

277-
# iteration totals
278-
my $host_count = 0;
279-
my($ivl_net_rx_total, $ivl_net_tx_total) = (0, 0);
280-
my($ivl_riops_total, $ivl_wiops_total) = (0, 0);
281-
my($ivl_rwait_total, $ivl_wwait_total) = (0, 0);
277+
# iteration totals
278+
my $host_count = 0;
279+
my($ivl_net_rx_total, $ivl_net_tx_total) = (0, 0);
280+
my($ivl_riops_total, $ivl_wiops_total) = (0, 0);
281+
my($ivl_rwait_total, $ivl_wwait_total) = (0, 0);
282282

283283
HOST: foreach my $host ( @sorted_host_list ) {
284284
my $hostname = $host;
@@ -305,15 +305,15 @@ sub diff_cl_netstat {
305305
io_c($diff{$host}->[4]),
306306
io_c($diff{$host}->[5]);
307307

308-
# iowait
309-
my $avg_rwait = $diff{$host}->[6] / ($diff{$host}->[4] || 1);
308+
# iowait
309+
my $avg_rwait = $diff{$host}->[6] / ($diff{$host}->[4] || 1);
310310
my $avg_wwait = $diff{$host}->[7] / ($diff{$host}->[5] || 1);
311311
printf "%s%8s %s%8s %s%s%s\n",
312312
io_c($avg_rwait),
313313
io_c($avg_wwait),
314-
DKGRAY, $current->{$host}{comment} || '', RESET;
314+
DKGRAY, $current->{$host}{comment} || '', RESET;
315315

316-
# increment totals
316+
# increment totals
317317
$host_count++;
318318
$ivl_net_rx_total += $diff{$host}->[0] + $diff{$host}->[2];
319319
$ivl_net_tx_total += $diff{$host}->[1] + $diff{$host}->[3];

0 commit comments

Comments
 (0)