@@ -171,7 +171,7 @@ impl ProcessList { |
| 171 | 171 | SortField::Cpu => theme.cpu_color, |
| 172 | 172 | SortField::Memory => theme.memory_color, |
| 173 | 173 | SortField::DiskRead | SortField::DiskWrite | SortField::DiskTotal => theme.disk_color, |
| 174 | | - SortField::NetConnections => theme.network_color, |
| 174 | + SortField::NetConnections | SortField::NetTcp | SortField::NetBandwidth => theme.network_color, |
| 175 | 175 | _ => theme.text_secondary, |
| 176 | 176 | }, |
| 177 | 177 | ..header_style.clone() |
@@ -181,20 +181,27 @@ impl ProcessList { |
| 181 | 181 | let is_disk_sort = matches!(self.sort_field, SortField::DiskRead | SortField::DiskWrite | SortField::DiskTotal); |
| 182 | 182 | let is_net_sort = matches!(self.sort_field, SortField::NetConnections | SortField::NetTcp | SortField::NetBandwidth); |
| 183 | 183 | |
| 184 | + // Extra column position for network mode |
| 185 | + let col_extra = x + 350.0; |
| 186 | + |
| 184 | 187 | if is_disk_sort { |
| 185 | 188 | renderer.text("Read/s", col_cpu, header_y, &sort_style)?; |
| 186 | 189 | renderer.text("Write/s", col_mem, header_y, &sort_style)?; |
| 190 | + renderer.text("User", col_user, header_y, &header_style)?; |
| 187 | 191 | } else if is_net_sort { |
| 188 | | - renderer.text("TCP", col_cpu, header_y, &sort_style)?; |
| 189 | | - renderer.text("UDP", col_mem, header_y, &sort_style)?; |
| 192 | + renderer.text("Sock", col_cpu, header_y, &sort_style)?; |
| 193 | + renderer.text("Listen", col_mem, header_y, &sort_style)?; |
| 194 | + renderer.text("Estab", col_extra, header_y, &sort_style)?; |
| 195 | + renderer.text("User", col_user, header_y, &header_style)?; |
| 190 | 196 | } else if self.sort_field == SortField::Cpu { |
| 191 | 197 | renderer.text("CPU%", col_cpu, header_y, &sort_style)?; |
| 192 | 198 | renderer.text("Mem%", col_mem, header_y, &header_style)?; |
| 199 | + renderer.text("User", col_user, header_y, &header_style)?; |
| 193 | 200 | } else { |
| 194 | 201 | renderer.text("CPU%", col_cpu, header_y, &header_style)?; |
| 195 | 202 | renderer.text("Mem%", col_mem, header_y, &sort_style)?; |
| 203 | + renderer.text("User", col_user, header_y, &header_style)?; |
| 196 | 204 | } |
| 197 | | - renderer.text("User", col_user, header_y, &header_style)?; |
| 198 | 205 | |
| 199 | 206 | // Header separator |
| 200 | 207 | let sep_y = (self.bounds.y + HEADER_HEIGHT as i32) as f64; |
@@ -258,21 +265,29 @@ impl ProcessList { |
| 258 | 265 | }; |
| 259 | 266 | renderer.text(&format_rate(process.io_write_rate), col_mem, text_y, &write_style)?; |
| 260 | 267 | } else if is_net_sort { |
| 261 | | - // TCP count |
| 262 | | - let tcp_style = if process.net_tcp > 5 { |
| 268 | + // Total sockets |
| 269 | + let sock_style = if process.net_connections > 10 { |
| 270 | + TextStyle { color: theme.network_color, ..text_style.clone() } |
| 271 | + } else { |
| 272 | + dim_style.clone() |
| 273 | + }; |
| 274 | + renderer.text(&process.net_connections.to_string(), col_cpu, text_y, &sock_style)?; |
| 275 | + |
| 276 | + // Listen count (servers) |
| 277 | + let listen_style = if process.net_listen > 0 { |
| 263 | 278 | TextStyle { color: theme.network_color, ..text_style.clone() } |
| 264 | 279 | } else { |
| 265 | 280 | dim_style.clone() |
| 266 | 281 | }; |
| 267 | | - renderer.text(&process.net_tcp.to_string(), col_cpu, text_y, &tcp_style)?; |
| 282 | + renderer.text(&process.net_listen.to_string(), col_mem, text_y, &listen_style)?; |
| 268 | 283 | |
| 269 | | - // UDP count |
| 270 | | - let udp_style = if process.net_udp > 5 { |
| 284 | + // Established count (active connections) |
| 285 | + let estab_style = if process.net_established > 5 { |
| 271 | 286 | TextStyle { color: theme.network_color, ..text_style.clone() } |
| 272 | 287 | } else { |
| 273 | 288 | dim_style.clone() |
| 274 | 289 | }; |
| 275 | | - renderer.text(&process.net_udp.to_string(), col_mem, text_y, &udp_style)?; |
| 290 | + renderer.text(&process.net_established.to_string(), col_extra, text_y, &estab_style)?; |
| 276 | 291 | } else { |
| 277 | 292 | // CPU % |
| 278 | 293 | let cpu_style = if process.cpu_percent > 50.0 { |