Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Linux Tools Project/Systemtap/User Guide/dashboard/creatingModules.html"

(New page: <h2> Creating Modules </h2> SystemTap GUI allows for the creation of custom modules. In order to do this the user must have a script that returns data in a consistent pattern along with p...)
 
Line 7: Line 7:
 
as any script run in the Graphics Perspective. Creating a module can be done in two ways
 
as any script run in the Graphics Perspective. Creating a module can be done in two ways
 
<br>
 
<br>
<h3>Export Script</h3>
+
<h3>
 +
Export Script
 +
</h3><a href="modulesBrowser.html">Modules Browser</a>
 
Using the <b><u>E</u>xport Script</b>  
 
Using the <b><u>E</u>xport Script</b>  
 
option in the <b><u>F</u>ile</b> menu of the IDE Perspective. This will create a module from a script that is currently open in the IDE. The module will consist of the script and metadata information stored as a '.dash' file on the local system(where SystemTapGUI is running).The user is first prompted
 
option in the <b><u>F</u>ile</b> menu of the IDE Perspective. This will create a module from a script that is currently open in the IDE. The module will consist of the script and metadata information stored as a '.dash' file on the local system(where SystemTapGUI is running).The user is first prompted
Line 28: Line 30:
 
<img src="images/addedModule.png"><br><br>
 
<img src="images/addedModule.png"><br><br>
  
<h3>Create Module</h3>
+
<h3>
 +
Create Module
 +
</h3>
 
Using the <b><u>C</u>reate Module</b>  
 
Using the <b><u>C</u>reate Module</b>  
 
option in the dashboard or IDE toolbar. This will create a module from an example script that available on the remote System, Users will have to specify the location of the examples directory and the path to the script.The module will consist of only the metadata information stored as a '.dash' file on the local system(where SystemTapGUI is running). The script will not be packaged with the module, the location specified will be used to run the script directly on the remote system. The user would have to first enter the script details,  
 
option in the dashboard or IDE toolbar. This will create a module from an example script that available on the remote System, Users will have to specify the location of the examples directory and the path to the script.The module will consist of only the metadata information stored as a '.dash' file on the local system(where SystemTapGUI is running). The script will not be packaged with the module, the location specified will be used to run the script directly on the remote system. The user would have to first enter the script details,  
Line 35: Line 39:
 
<img src="images/script_details.gif"><br><br>
 
<img src="images/script_details.gif"><br><br>
  
<h3>Tips</h3>
+
<h3>
 +
Tips
 +
</h3>
  
 
Make sure your script works fine with the regular expression and the graphs are as desired using the IDE/Graphing perspectives
 
Make sure your script works fine with the regular expression and the graphs are as desired using the IDE/Graphing perspectives
 
before creating a dashboard module using the script.
 
before creating a dashboard module using the script.
  
<h3>Constraints</h3>
+
<h3>
 +
Constraints
 +
</h3>
  
 
The script should adhere to the below constraints to add it to the dashboard:
 
The script should adhere to the below constraints to add it to the dashboard:

Revision as of 06:42, 10 November 2010

Creating Modules

SystemTap GUI allows for the creation of custom modules. In order to do this the user must have a script that returns data in a consistent pattern along with providing a regular expression to interpret it; the same requirements as any script run in the Graphics Perspective. Creating a module can be done in two ways

Export Script

<a href="modulesBrowser.html">Modules Browser</a>

Using the Export Script option in the File menu of the IDE Perspective. This will create a module from a script that is currently open in the IDE. The module will consist of the script and metadata information stored as a '.dash' file on the local system(where SystemTapGUI is running).The user is first prompted for regular expression details (just like in the Graphing perspective) after which a dialog box similar to the following shows up:

<img src="images/exportScript.png">

The dialogue box has the following properties:

  • Display - This is the name of the module. This is the text that will show up under the specified module family.
  • Category - This field requires the name of the module family the module should be placed in.
  • Graphs - This box allows you to added one or more predefine graph types to spawn each time the module is ran.

When you click ok your module will be added into the Module Browser in the Dashboard Perspective.

<img src="images/addedModule.png">

Create Module

Using the Create Module option in the dashboard or IDE toolbar. This will create a module from an example script that available on the remote System, Users will have to specify the location of the examples directory and the path to the script.The module will consist of only the metadata information stored as a '.dash' file on the local system(where SystemTapGUI is running). The script will not be packaged with the module, the location specified will be used to run the script directly on the remote system. The user would have to first enter the script details, and then follow the same set of steps as in the previous option.

<img src="images/script_details.gif">

Tips

Make sure your script works fine with the regular expression and the graphs are as desired using the IDE/Graphing perspectives before creating a dashboard module using the script.

Constraints

The script should adhere to the below constraints to add it to the dashboard:

  • The script should regularly output rows/tables of data that will confirm to the same regular expression, i.e, you cannot have two sets of output in the same script
  • The script should not have exit() statements
  • Since the dashboard supports dynamic graphs the script should output data periodically
  • Users should remember that the dashboard currently does not support any processing of the output data.

Back to the top