我们如何处理停止生产的长时间运行的NETMF程序? [英] How do we trouble shoot a long-running NETMF program that stops in production?
问题描述
组织
我有一个 FEZ Cobra II NET 运行测试代码。它每秒将数据发送到LAN上的服务器。服务器将数据写入文本文件。经过27小时和97,200次成功发送后,眼镜蛇停止发送。显然我不会调试27个小时,而且我不知道如何解决麻烦,因为标准的软件故障排除方法不适用。
问题
- 如果我要写下眼镜蛇的日志错误,我该如何访问?
- NETMF是否有应用程序日志?我们如何访问它们?
- 是否有活动查看器?
- 还有什么其他故障排除/调试步骤可行吗?
代码
public class Program
{
私有静态定时器定时器;
私网网络;
public static void Main()
{
程序p = new Program();
p.network = new Network();
p.RepeatedlySendDataToWcfService();
Thread.Sleep(Timeout.Infinite);
}
private void RepeatedlySendDataToWcfService()
{
Program.timer =
new Timer(this.TimerCallback_SendSbcData,new object(),0,1000 );
}
private void TimerCallback_SendSbcData(object stateInfo)
{
SbcData data = new SbcData();
this.network.Send(data);
}
}
搜索与研究 / p>
- https://stackoverflow.com / search?q = netmf + Troubleshooting 没有结果。
- https://stackoverflow.com/search?q=netmf+error+log 没有结果。
- https://stackoverflow.com/search?q=netmf+remoting 没有结果。
- NETMF - 调试应用程序
由于Fez有一个存储卡插槽,您可以记录发送错误:
private v oid TimerCallback_SendSbcData(object stateInfo)
{
try
{
SbcData data = new SbcData();
this.network.Send(data);
}
catch(Exception ex)
{
MyLogToCardMethod(ex.ToString());
}
}
安装卡说明在制造商网站上: / p>
https:// www .ghielectronics.com / docs / 51 / netmf-file-system
Situtation
I have a FEZ Cobra II NET running test code. It sends data every second to a server on the LAN. The server writes the data to a text file. After 27 hours and 97,200 successful sends, the Cobra stops sending. Clearly I am not going to debug for 27 hours, and I am not sure how else to trouble shoot, because standard software trouble shooting approaches do not apply.
Question
- If I were to write to log errors on the Cobra, how would I access them?
- Does NETMF have application logs? How can we access them?
- Is there an event viewer?
- What other trouble shooting / debugging steps are viable here?
Code
public class Program
{
private static Timer timer;
private Network network;
public static void Main()
{
Program p = new Program();
p.network = new Network();
p.RepeatedlySendDataToWcfService();
Thread.Sleep(Timeout.Infinite);
}
private void RepeatedlySendDataToWcfService()
{
Program.timer =
new Timer(this.TimerCallback_SendSbcData, new object(), 0, 1000);
}
private void TimerCallback_SendSbcData(object stateInfo)
{
SbcData data = new SbcData();
this.network.Send(data);
}
}
Search and Research
- https://stackoverflow.com/search?q=netmf+troubleshooting No results.
- https://stackoverflow.com/search?q=netmf+error+log No results.
- https://stackoverflow.com/search?q=netmf+remoting No results.
- Can we access Cobra II error logs?
- NETMF - Debugging Applications
As the Fez has a memory card slot, you could log send errors to that:
private void TimerCallback_SendSbcData(object stateInfo)
{
try
{
SbcData data = new SbcData();
this.network.Send(data);
}
catch (Exception ex)
{
MyLogToCardMethod(ex.ToString());
}
}
Mounting the card instructions are on the manufacturer site:
https://www.ghielectronics.com/docs/51/netmf-file-system
这篇关于我们如何处理停止生产的长时间运行的NETMF程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!