It is currently March 29th, 2024, 1:17 am

netstat

General topics related to Rainmeter.
Peter1107
Posts: 3
Joined: April 20th, 2012, 7:12 am

netstat

Post by Peter1107 »

a sample code for netstat, I want to create a skin that will show me the occupied ports. is rainmeter supports netstat?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: netstat

Post by jsmorley »

Peter1107 wrote:a sample code for netstat, I want to create a skin that will show me the occupied ports. is rainmeter supports netstat?
No, not really. You could execute a vbs script or something that executes "netstat >SomeFile.txt" in DOS and then use Lua to open, read and parse the text file and pass values back to Rainmeter in a variety of ways. However, netstat is VERY slow to run while it is enumerating your connections, and can easily take 10-30 seconds just to create the text file. It will be very difficult to use that in any reliable and efficient way in Rainmeter, as you are as often as not going to be reading the file while it is being created and have problems.

There may be some way to cobble together something that makes it more reliable, but it's never going to be very "real time" due to how slow netstat is in executing.
Ivan Lopes
Posts: 1
Joined: October 6th, 2018, 10:18 pm

Re: netstat

Post by Ivan Lopes »

Existe alguma opção diferente para resolver essa questão?

Is there a different option to solve this question?