Commit 2cb0822d LN

1

1 个父辈 0f6cde8a
......@@ -353,7 +353,7 @@ namespace OnlineStore.ACPackingStore
try
{
TimeSpan sp = DateTime.Now - lastLogTime;
if (sp.TotalMinutes > 3)
if (sp.TotalMinutes > 10)
{
lastLogTime = DateTime.Now;
Process[] processes = Process.GetProcesses();
......
......@@ -55,10 +55,13 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_01_DoorOpen))
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_03_LineRun);
InOutStoreLog(moveName + MoveInfo.SLog + "调用AgvClient.MayEnter,线体正转,等待LineIn_Check信号");
InOutStoreLog(moveName + MoveInfo.SLog + "调用AgvClient.MayEnter,线体正转,等待LineIn_Check 或LineTake_Check 信号");
AgvClient.SetStatus(Config.AgvNodeName, mark, "", ClientAction.MayEnter, ClientLevel.High, true);
LineRun();
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineIn_Check, IO_VALUE.HIGH));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineTake_Check, IO_VALUE.HIGH));
MoveInfo.OneWaitCanEndStep = true;
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_03_LineRun))
{
......@@ -202,35 +205,35 @@ namespace OnlineStore.DeviceLibrary
}
return mark;
}
private void LogCPU()
{
try
{
Process[] processes = Process.GetProcesses();
long totalMemery = 0;
StringBuilder sbResult = new StringBuilder();
int interval = 1000;
var prevCpuTime = TimeSpan.Zero;
foreach (Process process in processes)
{
if (process.ProcessName.EndsWith("ACPackingStore"))
{
sbResult.AppendFormat(DateTime.Now.ToLongTimeString() + Name+ ", 名称:{0} 内存:{1}M ", process.ProcessName, process.PrivateMemorySize64 / 1024 / 1024F);
totalMemery += process.PrivateMemorySize64 / 1024;
double value = (process.TotalProcessorTime - prevCpuTime).TotalMilliseconds / interval / Environment.ProcessorCount;
sbResult.AppendFormat(" CPU : " + Math.Round(value, 2) + "%");
// string result = string.Format("进程总数 {0} 个,共占内存:{1}MB \n", processes.Length, totalMemery / 1024) + sbResult.ToString();
LogUtil.info(sbResult.ToString());
}
}
}
catch (Exception ex)
{
LogUtil.error("LogM Error: " + ex.ToString());
}
}
//private void LogCPU()
//{
// try
// {
// Process[] processes = Process.GetProcesses();
// long totalMemery = 0;
// StringBuilder sbResult = new StringBuilder();
// int interval = 1000;
// var prevCpuTime = TimeSpan.Zero;
// foreach (Process process in processes)
// {
// if (process.ProcessName.EndsWith("ACPackingStore"))
// {
// sbResult.AppendFormat(DateTime.Now.ToLongTimeString() + Name+ ", 名称:{0} 内存:{1}M ", process.ProcessName, process.PrivateMemorySize64 / 1024 / 1024F);
// totalMemery += process.PrivateMemorySize64 / 1024;
// double value = (process.TotalProcessorTime - prevCpuTime).TotalMilliseconds / interval / Environment.ProcessorCount;
// sbResult.AppendFormat(" CPU : " + Math.Round(value, 2) + "%");
// // string result = string.Format("进程总数 {0} 个,共占内存:{1}MB \n", processes.Length, totalMemery / 1024) + sbResult.ToString();
// LogUtil.info(sbResult.ToString());
// }
// }
// }
// catch (Exception ex)
// {
// LogUtil.error("LogM Error: " + ex.ToString());
// }
//}
private void ShelfOutProcess()
{
string mark = GetMarkInfo();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!