Blue and Grey
Total Page:16
File Type:pdf, Size:1020Kb
Introduction to the Chime Visualization Tool for DTrace Bill Rushmore [email protected] Who Am I OpenSolaris Community Member since 2005 Work for Sun Microsystems in the OpenSolaris Developer Collaboration Team Blog: http://blogs.sun.com/brushmore Mostly a Java developer and helped with some of Chime's user interface before I worked for Sun Chime project leader What is Chime? Aggregation tool for DTrace Graphical tool Graphs data Plots data over time Sorting Stop, pause, and replay data Java based, relies on the DTrace Java API The History of Chime Side Project Tom Erickson, DTrace Java API developer Name inspired by a tuning fork Project was meant to be demonstration of the Java DTrace API Open source community project Chime Prerequisites Solaris 10 update 4 or later Nevada 35 or later OpenSolaris Java 6 Getting Chime NetBeans - DTrace GUI Plug-in Chime project - http://hub.opensolaris.org/bin/view/Project+dtrace-chime/install Packages for both x86 and Sparc IPS soon (Netbeans DTrace plugin is in the opensolaris.org repo) Permissions Chime needs special privileges to run Simplest way is to run as root (pfexec under OpenSolaris) Preferred method is to give user DTrace permissions in /etc/user_attr <user>::::defaultpriv=basic,dtrace_proc,dtrace_kernel Getting Started - Running Traces Most system wide traces take no parameters, just click on trace and press “Run” Some traces take a parameter (such as a PID) Running traces can be sorted on single or multiple columns Traces can be paused and readings can be viewed at your own pace Demo Advanced Trace Settings Some big traces may need default settings changed Right click on trace and modify DTrace '-x' options Common options that might need adjusted are bufsize and dynavarsize Chime Pros and Cons Pros Cons GUI Interface Java overhead Easy to use Will not make you a Pause DTrace expert Plot over time automatically! Recording Drill down Run traces on remote machines Default Traces Six categories Initial Traces Zones DTrace Toolkit Language specific traces Language Specific Traces Python Ruby Java In Initial Traces – “Method Times ...” Demo Chime's Traces Remote Chime Often you need to diagnose issues on a server Exporting a display is an option but slow. Chime has client and server modes that provide a significantly better user experience Requires an open port, 5088 is default, but others can be used Utilizes Java Management Extensions (JMX) and does not currently provide user authentication Remote Chime Remote Chime Commands Command on Server % /opt/OSOL0chime/bin/chime server Command on the client: % /opt/OSOL0chime/bin/chime <hostname> Utilizing Different Ports Command on the server: % /opt/OSOL0chime/bin/chime <hostname>:6000 Command on the client: % /opt/OSOL0chime/bin/chime clinker 6000 Drilling Down Most effective way of diagnosing system issues is to use the “Drill Down” technique Chime provides functionality to provide drill down features in traces Good example is the “System Calls” trace Demo Drilling Down Recording Traces Often traces display a lot of data and it can take time to find what you are looking for Sometimes you might need to show trace outputs to someone else Traces can recorded and played back later Recording Traces – Two Formats Object Serialization Fastest and most efficient method XML Portable but much bigger Demo Recording a Trace Listing Probes Convenient GUI feature for searching through DTrace probes on a system Adding Your Own Trace Rich set of options available Existing traces can be modified and viewed Wizard is provided to simplify adding a trace Simple Traces can be run from the command line for one time use Command Line Example % /opt/OSOL0chime/bin/chime -n ©sysinfo:::readch \ % { @bytes[execname] = sum(arg0); }© Demo Adding A Trace More Information Chime Community http://hub.opensolaris.org/bin/view/Project+dtrace-chime/ Solaris Dynamic Tracing Guide: http://www.sun.com/bigadmin/content/dtrace/d10_latest.pdf Solaris Performance and Tools by Richard McDougall, Jim Mauro, and Brendan Gregg, Sun Microsystems Press Solaris Internals by Richard McDougall and Jim Mauro, Sun Microsystems Press Questions .