mgradwohl / mgradwohl/tasksmack
[Feature] Per-connection network view (netstat-style)
- Dominant language
- C++
- Stars
- 1
- Forks
- 0
- Avg merge
- 3h 4m
- Merged PRs (30d)
- 115
Description
## Problem Statement
TaskSmack only shows aggregate per-process network byte rates (lifetime-average sent/received). There's no way to see *what* a process is actually connected to — which is the core value proposition of tools like Windows Resource Monitor's Network tab, TCPView, nethogs, or TaskSlinger's advertised "active connection monitoring."
## Proposed Solution
A per-connection view for the selected process: local address:port, remote address:port, protocol (TCP/UDP), and state (ESTABLISHED, LISTEN, TIME_WAIT, etc.), shown as a new section in Process Details.
## Alternatives Considered
A system-wide connections tab (all processes at once, like Resource Monitor) instead of scoping to the selected process — worth doing eventually, but the per-process scope reuses existing per-PID attribution infrastructure and avoids probing every socket on every sample tick.
## Additional Context
Every serious "who's talking to what" tool in this space has this; tasksmack currently doesn't, despite already doing the harder work of per-process network *attribution* for the rate columns.
## Implementation Notes
- Linux: `src/Platform/Linux/NetlinkSocketStats.{h,cpp}` already parses `INET_DIAG` per-PID to attribute bytes — extend it to retain per-socket local/remote/state instead of only summing bytes.
- Windows: `src/Platform/Windows/WindowsProcessProbe.cpp` already calls `GetExtendedTcpTable` (~line 1361) to map connections to owner PID for EStats collection — extend to surface the full `MIB_TCPROW_OWNER_PID` rows instead of discarding them after attribution.
- Given potential socket count, this probably wants to be fetched lazily (only while Process Details is open for that PID), not part of every background-sampler tick.
Contributor guide
Research direction
Start with src/Platform/Linux/NetlinkSocketStats.{h,cpp} and src/Platform/Windows/WindowsProcessProbe.cpp, especially the existing INET_DIAG and GetExtendedTcpTable paths. Trace how per-PID attribution reaches Process Details, then determine where a lazy per-process query can expose local and remote endpoints, protocol, and state. Done means Process Details shows those connections for the selected PID without adding them to every background sampling tick.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100