mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Add OutgoingPacketsResentCount clientstack stat.
This allows one to monitor the total number of messages resent to clients over time. A constantly increasing stat may indicate a general server network or overloading issue if a fairly high proportion of packets sent A smaller constantly increasing stat may indicate a problem with a particular client-server connection, would need to check "show queues" in this case.
This commit is contained in:
@@ -145,6 +145,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
stat => stat.Value = m_udpServer.UdpSends,
|
||||
StatVerbosity.Debug));
|
||||
|
||||
StatsManager.RegisterStat(
|
||||
new Stat(
|
||||
"OutgoingPacketsResentCount",
|
||||
"Number of packets resent because a client did not acknowledge receipt",
|
||||
"",
|
||||
"",
|
||||
"clientstack",
|
||||
scene.Name,
|
||||
StatType.Pull,
|
||||
MeasuresOfInterest.AverageChangeOverTime,
|
||||
stat => stat.Value = m_udpServer.PacketsResentCount,
|
||||
StatVerbosity.Debug));
|
||||
|
||||
StatsManager.RegisterStat(
|
||||
new Stat(
|
||||
"AverageUDPProcessTime",
|
||||
@@ -294,6 +307,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
public Socket Server { get { return null; } }
|
||||
|
||||
/// <summary>
|
||||
/// Record how many packets have been resent
|
||||
/// </summary>
|
||||
internal int PacketsResentCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Record how many packets have been sent
|
||||
/// </summary>
|
||||
internal int PacketsSentCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Record how many inbound packets could not be recognized as LLUDP packets.
|
||||
/// </summary>
|
||||
@@ -1221,6 +1244,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
// Stats tracking
|
||||
Interlocked.Increment(ref udpClient.PacketsSent);
|
||||
|
||||
// We're not going to worry about interlock yet since its not currently critical that this total count
|
||||
// is 100% correct
|
||||
PacketsSentCount++;
|
||||
|
||||
// Put the UDP payload on the wire
|
||||
AsyncBeginSend(buffer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user