File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ static void DiskIOMeter_updateValues(Meter* this) {
72
72
} else {
73
73
diff = 0 ;
74
74
}
75
+ this -> values [1 ] = diff ;
75
76
Meter_humanUnit (cached_read_diff_str , diff , sizeof (cached_read_diff_str ));
76
77
77
78
if (data .totalBytesWritten > cached_write_total ) {
@@ -81,6 +82,7 @@ static void DiskIOMeter_updateValues(Meter* this) {
81
82
} else {
82
83
diff = 0 ;
83
84
}
85
+ this -> values [2 ] = diff ;
84
86
Meter_humanUnit (cached_write_diff_str , diff , sizeof (cached_write_diff_str ));
85
87
86
88
cached_utilisation_diff = 0.0 ;
@@ -156,8 +158,13 @@ const MeterClass DiskIOMeter_class = {
156
158
},
157
159
.updateValues = DiskIOMeter_updateValues ,
158
160
.defaultMode = TEXT_METERMODE ,
159
- .supportedModes = METERMODE_DEFAULT_SUPPORTED ,
160
- .maxItems = 1 ,
161
+ .supportedModes =
162
+ (1 << BAR_METERMODE ) |
163
+ (1 << TEXT_METERMODE ) |
164
+ (1 << GRAPH_METERMODE ) |
165
+ (1 << LED_METERMODE ) |
166
+ (1 << IO_METERMODE ),
167
+ .maxItems = 3 ,
161
168
.total = 1.0 ,
162
169
.attributes = DiskIOMeter_attributes ,
163
170
.name = "DiskIO" ,
Original file line number Diff line number Diff line change @@ -109,8 +109,9 @@ static void NetworkIOMeter_updateValues(Meter* this) {
109
109
cached_txp_total = data .packetsTransmitted ;
110
110
}
111
111
112
- this -> values [0 ] = cached_rxb_diff ;
113
- this -> values [1 ] = cached_txb_diff ;
112
+ this -> values [0 ] = cached_rxb_diff + cached_txb_diff ;
113
+ this -> values [1 ] = cached_rxb_diff ;
114
+ this -> values [2 ] = cached_txb_diff ;
114
115
if (cached_rxb_diff + cached_txb_diff > this -> total ) {
115
116
this -> total = cached_rxb_diff + cached_txb_diff ;
116
117
}
@@ -169,8 +170,13 @@ const MeterClass NetworkIOMeter_class = {
169
170
},
170
171
.updateValues = NetworkIOMeter_updateValues ,
171
172
.defaultMode = TEXT_METERMODE ,
172
- .supportedModes = METERMODE_DEFAULT_SUPPORTED ,
173
- .maxItems = 2 ,
173
+ .supportedModes =
174
+ (1 << BAR_METERMODE ) |
175
+ (1 << TEXT_METERMODE ) |
176
+ (1 << GRAPH_METERMODE ) |
177
+ (1 << LED_METERMODE ) |
178
+ (1 << IO_METERMODE ),
179
+ .maxItems = 3 ,
174
180
.total = 100.0 ,
175
181
.attributes = NetworkIOMeter_attributes ,
176
182
.name = "NetworkIO" ,
You can’t perform that action at this time.
0 commit comments