Large-Scale System Problems Detection by Mining Console Logs

Large-Scale System Problems Detection by Mining Console Logs

Large-Scale System Problems Detection by Mining Console Logs Wei Xu Ling Huang Armando Fox David A. Patterson Michael Jordan Electrical Engineering and Computer Sciences University of California at Berkeley Technical Report No. UCB/EECS-2009-103 http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-103.html July 21, 2009 Copyright 2009, by the author(s). All rights reserved. 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. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission. Acknowledgement The authors would like to thank Bill Bolosky, Richard Draves, Jon Stearley, Byung-Gon Chun, Jaideep Chandrashekar, Petros Maniatis, Peter Vosshall, Deborah Weisser, Kimberly Keeton and Kristal Sauer for their great suggestions on the early draft of the paper. This research is supported in part by gifts from Sun Microsystems, Google, Microsoft, Amazon Web Services, Cisco Systems, Facebook, Hewlett-Packard, Network Appliance, and VMWare, and by matching funds from the University of California Industry/University Cooperative Research Program (UC Discovery) grant COM07-10240. Large-Scale System Problems Detection by Mining Console Logs Wei Xu¤ Ling Huangy Armando Fox¤ David Patterson¤ Michael Jordan¤ ¤UC Berkeley yIntel Research Berkeley Abstract part developer, part operator, and charged with fixing the Surprisingly, console logs rarely help operators detect problem—are usually not the people who chose what to problems in large-scale datacenter services, for they of- log or why. (We’ll use the term operator to represent a ten consist of the voluminous intermixing of messages potentially diverse set of people trying to detect opera- from many software components written by independent tional problems.) Furthermore, even in well-tested code, developers. We propose a general methodology to mine many operational problems are dependent on the deploy- this rich source of information to automatically detect ment and runtime environment and cannot be easily re- system runtime problems. We first parse console logs produced by the developer. To make things worse, mod- by combining source code analysis with information re- ern systems integrate external (often open source) com- trieval to create composite features. We then analyze ponents that are frequently revised or upgraded, which these features using machine learning to detect opera- may change what’s in the logs or the relevance of certain tional problems. We show that our method enables analy- messages. Keeping up with this churn rate exacerbates ses that are impossible with previous methods because of the operators’ dilemma. Our goal is to provide them with its superior ability to create sophisticated features. We better tools to extract value from the console logs. also show how to distill the results of our analysis to As logs are too large to examine manually [13, 20] and an operator-friendly one-page decision tree showing the too unstructured to analyze automatically, operators typi- critical messages associated with the detected problems. cally create ad hoc scripts to search for keywords such as We validate our approach using the Darkstar online game “error” or “critical,” but this has been shown to be insuffi- server and the Hadoop File System, where we detect nu- cient for determining problems [13, 20]. Rule-based pro- merous real problems with high accuracy and few false cessing [22] is an improvement, but the operators’ lack of positives. In the Hadoop case, we are able to analyze 24 detailed knowledge about specific components and their million lines of console logs in 3 minutes. Our method- interactions makes it difficult to write rules that pick out ology works on textual console logs of any size and re- the most relevant sets of events for problem detection. quires no changes to the service software, no human in- Instead of asking users to search, we provide tools to au- put, and no knowledge of the software’s internals. tomatically find “interesting” log messages. Since unusual log messages often indicate the source 1 Introduction of the problem, it is natural to formalize log analysis as an When a datacenter-scale service consisting of hundreds anomaly detection problem in machine learning. How- of software components running on thousands of com- ever, it is not always the case that the presence, absence puters misbehaves, developer-operators need every tool or frequency of a single type of message is sufficient to at their disposal to troubleshoot and diagnose operational pinpoint the problem; more often, a problem manifests problems. Ironically, there is one source of information as an abnormality in the relationships among different that is built into almost every piece of software that pro- types of log messages (correlations, relative frequencies, vides detailed information that reflects the original de- and so on). Therefore, instead of analyzing the words velopers’ ideas about noteworthy or unusual events, but in textual logs (as done, for example, in [25]), we cre- is typically ignored: the humble console log. ate features that accurately capture various correlations Since the dawn of programming, developers have used among log messages, and perform anomaly detection on everything from printf to complex logging and moni- these features. Creating these features requires augment- toring libraries [7, 8] to record program variable val- ing log parsing with information about source code; our ues, trace execution, report runtime statistics, and even method for doing this augmentation is part of our contri- print out full-sentence messages designed to be read by bution. a human—usually by the developer herself. However, We studied logs and source code of many popular soft- modern large-scale services usually combine large open- ware systems used in Internet services, and observed that source components authored by hundreds of develop- a typical console log is much more structured than it ap- ers, and the people scouring the logs—part integrator, pears: the definition of its “schema” is implicit in the log 1 printing statements, which can be recovered from pro- starting: xact 325 is COMMITTING starting: xact 346 is ABORTING gram source code. This observation is key to our log parsing approach, which yields detailed and accurate fea- tures. Given the ubiquitous presence of open-source soft- 1 CLog.info("starting: " + txn); 2 Class Transaction { ware in many Internet systems, we believe the need for 3 public void String toString() { source code is not a practical drawback to our approach. 4 return "xact " + this.tid + Our contribution is a general four-step methodology 5 " is " + this.state; 6 } that allows machine learning and information retrieval 7 } techniques to be applied to free-text logs to find the “needles in the haystack” that might indicate operational Figure 1: Top: two lines from a simple console log. Bot- problems, without any manual input. Specifically, our tom: Java code that could produce these lines. methodology involves the following four contributions: tion 3 describes our log parsing technique in detail, Sec- 1) A technique for analyzing source code to recover tions 4 and 5 present our solutions for feature creation the structure inherent in console logs; and anomaly detection, Section 6 evaluates our approach 2) The identification of common information in logs— and discusses the visualization technique, Section 7 dis- state variables and object identifiers—and the automatic cusses extensions and provide suggestions to improve creation of features from the logs (exploiting the struc- log quality, Section 8 summarizes related work, and Sec- ture found) that can be subjected to analysis by a variety tion 9 draws some conclusions. of machine learning algorithms; 3) Demonstration of a machine learning and informa- 2 Overview of Approach tion retrieval methodology that effectively detects un- 2.1 Information buried in textual logs usual patterns or anomalies across large collections of such features extracted from a console log; Important information is buried in the millions of lines of free-text console logs. To analyze logs automatically, 4) Where appropriate, automatic construction of a vi- we need to create high quality features, the numerical sualization that distills the results of anomaly detection representation of log information that is understandable in a compact and operator-friendly format that assumes by a machine learning algorithm. The following three no understanding of the details of the algorithms used to key observations lead to our solution to this problem. analyze the features. The combination of elements in our approach, in- Source code is the “schema” of logs. Although con- cluding our novel combination of source code analysis sole logs appear in free text form, they are in fact quite with log analysis and automatic creation of features for structured because they are generated entirely from a rel- anomaly detection, enables a level of detail in log analy- atively small set of log printing statements in the system. sis that was previously impossible due to the inability of Consider the simple console log excerpt and the source previous methods to correctly identify the features nec- code that generated it in Figure 1. Intuitively, it is essary for problem identification. easier to recover the log’s hidden “schema” using the Our approach requires no changes to existing soft- source code information (especially for a machine). Our ware and works on existing textual console logs of any method leverages source code analysis to recover the in- size, and some of the more computationally expensive herit structure of logs. The most significant advantage steps are embarrassingly parallel, allowing us to run them of our approach is that we are able to accurately parse all as Hadoop [2] map-reduce jobs using cloud computing, possible log messages, even the ones rarely seen in actual achieving nearly linear speedup for a few dollars per run.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    20 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us