OpenSolaris
Collectives
Discussions
Documentation
Download
Source Browser
Free CD
Log-in
|
en
Project dtrace-chime
:
Adding New Displays
>
New Display Wizard
Top Menu
Show
:
Comments
Attachments
History
Information
Print
:
Print
Print preview
Export as PDF
Export as RTF
Export as HTML
Export as XAR
Wiki code for
New Display Wizard
Hide Line numbers
1: == New Display Wizard 2: 3: Chime displays are described in XML (see [[Adding New Displays>>..]]), and a wizard is provided to generate that XML for you. You can access the wizard from the menu (**File | New Display ...**) or directly from the command line with the {{code}}-W{{/code}} option. Use the wizard to create new displays or edit existing ones. 4: 5: [[image:wizardmenuitem.gif||alt="Wizard Menu Access"]] 6: 7: Let’s say you want a display to monitor **system calls per second** made by each executable on the system. The following walks you through the steps of creating such a display: 8: 9: ==== Walk-Through (System Calls Example) 10: * [[Set Title and Output File>>#Set_Title_and_Output_File]] 11: * [[Set DTrace Program>>#Set_DTrace_Program]] 12: * [[Set Cleared Aggregations>>#Set_Cleared_Aggregations]] 13: * [[Specify Columns>>#Specify_Columns]] 14: ** [[First Unspecified Column>>#First_Unspecified_Column]] 15: *** [[Specify Column Data>>#Specify_Column_Data]] 16: *** [[Set Column Properties>>#Set_Column_Properties]] 17: ** [[Next Unspecified Column>>#Next_Unspecified_Column]] 18: ** [[Aggregation Value Column>>#Aggregation_Value_Column]] 19: * [[Test Run the Display>>#Test_Run_the_Display]] 20: * [[Provide a Description>>#Provide_a_Description]] 21: * [[Finish Creating the Display>>#Finish_Creating_the_Display]] 22: * [[Add Drilldown>>#Add_Drilldown]] 23: 24: === Set Title and Output File 25: 26: When the wizard appears, you will see the default title "Display" highlighted in the **Title** field. 27: 28:  29: 30: Type "System Calls" and press {{code}}Enter{{/code}} to proceed to the next step. 31: 32: [[image:wizardtitle.gif||alt="Wizard Set Title Step"]] 33: 34: === Set DTrace Program 35: 36: Click in the text pane under the **Program String** radio button and enter 37: the following DTrace program: 38: 39: [[image:wizardprogram.gif||alt="Wizard Set Program Step"]] 40: 41: You can click the **Check Compile** button to make sure you typed the program correctly. If there is a syntax error, you will see a red ’X’ instead of a green check mark, and there will be a hyperlink to view details about the error. For help adapting DTrace programs to Chime, click on the **Help** button. To learn about writing DTrace programs with aggregations displayable in Chime, a good place to start is the [[Aggregations>>http://docs.sun.com/app/docs/doc/817-6223/6mlkidlh7?q=trunc&a=view]] chapter of the //Solaris Dynamic Tracing Guide//. 42: 43: Press {{code}}Alt-N{{/code}} (or click the **Next** button) to proceed to the next step: 44: 45: === Set Cleared Aggregations 46: 47: In this step you specify whether or not you want running totals. By default, Chime clears all aggregations, resetting their values to zero, each time it gets the latest snapshot of aggregate data. Since we want to display system calls per second, the default behavior (no running totals) is the right choice. Simply proceed to the next step. 48: 49: Note that if your program included other aggregations, they would show up here, each with its own check box. For example, if your program included the statement {{code}}@counts[execname] = count();{{/code}} then "counts" would also appear in the list of individually clearable aggregations. 50: 51: [[image:wizardaggs.gif||alt="Wizard Clear Aggregations Step"]] 52: 53: === Specify Columns 54: 55: Here we list all the columns by name as they will appear in the display’s column header from left to right. It helps to picture the table you want to display. In this case, we want a display similar to the "System Calls" display installed with Chime: 56: 57:  58: 59: * An "Executable" column, right aligned 60: * A "History" column with a sparkline 61: * A renamed "Calls Per Second" column, left aligned 62: 63: The basic idea is to include one column for each element of the aggregation key followed by a column for the aggregation values. Since we are aggregating {{code}}@[execname] = count();{{/code}} we need one column for the {{code}}execname{{/code}} key followed by one column for the {{code}}count(){{/code}} values. If we were instead aggregating {{code}}@[execname, probefunc] = count();{{/code}} we would need two key columns, one for {{code}}execname{{/code}} and one for {{code}}probefunc{{/code}}, followed by one value column for {{code}}count(){{/code}}. In this case, we only need two columns: "Executable" for the {{code}}execname{{/code}} key and "Calls Per Second" for the {{code}}count(){{/code}} values. However, we insert an additional "History" column to provide a sparkline view of the data in the "Calls Per Second" column over time. 64: 65: [[image:wizardcols.gif||alt="Wizard Specify Columns Step"]] 66: 67: Type "Executable" and press {{code}}Enter{{/code}} to add a new empty row. Type "History" and press {{code}}Enter{{/code}} again. When you finish typing "Calls Per Second" (with or without pressing {{code}}Enter{{/code}}) you can click **Next** to proceed to the next step. 68: 69: === First Unspecified Column 70: ==== Specify Column Data 71: 72: Here we specify the first unspecified column, "Executable". To start, we simply need to indicate whether the column displays an aggregation key (such as {{code}}execname{{/code}} in {{code}}@[execname] = count();{{/code}}) or an aggregation value (such as {{code}}count(){{/code}} in {{code}}@[execname] = count();{{/code}}). A third type of column, the **Alternate View** (see below) is special: it takes source data from another column (or columns) and presents that data differently. The "History" column is an example of an alternate view. 73: 74:  75: 76: In this case our job is easy. The screen already indicates **Tuple Member** (a member of an aggregation key) with **Tuple Index** 0 (the first element in square brackets). That corresponds to {{code}}execname{{/code}} in {{code}}@[execname] = count();{{/code}} exactly what we intend. Simply click **Next**. 77: 78: ==== Set Column Properties 79: 80: This step allows us to set properties appropriate for a column that displays part of an aggregation key. 81: 82:  83: 84: As before, we could simply click **Next**. However, a totals row would be nice, and it’s not much trouble. Choose "Count" from the **Total** pulldown and specify the singular and plural forms of the units label. Type "executable" in the **Singular Total Label** field. What you type is echoed in the **Plural Total Label** field, so all you need to do is press {{code}}Tab{{/code}} followed by {{code}}s{{/code}} to complete the plural form. If, instead of {{code}}@[execname] = count();{{/code}} we were aggregating {{code}}@[execname, probefunc] = count();{{/code}}, then the "Executable" values would repeat within the column, so we would need to choose "Unique Count" rather than "Count" to display the number of unique executables. 85: 86: We also want to right-align the executable names so they are easier to associate visually with their {{code}}count(){{/code}} values in the columns to the right. Choose "right" from the **Alignment** pulldown. 87: 88: Now click **Next**. 89: 90: === Next Unspecified Column 91: 92: Now we repeat steps **4a. Specify Column Data** and **4b. Set Column Properties** for the "History" column. The green check at the top of the screen indicates that we have successfully specified the previous "Executable" column. 93: 94:  95: 96: This time, the screen initially indicates **Tuple Member** with a **Tuple Index** of 1 (auto-incremented from the tuple index of the previous "Executable" column). This does not correctly indicate the purpose of the "History" column. Choose "Calls Per Second" from the **Source Columns** pulldown. This automatically selects the **Alternate View** radio button. 97: 98: Click **Next**. 99: 100:  101: 102: **Sparkline** is already selected. The "History" column will present an alternate view (over time) of the {{code}}count(){{/code}} data from the "Calls Per Second" column using a sparkline graph (see Edward Tufte’s [[Sparklines>>http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR&topic_id=1]] page.) 103: 104: Click **Next** and proceed to the last unspecified column. 105: 106: === Aggregation Value Column 107: 108: The last column, "Calls Per Second", displays the values of the {{code}}count(){{/code}} aggregating action. As before, the initial selection in this screen is **Tuple Member**, which we need to change, since this column does not display part of the aggregation key. 109: 110:  111: 112: Select **Aggregation Value** and leave the **Aggregation Name** field empty since the aggregation in our DTrace program is unnamed: {{code}}@[execname] = count();{{/code}} ({{code}}@{{/code}} is the anonymous aggregation). 113: 114: Click **Next**. 115: 116: Columns that display aggregation values have more properties to specify than columns that display aggregation keys: 117: 118:  119: 120: Check **Value Per Second**. 121: Choose "left" in the **Alignment** pulldown. 122: Choose "#,==0" in the **Format** pulldown, indicating thousands separators. 123: 124: Scroll down ... 125: 126:  127: 128: Choose "Sum" from the **Total** pulldown. 129: 130: Click **Next**. 131: 132: Once all the columns have been specified, we return to step **4. Specify Columns** to confirm the intended list of columns before moving on. 133: 134:  135: 136: The green check marks indicate which columns have been specified (all of them). Again, the columns are listed in the order they will appear from left to right in the display. We also see some new indicators: "[0]" after "Executable" is like an array index indicating that the column displays the first member of the aggregation key. "( Calls Per Second )" indicates that the "History" column presents an alternate view of data from the "Calls Per Second" column. "@" indicates that the "Calls Per Second" column displays aggregation values from the anonymous aggregation. If the aggregation had instead been named {{code}}@counts{{/code}} in our DTrace program, we would see "@counts" here instead. 137: 138: If you want to make any corrections, you can select any of the listed column names and click the **Specify >** button to redo steps **4a** and **4b** for that column, or click **Specify >>** to redo only step **4b**. Afterwards you will again return to the column list (above) to confirm your specifications before moving on. 139: 140: Click **Next**. 141: 142: === Test Run the Display 143: 144: Having all the columns specified, we could have clicked **Finish** instead, but why not test the display first to see if does what we intended? This step lets us do just that: 145: 146:  147: 148: Click the **Run Display** button. Another window will appear with a display that should look something like this: 149: 150:  151: 152: By default, the display is sorted in ascending order by the aggregation key. Click on the "Calls Per Second" column header to sort by value descending. How you set the sort during the test run determines the initial sort of the created display. We could also change the initial window size, but the default seems like a good size. 153: 154: If you find that you need to make some corrections, click on the **Back** button to revisit any of the previous steps. You can leave the test display running so that it is available for side-by-side comparison when you return to this screen for an updated test run. 155: 156: This test display improves on the installed "System Calls" display by adding a totals row and a better initial sort. You can close it and click **Next** in the wizard to provide a description. 157: 158: === Provide a Description 159: 160: Whatever text you enter to describe the display appears in the **Description** pane in the main Chime window when the new display is selected in the **Traces** list. You can use HTML to specify things like bold, italic, underline, font, and numbered or bulleted lists. 161: 162:  163: 164: Above is a fancifully obtuse description that serves to illustrate the formatting possibilities just listed (although the point about the cyan scale indicator might actually be helpful). Here is the resulting description as it will appear when the display is selected in the main Chime window: 165: 166:  167: 168: Click **Next**. 169: 170: === Finish Creating the Display 171: 172: The next step adds drilldown support. It is evidently disabled, and the explanatory paragraph is intended to make clear that our DTrace program is not written in the way required to support drilldown. 173: 174:  175: 176: We could use the **Back** button to remedy this, but that’s a long way to back up, so it’s probably easier to finish what we have and reopen it later at step 1, only one step away from our DTrace program. 177: 178: Click **Finish**. You should see the following console output: 179: 180: {{{ 181: Wrote /opt/OSOL0chime/displays/new/system~_calls.xml 182: To run, enter "/opt/OSOL0chime/bin/chime -C /opt/OSOL0chime/displays/new/system~_calls.xml". 183: }}} 184: 185: Besides running the display directly from the command line, you can also load newly created displays from the **Trace Group** pulldown of the main Chime window: 186: 187:  188: 189: New displays are put in {{code}}/opt/OSOL0chime/displays/new{{/code}} by default, where they are accessed by the menu item pictured above. If this is the first time you have created a new display, congratulations! You will see the following list with your one new display: 190: 191:  192: 193: You can move the {{code}}.xml{{/code}} descriptions to {{code}}/opt/OSOL0chime/displays{{/code}} or another of its subdirectories later as you find out which new displays are useful. In that case, if you specified the DTrace program as a file with a relative pathname, you may need to update that pathname relative to the new location. 194: 195: === Add Drilldown 196: 197: Drilldown lets you answer questions about values of interest. For example, for a selected executable you could get a breakdown of its system calls by function. Click [[here>>drilldown]] to continue this walk-through by adding drilldown to your new display.
Search
Collectives
Community Group
Academic and Research
Accessibility
Advocacy
Appliances
Approachability
Architecture Process and Tools
BrandZ
Chinese Users
Community Advisory Board
Databases
Desktop
Device Drivers
Distribution
Documentation
DTrace
Emerging Platforms
Fault Management
Games on OpenSolaris
HA Clusters
HPC Developer
Installation and Packaging
Internationalization and Localization
Laptop
Logical Domains
Modular Debugger (MDB)
Networking
NFS
Observability
OpenSolaris Governing Board (OGB)
OpenSolaris Printing
OS/Net (ON)
Performance
Power Management
PowerPC
Security
Service Management Facility (smf(5))
Software Porters
Solaris Volume Manager
Storage
Systems Administration Community Group
Testing
Tools Home
Unix File Systems (UFS)
Website Community
X Window System
Xen
ZFS
Zones
Project
ADSL Modem Enhancement
ARC Process Definition
ARM Platform Port
Automatic Data Migration
BIND Update
Bluetooth Stack & Drivers
Brocade FC HBA - Initiator
Brocade FC HBA - Target
Brussels - unified network link configuration
Caiman, Solaris Install Revisited
Celeste
Český portál
Chime Visualization Tool for DTrace
CIFS client for Solaris
CIFS Server
Clearview: Network Interface Coherence
Cluster Agent: Informix Dynamic Server
Cluster Agent: OpenSolaris Container
Cluster Agent: OpenSolaris xVM
Cluster Agent: Oracle E-Business Suite
Cluster agent: PostgreSQL
Cluster Agent: Samba
Cluster Agent: Tomcat
CMT
Coarse Data Flow Parallelism
Colorado: Open HA Cluster on OpenSolaris
Command Assistant
Common Array Manager
Companion - /opt/sfw: Free and Open Source software
COMSTAR: Common Multiprotocol SCSI Target
Content
Contest
CPU Observability
Credentials Process Groups
Crossbow: Network Virtualization and Resource Control
Crypto KMS Agent Toolkit
Cryptographic Framework
Data Migration Manager
Data Tethers
Deutsches Portal
Device Detection Tool
Device Driver Utility
Device Manager
Device Mapper
Direct Rendering Infrastructure & 3D drivers
DTrace Guide
Duckwater: Simplified name services management
Easy Tools
Emancipation
Emulex Fibre Channel Device Driver
Emulex Advanced Ethernet Device Driver
Enable/Enhance Solaris support for Intel Platform
Enhance the support of USB webcams
Enhanced SMF Profiles
Enhancements for AMD-based Platforms
Erlang DTrace Integration
Ethernet bridge module for Solaris
Evaluate Conary
Events Registry
Ext3 file system support
F/OSS Package Base
Facilitation
Fibre Channel over Ethernet
Fine Grained Access Policy (FGAP)
Fingerprint Authentication
Flexible Mandatory Access Control
Forensic Tools
Fully Open X Project
Fuse on Solaris
gcore
Generic Machine Check Architecture Improvements
Google SOC
HA-JBoss
HA-MySQL
Hadoop Live CD
Hitachi
HoneyComb Fixed Content Storage
HPC Stack
Image Packaging System
Improved Performance MIB
Indiana
Innovation Awards
Input Method
Intel Graphics
Internet Key Exchange, version 2
Interrupt Resource Management
IP Datapath Refactoring
IP over Infiniband
IPsec Tunnel Reform
iSCSI Extensions for Remote DMA (iSER)
iSNS Server
JeOS - Just enough Operating System
JKstat - a java binding for libkstat
Journaled File System (JFS)
K Desktop Environment
Kerberos
Kernel Sockets
Kernel SSL Enhancements
Key Management Framework
Korn Shell 93 integration/migration project
Labeled IPsec
LatencyTOP
Layer 2 Filtering
LDoms Manager
Lending
libMicro - portable microbenchmarks
Link Layer Discovery
Live Media: Technologies for distributions running from CD and other media
Locale Data
lofi compression and cryptography support
lx64 brand
Media Management System
Mega_sas
Mexico
MilaX minimal Live Distribution
MIPS Platform Port
Mozilla DTrace
MRSL.NONsharedDevice
Multi-lingual Glossary
Multi-pathing software (MPxIO)
Multiple disk sector size support
Multiple DOI
Muskoka: An open repository for OpenSolaris technical content
Navigator
Nemo: A Framework for High-Performance Networking
Network Auto-Magic
Network Data Management Protocol
Network MIBs
Network Storage
Network Time Protocol (NTP)
Nevada Globalization
New Design of 4over6 Mechanism Based on OpenSolaris
NFS RDMA transport update and performance analysis
NFS Server in non-Global Zones
NFS version 4.1 pNFS
NFSv4 namespace extensions
Nightingale: Port Songbird to OpenSolaris
NPort ID Virtualization (NPIV)
NUMA
Object Storage Device (OSD) support for Solaris
OHACGE Script Based Plug-in
ON/Nevada (ONNV) Project
Open Development Infrastructure
Open HA Cluster Utilities
Open Sound System
OpenGrok
OpenPegasus CIM Server
OpenRTI
OpenSolaris Busybox
OpenSolaris Desktop
OpenSolaris Hispano
OpenSolaris Security Audit
OpenSolaris support for the QEMU processor emulator: host and guest
PEF: Packet Event Framework
Performance Wrappers
Pkgfactory
Polski Portal
Portail Francophone
Portal Brasil
Portals
Power Management Usability Interfaces
Presto: Automatic Printing Configuration
Printable Many Page Solaris Manuals
Promise SuperTrak RAID HBA Driver
QLogic Converged Network Adapter GLDv3 NIC Driver
Quagga Routing Protocol Suite Integration
RAID Configuration Utility
RBridge (IETF TRILL) support
RDMA Offload Framework
Reno: Login Process Enhancements for Interop
Resource Management
s10brand
SAM/QFS
SCM Migration Project
SCSI RDMA Protocol
SDcard Drivers
Sensor Abstraction Layer
Session Initiation Protocol
SFW
Shell: bourne shell, korn shell, C shell, etc.
Sierra: Intel WiFi Chipsets Support
Simple Panels
SM-HBA Based SAS HBA Management
SMF Documentation
Solaris iSCSI Target
Solaris PowerPC Port
SourceJuicer
Sparks: name service switch/nscd enhancements
Squashfs
Star integration/migration project
Starfish
Starter Kit
Storage Power Management
Sun Security Toolkit
Sun StorageTek Availability Suite
Support for OpenFabrics User Verbs / API on OpenSolaris OS
Support gcc4/GCCfss in Solaris
Suspend/Resume
SVR4 Packaging
Systemz
Tamarack: Removable Media Enhancements in Solaris
Tesla: OpenSolaris Enhanced Power Management
Test Development
Tickless Kernel Architecture
TIPC
Trademarks
Trusted networking interface policy database for Trusted Extensions
Trusted Platform Module support
Use Case
Validated Execution Project
Virtual Console
Virtual Network Machines
Visual Panels
Visualization for HPC
Volo
VRRP: Virtual Router Redundancy Protocol Implementation
VSCAN service
Web Stack
Website
Winchester: Schema mapping and ID mapping for AD Interoperability
Wireless USB Support
Wireless Wide Area Network
X Consolidation
x86 Generic FMA Topology Enumerator
Xen Gate
Xfce: A lightweight desktop environment
ZFS Boot and Install
ZFS on disk encryption support
Zone Manager
Zone Statistics
Русский портал
البوابة العربية
भारतीय पोर्टल
中国门户
日本ポータル
한국 포탈
User Group
Adelaide
Argentina
Arizona
Atlanta
Baltimore-Washington
Bangalore
Bangkok
Bangladesh
Beijing
Bélem
Berlin
Bhimavaram
Bloomington
Campus Ambassadors
Capital Region
Cardiff
Charlotte
Chengdu
Chennai
Chihuahua
Chile
Cleveland
Colombia
Columbus
Connecticut
Cracow
Czech
Dallas/Ft. Worth
Danish
Delaware
Edinburgh
Egypt
Finland
Florida
Front Range
FuZhou
Great Lakes
Greece
Hangzhou
Hawaii
HeFei
Houston
Hyderabad
Indonesia
Irish
Israel
Italian
Jinan
Kabul
Kansas City
Latvia
London
Madurai
Manchester
Mato Grosso
Melbourne
Minas Gerais
Minnesota
Montreal
Moscow
Mumbai
Munich
NEA
Netherlands
New England
New York City
New Zealand
NIT Hamirpur
Noroeste
Oklahoma City
Osnabrück
Peru
Philadelphia
Piaski
Pittsburgh
Porto Alegre
Puget Sound
Pune
Queensland
Research Triangle Park
Romania
Russia
San Antonio
San Diego
San Francisco
São Paulo
Scottish
Serbia
Shanghai
Shenzhen
Silicon Valley
Singapore
Slovak
South African
Southern Connecticut
St. Louis
Sweden
Switzerland
Sydney
Szczecin
Taiwan
Tecum
Thames Valley
Tokyo
Toronto
Trondheim
Tulsa
Turkey
Ukraine
University of Melbourne
Vale do Paraíba
Vancouver
Venezuela
Welsh - Cymru
Wisconsin
Xi'an
Subsites
Code Reviews
Code Repositories
Package Search
Bugster
Bugzilla
Test Machines
Planet
Mailing Lists
Elections & Polls
ARC Case Logs
Source Juicer
Package Factory
User Authentication
Project dtrace-chime Pages
Articles
Change Log
Displays
Installation
Java DTrace API
jdtrace Example
JavaOne 2007 Screenshots
Adding New Displays
Command Line
New Display Wizard
XML Properties
screens_c