diff options
author | UbitUmarov | 2017-06-14 20:19:13 +0100 |
---|---|---|
committer | UbitUmarov | 2017-06-14 20:19:13 +0100 |
commit | d9a300fa8e680ec3f41f966e87408e58f3aa0e39 (patch) | |
tree | 9cd459dda394a3f4ec8bfe258127269214806645 /OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | |
parent | remove options about script compilers the got back somehow on defaults also (diff) | |
download | opensim-SC-d9a300fa8e680ec3f41f966e87408e58f3aa0e39.zip opensim-SC-d9a300fa8e680ec3f41f966e87408e58f3aa0e39.tar.gz opensim-SC-d9a300fa8e680ec3f41f966e87408e58f3aa0e39.tar.bz2 opensim-SC-d9a300fa8e680ec3f41f966e87408e58f3aa0e39.tar.xz |
some cleanup.. remove some stats that only some do look at once on a lifetime
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 3be5a07..490809e 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | |||
@@ -124,15 +124,6 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
124 | "Without the 'full' option, only root agents are shown." | 124 | "Without the 'full' option, only root agents are shown." |
125 | + " With the 'full' option child agents are also shown.", | 125 | + " With the 'full' option child agents are also shown.", |
126 | (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd))); | 126 | (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd))); |
127 | |||
128 | scene.AddCommand( | ||
129 | "Comms", this, "show client stats", | ||
130 | "show client stats [first_name last_name]", | ||
131 | "Show client request stats", | ||
132 | "Without the 'first_name last_name' option, all clients are shown." | ||
133 | + " With the 'first_name last_name' option only a specific client is shown.", | ||
134 | (mod, cmd) => MainConsole.Instance.Output(HandleClientStatsReport(cmd))); | ||
135 | |||
136 | } | 127 | } |
137 | 128 | ||
138 | public void RemoveRegion(Scene scene) | 129 | public void RemoveRegion(Scene scene) |
@@ -540,107 +531,6 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
540 | return report.ToString(); | 531 | return report.ToString(); |
541 | } | 532 | } |
542 | 533 | ||
543 | /// <summary> | ||
544 | /// Show client stats data | ||
545 | /// </summary> | ||
546 | /// <param name="showParams"></param> | ||
547 | /// <returns></returns> | ||
548 | protected string HandleClientStatsReport(string[] showParams) | ||
549 | { | ||
550 | // NOTE: This writes to m_log on purpose. We want to store this information | ||
551 | // in case we need to analyze it later. | ||
552 | // | ||
553 | if (showParams.Length <= 4) | ||
554 | { | ||
555 | m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", "Region", "Name", "Root", "Time", "Reqs/min", "AgentUpdates"); | ||
556 | foreach (Scene scene in m_scenes.Values) | ||
557 | { | ||
558 | scene.ForEachClient( | ||
559 | delegate(IClientAPI client) | ||
560 | { | ||
561 | if (client is LLClientView) | ||
562 | { | ||
563 | LLClientView llClient = client as LLClientView; | ||
564 | ClientInfo cinfo = llClient.UDPClient.GetClientInfo(); | ||
565 | int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); | ||
566 | avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); | ||
567 | |||
568 | string childAgentStatus; | ||
569 | |||
570 | if (llClient.SceneAgent != null) | ||
571 | childAgentStatus = llClient.SceneAgent.IsChildAgent ? "N" : "Y"; | ||
572 | else | ||
573 | childAgentStatus = "Off!"; | ||
574 | |||
575 | m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", | ||
576 | scene.RegionInfo.RegionName, llClient.Name, | ||
577 | childAgentStatus, | ||
578 | (DateTime.Now - cinfo.StartedTime).Minutes, | ||
579 | avg_reqs, | ||
580 | string.Format( | ||
581 | "{0} ({1:0.00}%)", | ||
582 | llClient.TotalAgentUpdates, | ||
583 | cinfo.SyncRequests.ContainsKey("AgentUpdate") | ||
584 | ? (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100 | ||
585 | : 0)); | ||
586 | } | ||
587 | }); | ||
588 | } | ||
589 | return string.Empty; | ||
590 | } | ||
591 | |||
592 | string fname = "", lname = ""; | ||
593 | |||
594 | if (showParams.Length > 3) | ||
595 | fname = showParams[3]; | ||
596 | if (showParams.Length > 4) | ||
597 | lname = showParams[4]; | ||
598 | |||
599 | foreach (Scene scene in m_scenes.Values) | ||
600 | { | ||
601 | scene.ForEachClient( | ||
602 | delegate(IClientAPI client) | ||
603 | { | ||
604 | if (client is LLClientView) | ||
605 | { | ||
606 | LLClientView llClient = client as LLClientView; | ||
607 | |||
608 | if (llClient.Name == fname + " " + lname) | ||
609 | { | ||
610 | |||
611 | ClientInfo cinfo = llClient.GetClientInfo(); | ||
612 | AgentCircuitData aCircuit = scene.AuthenticateHandler.GetAgentCircuitData(llClient.CircuitCode); | ||
613 | if (aCircuit == null) // create a dummy one | ||
614 | aCircuit = new AgentCircuitData(); | ||
615 | |||
616 | if (!llClient.SceneAgent.IsChildAgent) | ||
617 | m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, Util.GetViewerName(aCircuit), aCircuit.Id0); | ||
618 | |||
619 | int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); | ||
620 | avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); | ||
621 | |||
622 | m_log.InfoFormat("[INFO]:"); | ||
623 | m_log.InfoFormat("[INFO]: {0} # {1} # Time: {2}min # Avg Reqs/min: {3}", scene.RegionInfo.RegionName, | ||
624 | (llClient.SceneAgent.IsChildAgent ? "Child" : "Root"), (DateTime.Now - cinfo.StartedTime).Minutes, avg_reqs); | ||
625 | |||
626 | Dictionary<string, int> sortedDict = (from entry in cinfo.AsyncRequests orderby entry.Value descending select entry) | ||
627 | .ToDictionary(pair => pair.Key, pair => pair.Value); | ||
628 | PrintRequests("TOP ASYNC", sortedDict, cinfo.AsyncRequests.Values.Sum()); | ||
629 | |||
630 | sortedDict = (from entry in cinfo.SyncRequests orderby entry.Value descending select entry) | ||
631 | .ToDictionary(pair => pair.Key, pair => pair.Value); | ||
632 | PrintRequests("TOP SYNC", sortedDict, cinfo.SyncRequests.Values.Sum()); | ||
633 | |||
634 | sortedDict = (from entry in cinfo.GenericRequests orderby entry.Value descending select entry) | ||
635 | .ToDictionary(pair => pair.Key, pair => pair.Value); | ||
636 | PrintRequests("TOP GENERIC", sortedDict, cinfo.GenericRequests.Values.Sum()); | ||
637 | } | ||
638 | } | ||
639 | }); | ||
640 | } | ||
641 | return string.Empty; | ||
642 | } | ||
643 | |||
644 | private void PrintRequests(string type, Dictionary<string, int> sortedDict, int sum) | 534 | private void PrintRequests(string type, Dictionary<string, int> sortedDict, int sum) |
645 | { | 535 | { |
646 | m_log.InfoFormat("[INFO]:"); | 536 | m_log.InfoFormat("[INFO]:"); |