Score:3

How to tell whether a linux tcp socket had recent activity?

cx flag

Most of the time, when changing or upgrading a network service, I would do this during maintenance hours but some services are rarely used so it is tempting to just check whether it is currently in use and if not, take it down for a minute or five.

Some service may not have an access log or I might just be too lazy to check it.

Is there a way to check whether there has been recent activity on its tcp network socket? Is there a command that shows when a connection was last used?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.