Network - How to debug/show network traffic in UE4?

Hello guys,
I’ve previously posted a question regarding some issues that we had connecting to a listening server (that I host locally). We find out that it was our router and it got fixed with a suggested port forwarding. Now the problem is that it lags a lot. I for instance tried very small networking examples (custom third person template) with two players and I see other guys pooping (as if the interpolation never existed) and updating very slowly. However wen I test locally (in my LAN) everything it’s gazillions fluid. I wondering how can I know if my Router is slowing things down? Is there a way to debug/show network traffic in UE4?
Any suggestions would be appreciated! :slight_smile:

There is a network profiler application included with the engine. It can show you a lot of information about how much bandwidth is being used, how many properties and actors are being replicated, and more. It is an advanced tool and we’d like to improve the interface in the future, but it should get you started.

It’s located at < your Unreal install directory >/< version >/Engine/Binaries/DotNET/NetworkProfiler.exe.

In order to view data in the application, you have to capture a profile while your game is running. To do this, enter the command ‘netprofile’ in the console to start recording and enter it again to stop recording. After recording stops, there should be an *.nprof file in your game’s Saved/Profiling directory. Open this file in the Network Profiler and you can see the statistics that were recorded.

Note that more information is recorded when profiling on the server, so you may find that more useful in debugging.

2 Likes

Thanks for the tips and info Ryan! :slight_smile:

Ah, sorry. I forgot to mention that you need to use an editor build to enable that command!

Sorry but when I type netprofile in the console, nothing happens, it says “Unrecognized Command”.

Does this still work in 4.5? Just tried it and all it will output is a *.tmp file

Once you type ‘netprofile’, the engine will generate a .tmp. And then, when you want to finish the network profile recording, you have to type again ‘netprofile’.
Automatically, the tmp file will be converted into the desired .nrprof file.

it does not work for me, using 4.8.2, it only outputs a .tmp file even if I type “netprofile” twice.

Same for me

Any infos on how this works in 4.8.3? It keeps not creating the file properly…