View on GitHub

MTracer

A trace-oriented monitoring platform, which is lightweight and efficiency, with a web-based frontend.

Download this project as a .zip file Download this project as a tar.gz file

Welcome to MTracer!

E-mail: jwzhou@nudt.edu.cn
Homepage: http://mtracer.github.io/jwzhou/

•  Overview
•  Publications
•  Getting Start
•  Trace
•  Data Storing
•  Contact us

Overview

MTracer is a white box-based trace-oriented monitoring platform, which is lightweight and efficient. MTracer adopts the client-server framework, just as X-Trace (Actually, we implement MTracer based on X-Trace). A special recording mechanism is employed for improving the efficiency. The data are stored in MySQL on the monitor server, where a parallel strategy and several optimizations are introduced to speed up the storing process. A web-based frontend for visualizing, called MTracer-Viz, is also provided, and some advanced functions are integrated in this frontend to do deeper data analyses. Also, we collected a trace data set with MTracer, called TraceBench.

Publications

Jingwen Zhou, Zhenbang Chen, Haibo Mi, and Ji Wang. MTracer: A Trace-Oriented Monitoring Framework for Medium-Scale Distributed Systems, in Proceedings of the 8th IEEE International Symposium on Service Oriented System Engineering (SOSE 2014), 2014, pp. 266-271. pdf, slides

Also refer to MTracer-Viz and TraceBench, or view traces on line.


Getting Start

The machines we used are 3 VMs hosted on CloudStack:
ID Name OS User Description
1 MonitorServer CentOS 6.3 64bit root The monitor server on which the MTracer and MTracer-Viz are deployed.
2 MonitorClient_1 CentOS 6.3 64bit root The monitored nodes for deploying the demo.
3 MonitorClient_2 CentOS 6.3 64bit root The same as MonitorClient_1

0. Prepare

a) Upload MTracer and MTracer-Viz to MonitorServer:/root, and upload MTracer to MonitorClient_1:/root and MonitorClient_2:/root
b) Shutdown the firewall on all 3 nodes
      • $ service iptables stop
c) Install JDK on all 3 nodes, we installed with jdk-7u11-linux-x64.tar.gz and JAVA_HOME=/usr/lib/jvm/jdk1.7.0_11.

1. Deploy MTracer

a) Install MySQL and set user "root" with a password "root", and set the port to be 3306
      • $ yum install mysql-server
      • $ service mysqld start
      • $ mysqladmin -u root password root
b) Set the monitor server address
      • $ vi MTracer/backend.sh
      • and set UDPSOURCE=MonitorServer:7831 at about line 3

2. Deploy MTracer-Viz

a) Install GraphViz
      • $ yum install graphviz
b) Set JAVA_HOME
      • $ vi MTracer-Viz/apache-tomcat-6.0.35/bin/catalina.sh
      • and set JAVA_HOME=/usr/lib/jvm/jdk1.7.0_11 at about line 86
c) Set the directory of web
      • $ vi /apache-tomcat-6.0.35/conf/server.xml
      • and set docBase="/root/MTracer-Viz/webapps" at about line 144
d) Add flanagan.jar for supporting the diagnosis function
      • $ cp MTracer-Viz/webapps/WEB-INF/lib/flanagan.jar $JAVA_HOME/jre/lib/ext/

3. Start Demo

a) Start MTracer
      • $ sh MTracer/backend.sh &
b) Start MTracer-Viz
      • $ sh MTracer-Viz/apache-tomcat-6.0.35/bin/startup.sh
c) Start demo server on MonitorClient_1
      • $ java -Dxtrace.udpdest=MonitorServer:7831 -cp /root/MTracer/bin/ chatapp.Server
      where xtrace.udpdest is the address of the monitor server
d) Start demo client on MonitorClient_2
      • $ java -Dxtrace.udpdest=MonitorServer:7831 -DserverAddress=MonitorClient_1 -cp /root/MTracer/bin/ chatapp.Client
      where serverAddress is the address of server in this chatting demo.
e) input some sentences on MonitorClient_2, where a sentence with word "bye" inside will terminal the demo.
f) Scan the collected traces and related information in local browser with a url of "http://MonitorServer:8080/"

Trace

refer to trace.

Data Storing

Traces are stored in the form of events and edges. There are following four tables in MySQL for storing data.

Table Fields Description
Event TraceID ID of the trace containing this event.
NID Refer to the paper.
OpName Name of the operation recorded by this event.
StartTime/EndTime Timestamps of starting/finishing the operation.
HostAddress/HostName Host IP/Name of generating this event.
Agent Location of the operation inside the code, usually meaning class.
Description Some results of executing the operation, including exceptions.
Edge TraceID/FatherNID/FatherStartTime/ChildNID Refer to the paper.
Trace TraceID ID of the trace containing this event.
Title Name of the trace.
NumEvents/NumEdges Number of events/edges included by this trace.
FirstSeen/LastUpdated Time of first/last receiving the data in this trace on monitor server.
StartTime/EndTime Timestamps of starting/finishing this event.
Operation OpName Name of the operation, corresponding to the OpName field in Event table.
Num Number of events recording this operation.
MaxLatency/MinLatency/AverageLatency Maximal/minimal/average latency of this operation.

Data in Trace and Operation are the statistic information, which can be extracted from the Event and Edge. In other words, the Event and Edge record all needed data of traces.

Contact us

• Jingwen Zhou(jwzhou@nudt.edu.cn): PhD Student, National University of Defense Technology, Changsha, China
• Zhenbang chen(zbchen@nudt.edu.cn): Lecturer, National University of Defense Technology, Changsha, China