rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: newbie on October 23, 2019, 02:18:01 PM
-
I notice that the UI displays a table for Connections with 6 entries for one client.
Is there a way for me to get that list of IP addresses via a script?
There doesnt appear to be a GetConnections here:
https://www.rejetto.com/wiki/index.php/HFS:_scripting_commands#Connections_control
-
cmd command:
C:\Users\Brandon>netstat -a
example out look:
Active Connections
Proto Local Address Foreign Address State
TCP 0.0.0.0:7 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:9 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:13 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:17 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:19 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:135 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:445 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:2179 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:5040 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:5357 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:49664 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:49665 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:49666 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:49667 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:49668 Brandon-Laptop:0 LISTENING
TCP 0.0.0.0:49672 Brandon-Laptop:0 LISTENING
-
Ok. Thanks. That should work.
-
Sorry. I am back. I cannot depend on netstat -a anymore.
The machine is going to be host to numerous other servers, and I want to be able to filter out the non-HFS connections.
I'm thinking of collecting the IPs when the clients make the first initialization call to HFS, and removing the IP when the client disconnects.
Unless you'all know of something better.
-
i remember something with the hfs log and macro ...
something like macro command
append %ip%
https://www.rejetto.com/wiki/index.php/HFS:_scripting_commands
might have to become an hfs event
like syslog watch dog
https://www.rejetto.com/wiki/index.php/HFS:_Event_scripts
[request]
Append log.txt %time% %ip%
something like that...