skip to main content
research-article

Dynamic Logging with Dylog in Networked Embedded Systems

Published:31 December 2015Publication History
Skip Abstract Section

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.

References

  1. T. Ball and J. R. Larus. 1996. Efficient path profiling. In Proceedings of Micro. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarCross RefCross Ref
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. Mathias Ekman and Henrik Thane. 2007. Dynamic patching of embedded software. In IEEE RTAS. Bellevue, WA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. Omprakash Gnawali, Rodrigo Fonseca, Kyle Jamieson, David Moss, and Philip Levis. 2009. Collection tree protocol. In Proceedings of ACM SenSys. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. Jingtong Hu, Chun Jason Xue, and Yi He. 2009. Reprogramming with minimal transferred data on wireless sensor network. In Proceedings of IEEE MASS.Google ScholarGoogle ScholarCross RefCross Ref
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. Peng Li and John Regehr. 2010. T-Check: Bug finding for sensor networks. In Proceedings of ACM/IEEE IPSN. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Kaisen Lin and Philip Levis. 2008. Data discovery and dissemination with DIP. In Proceedings of ACM/IEEE IPSN. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle Scholar
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. Jian-Guang Lou, Qiang Fu, Fengqi Yang, and Jiang Li. 2010. Mining program workflow from interleaved logs. In Proceedings of ACM SIGKDD. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle Scholar
  28. 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 ScholarGoogle Scholar
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle Scholar
  31. Moteiv Corp. 2004. Telos datasheet. (2004).Google ScholarGoogle Scholar
  32. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarCross RefCross Ref
  36. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  37. STMicroelectronics. 2004. M25P80 datasheet. (2004).Google ScholarGoogle Scholar
  38. Vinaitheerthan Sundaram, Patrick Eugster, and Xiangyu Zhang. 2010. Efficient diagnostic tracing for wireless sensor networks. In Proceedings of ACM SenSys. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  40. Gilman Tolle and David Culler. 2005. Design of an application-cooperative management system for wireless sensor networks. In Proceedings of EWSN.Google ScholarGoogle ScholarCross RefCross Ref
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  43. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  44. Ding Yuan, Jing Zeng, Soyeon Park, Yuanyuan Zhou, and Stefan Savage. 2011. Improving software diagnosability via log enhancement. In Proceedings of ASPLOS. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Dynamic Logging with Dylog in Networked Embedded Systems

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM Transactions on Embedded Computing Systems
            ACM Transactions on Embedded Computing Systems  Volume 15, Issue 1
            February 2016
            530 pages
            ISSN:1539-9087
            EISSN:1558-3465
            DOI:10.1145/2872313
            Issue’s Table of Contents

            Copyright © 2015 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 31 December 2015
            • Accepted: 1 July 2015
            • Revised: 1 April 2015
            • Received: 1 April 2014
            Published in tecs Volume 15, Issue 1

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article
            • Research
            • Refereed

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader