Remove spammy log messages when querying sim health

avinationmerge
Melanie 2011-12-12 13:51:31 +01:00
parent 95d533ce8a
commit afab4b276e
2 changed files with 14 additions and 10 deletions

View File

@ -1724,8 +1724,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
private void XmlRpcRegionQueryMethod(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient)
{
m_log.Info("[RADMIN]: Received Query XML Administrator Request");
Hashtable responseData = (Hashtable)response.Value;
Hashtable requestData = (Hashtable)request.Params[0];
@ -1736,16 +1734,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
UUID region_uuid = (UUID) (string) requestData["region_uuid"];
if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
}
else if (requestData.Contains("region_name"))
{
string region_name = (string) requestData["region_name"];
if (!m_application.SceneManager.TrySetCurrentScene(region_name))
throw new Exception(String.Format("failed to switch to region {0}", region_name));
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
}
else
{
@ -1760,8 +1754,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["health"] = health;
responseData["flags"] = flags;
responseData["message"] = text;
m_log.Info("[RADMIN]: Query XML Administrator Request complete");
}
private void XmlRpcConsoleCommandMethod(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient)

View File

@ -1171,8 +1171,8 @@ namespace OpenSim.Region.Framework.Scenes
if(m_hbRestarts > 10)
Environment.Exit(1);
m_log.ErrorFormat("[SCENE]: Restarting heartbeat thread because it hasn't reported in in region {0}", RegionInfo.RegionName);
int pid = System.Diagnostics.Process.GetCurrentProcess().Id;
//int pid = System.Diagnostics.Process.GetCurrentProcess().Id;
//System.Diagnostics.Process proc = new System.Diagnostics.Process();
//proc.EnableRaisingEvents=false;
//proc.StartInfo.FileName = "/bin/kill";
@ -4630,6 +4630,18 @@ namespace OpenSim.Region.Framework.Scenes
health+=1;
flags |= 4;
}
else
{
int pid = System.Diagnostics.Process.GetCurrentProcess().Id;
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.FileName = "/bin/kill";
proc.StartInfo.Arguments = "-QUIT " + pid.ToString();
proc.Start();
proc.WaitForExit();
Thread.Sleep(1000);
Environment.Exit(1);
}
if (flags != 7)
return health;