Score:0

how to continues netstat a port and save it to text file with time stamp for each netstat

pe flag

I am using a system which is integrated to other system using a specific port and recently I am facing multiple interruption in the integration, and I need to monitor the port "48823" for a complete day and save it to a text file with time stamp for each netstat status as below example:

15/12/2022 13:37:00 TCP 10.10.10.150:48823  10.10.10.151:4003 Established
15/12/2022 15:22:10 TCP 10.10.10.150:48823  10.10.10.151:4003 Listening
15/12/2022 13:37:00 TCP 10.10.10.150:48823  10.10.10.151:4003 Time_wait

I tired the following command: " netstat -na | find "48823" > c:\netstat.txt". but it gives only the current status not a continuous one. Also it is not showing the date and time stamp

so appreciate if someone can help by sharing the correct command.

Romeo Ninov avatar
in flag
What you did so far?
Hossam M avatar
pe flag
I tried " netstat -na | find "48823" > c:\netstat.txt" but it gives only the current status not a continuous one. Also it is not showing the date and time stamp.
Romeo Ninov avatar
in flag
Add this to the question, not in comment
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.