[Opensim-dev] New Network Statistics
Sean M
mondesire.sean at gmail.com
Fri Jun 19 16:06:07 UTC 2015
Greetings,
The MOSES Team has completed work on adding more network-based statistics
gathering to OpenSim. With these changes, you will be able to accurately
determine, through the JSON SimStats, how your simulator is performing
network-wise with measures in packets, bytes, queue size, and latency.
Particularly with the latency measures, we have added variables to the
OpenSim.ini file (specified below) to allow you to turn these features on
and off (off by default). Furthermore, we have added IP-to-avatar tracking
that is outputted via a new JSON output stream (specified below).
The statistics work is available on our GitHub repo, where you may pull
from:
https://github.com/M-O-S-E-S/opensim
Below are details of each of the modified and newly added statistics.
*Network Statistics*
*PktsIn – *Now the number of packets received are averaged inside the
LLUDPClient before being sent to the SimStatsReporter. The time is
calculated using a stopwatch. This is done to enforce an accurate
measurement since the SimStatsReporter and the UDP message system are
running on separate threads. The stat is reported as the number of packets
per second.
*PktsOut -* Now the number of packets sent are averaged inside the
LLUDPClient before being sent to the SimStatsReporter. The time is
calculated using a stopwatch. This is done to enforce an accurate
measurement since the SimStatsReporter and the UDP message system are
running on separate threads. The stat is reported as the number of packets
per second.
*UDPIn –* This is the same as PktsIn except that it tracks the number of
bytes being received instead of the number of packets.
*UDPOut –* This is the same as PktsOut except that it tracks the number of
bytes being sent instead of the number of packets.
*UDPInError –* Tracks the number of packets that are sent to
RecordMalformedInboundPacket. Then divides by the time in the UDPClient
before sending the average number of packets that were malformed to the
SimStatsReporter. The stat is reported as the number of packets per second.
*ClientPing –* Average ping between OpenSim and a subset of its connected
users. This will show a value of -1 if the ping reply status was not
successful. A non-successful status may vary (e.g. Timeout, time limit
exceeded, firewall issues). Check C#'s IPStatus class for more information
on the various states:
https://msdn.microsoft.com/en-us/library/system.net.networkinformation.ipstatus(v=vs.110).aspx
*AvgPing –* Average ping to an external server. This will show a value of
-1 if the ping reply status was not successful. A non-successful status may
vary (e.g. Timeout, time limit exceeded, firewall issues). Check C#'s
IPStatus class for more information on the various states:
https://msdn.microsoft.com/en-us/library/system.net.networkinformation.ipstatus(v=vs.110).aspx
*NetFT *– Split into 2 statistics which are NetEvtTime and NetQSize.
*NetEvtTime *– This is acquired inside the LLUDPServer class inside the
IncomingPacketHandler. This records the time it took each time a packet is
processed then divides by the number of packets. This is a moving average
over N number of packets. Where N is equal to the number of frames being
stored for Total, Simulation, and Physics frame time.
*NetQSize *– This is acquired at the same time as NetEvtTime. This is the
size of the queue that is left to be processed. This is also a moving
average based on N, where N is equal to the number of frames being stored
for Total, Simulation, and Physics frame time.
*Client IP Addresses *– This is a list of clients and their IP Addresses.
In order to access the list use the address format as follows
[Server IP address]:[Port number]/[Custom URI name]
The default using the value in the example of Agent_Stats_URI would be
127.0.0.1:9000/jsonUserStats
*OpenSim.ini Changes*
The subheadings in this section correspond with the Sections inside of the
OpenSim.ini file.
Startup
*Agent_Stats_URI – *Provides the web URI that will allow the developer to
access the current clients and there IP Addresses. An example is
; Agent Login Stats URI
; Enable JSON agent data by setting a URI name (case sensitive)
; Returns regular agent stats (Name, IPAddress, Login)
Agent_Stats_URI = "jsonUserStats"
Statistics
*NumberOfFrames* – This is the number of frames or packets that will be
held onto and then averaged for total frame time, simulation frame time,
physics frame time, NetEvtTime, and NetQSize.
*ClientPingSubset – *This is an integer that defaults to 1. It is the
number of clients that will be pinged to create an average ping rate. This
is done as a subset of the total number of clients.
*ClientPingFrequency – *The frequency with which we ping the client. This
value is in seconds.
*ExternalServer – *Address of the external server to be pinged.
*ExternalPingFrequency – *The frequency with which we ping the external
server. This value is in seconds.
*PingExternalServerEnabled – *A flag that tells opensim whether it should
be pinging the external server.
*PingClientEnabled – *A flag that tells opensim whether it should be
pinging the clients.
*StatsUpdateEveryMS – *An integer that will control how often the
SimStatsReporter heartbeat will run for. This value should be given in
milliseconds.
Best regards,
Sean Mondesire, Ph.D.
MOSES Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20150619/0b49a5f4/attachment.html>
More information about the Opensim-dev
mailing list