Abstract
Event logging is an important technique for networked embedded systems like wireless sensor networks. It can greatly help developers to understand complex system behaviors and diagnose program bugs. Existing logging facilities do not well satisfy three practical requirements: flexibility, efficiency, and high synchronization accuracy. To simultaneously satisfy these requirements, we present Dylog, a dynamic logging facility for networked embedded systems. Dylog employs several techniques. First, Dylog uses binary instrumentation for dynamically inserting or removing logging statements, enabling flexible and interactive debugging at runtime. Second, Dylog incorporates an efficient storage system and log collection protocol for recording and transferring the logging messages. Third, Dylog employs a lightweight data-driven approach for reconstructing the synchronized time of the logging messages. Dylog uses MAC-layer timestamping and drift compensation to achieve high synchronization accuracy. We implement Dylog on the TinyOS 2.1.1/TelosB platform. Results show the following: (1) Dylog incurs a small overhead. Indirections in Dylog incur an additional execution overhead of less than 1%. Dylog reduces the logging storage size by approximately 50% compared with the standard TinyOS radio printf library. Dylog reduces the patch size by more than 90%, compared with incremental reprogramming. (2) Dylog reduces the synchronization overhead by 78% in terms of transmission cost, compared with a traditional time synchronization protocol, FTSP, and it can achieve a high time synchronization accuracy of 5.4μs. (3) Dylog can help diagnose system problems effectively at the source-code level for three real-world scenarios.
- T. Ball and J. R. Larus. 1996. Efficient path profiling. In Proceedings of Micro. Google ScholarDigital Library
- G. Barrenetxea, F. Ingelrest, G. Schaefer, M. Vetterli, O. Couach, and M. Parlange. 2008. SensorScope: Out-of-the-box environmental monitoring. In Proceedings of ACM/IEEE IPSN. Google ScholarDigital Library
- Bryan Buck and Jeffrey K. Hollingsworth. 2000. An API for runtime code patching. International Journal of High Performance Computing Applications 14 (2000), 317--329. Google ScholarDigital Library
- Qing Cao, Tarek Abdelzaher, John Stankovic, and Liqian Luo. 2008. Declarative tracepoints: A programmable and application independent debugging system for wireless sensor networks. In Proceedings of ACM SenSys. Google ScholarDigital Library
- Octav Chipara, Chenyang Lu, Thomas C. Bailey, and Gruia-Catalin Roman. 2010. Reliable clinical monitoring using wireless sensor networks: Experiences in a step-down hospital unit. In Proceedings of ACM SenSys. Google ScholarDigital Library
- Douglas S. J. De Couto, Daniel Aguayo, John Bicket, and Robert Morris. 2003. A high-throughput path metric for multi-hop wireless routing. In Proceedings of ACM MobiCom. Google ScholarDigital Library
- Thanh Dang, Nirupama Bulusu, Wu chi Feng, and Seungweon Park. 2009. DHV: A code consistency maintenance protocol for multi-hop wireless sensor networks. In Proceedings of EWSN. Google ScholarDigital Library
- Wei Dong, Chun Chen, Jiajun Bu, Xue Liu, and Yunhao Liu. 2013. D2: Anomaly detection and diagnosis in networked embedded systems by program profiling and symptom mining. In Proceedings of IEEE RTSS. 202--211. Google ScholarDigital Library
- Wei Dong, Chun Chen, Xue Liu, Yunhao Liu, Jiajun Bu, and Kougen Zheng. 2011. SenSpire OS: A predictable, flexible, and efficient operating system for wireless sensor networks. IEEE Transactions on Computing 60, 12 (2011), 1788--1801. Google ScholarDigital Library
- Wei Dong, Chao Huang, Jiliang Wang, Chun Chen, and Jiajun Bu. 2014a. Dynamic logging with Dylog for networked embedded systems. In Proceedings of IEEE SECON.Google ScholarCross Ref
- Wei Dong, Yunhao Liu, Yuan He, Tong Zhu, and Chun Chen. 2014b. Measurement and analysis on the packet delivery performance in a large scale sensor network. IEEE/ACM Transactions on Networking 22, 6 (2014), 1952--1963. Google ScholarDigital Library
- Wei Dong, Yunhao Liu, Xiaofan Wu, Lin Gu, and Chun Chen. 2010. Elon: Enaling efficient and long-term reprogramming for wireless sensor networks. In Proceedings of ACM SIGMETRICS. Google ScholarDigital Library
- Adam Dunkels, Björn Grönvall, and Thiemo Voigt. 2004. Contiki - a lightweight and flexible operating system for tiny networked sensors. In Proceedings of EmNets. Google ScholarDigital Library
- Mathias Ekman and Henrik Thane. 2007. Dynamic patching of embedded software. In IEEE RTAS. Bellevue, WA. Google ScholarDigital Library
- Dawson R. Engler, Wilson C. Hsieh, and M. Frans Kaashoek. 1996. ‘C: A language for high-level, efficient, and machine-independent dynamic code generation. In Proceedings of ACM POPL, 131--144. Google ScholarDigital Library
- Omprakash Gnawali, Rodrigo Fonseca, Kyle Jamieson, David Moss, and Philip Levis. 2009. Collection tree protocol. In Proceedings of ACM SenSys. Google ScholarDigital Library
- Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, and Kristofer Pister. 2000. System architecture directions for networked sensors. In Proceedings of ASPLOS. Google ScholarDigital Library
- Jingtong Hu, Chun Jason Xue, and Yi He. 2009. Reprogramming with minimal transferred data on wireless sensor network. In Proceedings of IEEE MASS.Google ScholarCross Ref
- Jonathan W. Hui and David Culler. 2004. The dynamic behavior of a data dissemination protocol for network programming at scale. In Proceedings of ACM SenSys. Google ScholarDigital Library
- Mohammad Maifi Hasan Khan, Hieu Khac Le, Hossein Ahmadi, Tarek F. Abdelzaher, and Jiawei Han. 2008. Dustminer: Troubleshooting interactive complexity bugs in sensor networks. In Proceedings of ACM SenSys. ACM, 99--112. Google ScholarDigital Library
- Sukun Kim, Rodrigo Fonseca, Prabal Dutta, Arsalan Tavakoli, David Culler, Philip Levis, Scott Shenker, and Ion Stoica. 2007. Flush: A reliable bulk transport protocol for multihop wireless networks. In Proceedings of ACM SenSys. Google ScholarDigital Library
- Peng Li and John Regehr. 2010. T-Check: Bug finding for sensor networks. In Proceedings of ACM/IEEE IPSN. Google ScholarDigital Library
- Kaisen Lin and Philip Levis. 2008. Data discovery and dissemination with DIP. In Proceedings of ACM/IEEE IPSN. Google ScholarDigital Library
- Yunhao Liu, Yuan He, Mo Li, Jiliang Wang, Kebin Liu, Lufeng Mo, Wei Dong, Zheng Yang, Min Xi, and Jizhong Zhao. 2011. Does wireless sensor network scale? A measurement study on Greenorbs. In Proceedings of IEEE INFOCOM.Google Scholar
- Yunhao Liu, Kebin Liu, and Mo Li. 2010. Passive diagnosis for wireless sensor networks. IEEE/ACM Transactions on Networking 18, 4 (2010), 1132--1144. Google ScholarDigital Library
- Jian-Guang Lou, Qiang Fu, Fengqi Yang, and Jiang Li. 2010. Mining program workflow from interleaved logs. In Proceedings of ACM SIGKDD. Google ScholarDigital Library
- Liqian Luo, Tian He, Gang Zhou, Lin Gu, Tarek F. Abdelzaher, and John Stankovic. 2002. Achieving repeatability of asynchronous events in wireless sensor networks with envirolog. In Proceedings of IEEE INFOCOM.Google Scholar
- Xufei Mao, Xin Miao, Yuan He, Xiang-Yang Li, and Yunhao Liu. 2012. CitySee: Urban CO2 monitoring with sensors. In Proceedings of IEEE INFOCOM. 1611--1619.Google Scholar
- Miklós Maróti, Branislav Kusy, Gyula Simon, and Ákos Lédeczi. 2004. The flooding time synchronization protocol. In Proceedings of ACM SenSys. ACM Press, 39--49. Google ScholarDigital Library
- Biyuan Mo, Wei Dong, Chun Chen, Jiajun Bu, and Qiang Wang. 2014. An efficient differencing algorithm based on suffix array for reprogramming wireless sensor networks. Ad Hoc & Sensor Wireless Networks 21, 3-4 (2014), 201--218.Google Scholar
- Moteiv Corp. 2004. Telos datasheet. (2004).Google Scholar
- George C. Necula, Scott McPeak, Shree P. Rahul, and Westley Weimer. 2002. CIL: Intermediate language and tools for analysis and transformation of C programs. In Compiler Construction. Springer, 213--228. Google ScholarDigital Library
- N. Ramanathan, K. Chang, L. Girod, R. Kapur, E. Kohler, and D. Estrin. 2005. Sympathy for the sensor network debugger. In Proceedings of ACM SenSys. Google ScholarDigital Library
- Raimondas Sasnauskas, Olaf Landsiedel, Muhammad Hamad Alizai, Carsten Weise, Stefan Kowalewski, and Klaus Wehrle. 2010. KleeNet: Discovering insidious interaction bugs in wireless sensor networks before deployment. In Proceedings of ACM/IEEE IPSN. Google ScholarDigital Library
- Robert Sauter, Olga Saukh, Oliver Frietsch, and Pedro José Marrón. 2011. TinyLTS: Efficient network-wide logging and tracing system for tinyos. In Proceedings of IEEE INFOCOM.Google ScholarCross Ref
- Roy Shea, Mani Srivastava, and Young Cho. 2010. Scoped identifiers for efficient bit aligned logging. In Design, Automation & Test in Europe Conference & Exhibition (DATE’& Exhibition (DATE’’10). IEEE, 1450--1455. Google ScholarDigital Library
- STMicroelectronics. 2004. M25P80 datasheet. (2004).Google Scholar
- Vinaitheerthan Sundaram, Patrick Eugster, and Xiangyu Zhang. 2010. Efficient diagnostic tracing for wireless sensor networks. In Proceedings of ACM SenSys. Google ScholarDigital Library
- Matthew Tancreti, Mohammad Hossain, Saurabh Bagchi, and Vijay Raghunathan. 2011. Aveksha: A hardware-software approach for non-intrusive tracing and profiling of wireless embedded systems. In Proceedings of ACM SenSys. Google ScholarDigital Library
- Gilman Tolle and David Culler. 2005. Design of an application-cooperative management system for wireless sensor networks. In Proceedings of EWSN.Google ScholarCross Ref
- Wei Xu, Ling Huang, Armando Fox, David Patterson, and Michael I. Jordan. 2009. Detecting large-scale system problems by mining console logs. In Proceedings of ACM SOSP. Google ScholarDigital Library
- J. Yang, M. L. Soffa, L. Selava, and K. Whitehouse. 2007. Clairvoyant: A comprehensive source-level debugger for wireless sensor networks. In Proceedings of ACM SenSys. Google ScholarDigital Library
- Ding Yuan, Haohui Mai, Weiwei Xiong, Lin Tan, and Yuanyuan Zhou. 2010. SherLog: Error diagnosis by connecting clues from run-time logs. In Proceedings of ASPLOS. Google ScholarDigital Library
- Ding Yuan, Jing Zeng, Soyeon Park, Yuanyuan Zhou, and Stefan Savage. 2011. Improving software diagnosability via log enhancement. In Proceedings of ASPLOS. Google ScholarDigital Library
Index Terms
- Dynamic Logging with Dylog in Networked Embedded Systems
Recommendations
Power Clocks: Dynamic Multi-Clock Management for Embedded Systems
EWSN '21: Proceedings of the 2021 International Conference on Embedded Wireless Systems and NetworksThis paper presents Power Clocks, a kernel-based dynamic clock management system that reduces active energy use in embedded microcontrollers by changing the clock based on ongoing computation and I/O requests. In Power Clocks, kernel hardware ...
Comments