Tags: walles/ftop
Tags
Show process info for a PID argument "ftop 7619" now opens the process info page for PID 7619 right away, rather than only filtering the process list on it. Quitting the page lands in the interactive view with that process picked and pinned to the top line, as if the user had arrowed down to it, so "k" and "i" apply to it right away. Connections are drawn with nicer arrows now: "curl(999) ──▶ ftop(42)" where it used to say "curl(999) --> ftop(42)", and "◀?▶" for the ones whose direction can't be known. A process connected to itself names the picked process at both ends of the line, and both ends are now highlighted the way that name is everywhere else on the page. Columns line up around wide characters. A CJK character paints two terminal columns while counting as one character, and a combining mark paints none, so sections measuring their widths by counting characters came out ragged around the process names and unix socket paths that carry either. The "Command Line" section says which process it is about.
Show unix domain socket connections The "Inter Process Communication" section of the process info page now lists unix domain sockets as well, alongside the TCP, UDP and pipe connections it already showed. Each line names the process at the other end and the socket path it is talking over, on both Linux and macOS. A connection is named by the path of the service that was dialed rather than by whichever end you happen to be looking at, so both ends of the same connection describe it the same way, and the arrow points from the one who dialed to the one who was dialed. Where that cannot be known, a socketpair for example, the line still shows but without an arrow. Anonymous pipes on macOS now say which way they flow. A pipeline that used to render "tail(40504) <?> sort(40505)" now renders "tail --> sort", the direction coming from the kernel rather than from lsof, which does not report it there.
Show who a process is talking to The process info page has two new sections. "Network Connections" lists the ports the process listens on and its connections to remote hosts. "Inter Process Communication" lists the process' connections to other processes on this machine, TCP, UDP and pipes alike, naming the process at the other end. Both sections draw each connection as an arrow pointing from whoever dialed to whoever was dialed, and use a question mark where that can't be known: UDP never says who dialed whom, and on macOS neither does a pipe.
Show processes sharing the working directory The process info page now ends with a list of other processes whose current working directory is the same as the picked process'. The page also shows up right away now, instead of after the slowest section is done. Sections that shell out fill in below the rest as they finish. Finally, crashes are handled better: ftop no longer hangs with a blank terminal when something crashes while the process info page is up, a crash while composing that page now says so in the page, and crashing makes ftop exit non-zero.
Handle computer sleeps better Before this change, when the computer went to sleep or was sleeping, ftop would mess up computing process start times. This lead to processes sameness checks failing, and thus processes would sometimes be treated as new even when they weren't. This change tries to mitigate that by detecting sleep related anomalies and ignoring those data points.
PreviousNext