STAPREF - Online Linux Manual PageSection : 1

NAMEstapref − systemtap language reference

SYNOPSIS
stapref

DESCRIPTIONThe reference for the systemtap scripting language.

LANGUAGEKeywords
breakcontinuedeleteelseexitforeachforfunctionglobalprivateifinnextprobereturntry/catchwhile Data Types and Operators
Integers • var1 = 5 • global var2 = 10 Strings • var1 = "string1"global var2 = "string2" Associative Arrays • global array1[]global array2[SIZE] • array[index] = 5 Context Variables • $var • $var$ (pretty printed string form) Binary numeric operators • * / % + − << >> >>> & ^ | && || Binary string operators • . (string concatenation) Numeric assignment operators • = += -= *= /= %= >>= <<= &= ^= |= String assignment operators • = .= Unary numeric operators • + − ! ~ ++ −− Numeric & string comparison operators • < > <= >= == != Regular expression matching operators • =~ !~ Ternary operator • cond ? exp1 : exp2 Grouping operator • ( expression ) Array operators • array[index] (array read/write)[index] \in\fR array Aggregation operator • var <<< value Statements
Jump Statements • continuebreaknext (early return from a probe)return expression (from a function)try statement catch (message) statement
Selection Statements • if (expression) statement • else statement
Iteration Statements • foreach (variable in array) statement • foreach ([var1,var2,...] in array) statement • for (expression; expression; expression) statement • while (expression) statement
Declaration Statements • function name (variable : type, ...) { statement }function name : type (variable : type, ...) { statement }function name : type (variable : type, ...) %{ c_statement %}probe probepoint { statement }probe label = probepoint { statement } Lexical Structure
Comments • # ... comment • // ... comment • /* ... comment ... */
Preprocessor • %( expression %? true_tokens %: false_tokens %)@define label (variable, ...) %{ statement %} Builtin Functions
Aggregation Builtin Functions • @avg (variable)@count (variable)@hist_linear (variable, N, N, N)@hist_log (variable)@max (variable)@min (variable)@sum (variable)
Output Builtin Functions • print (variable)printf (format:string, variable, ...)  where format is of the form: %[flags][width][.precision][length]specifier • printd (delimiter:string, variable, ...)printdln (delimiter:string, variable, ...)println ()sprint:string (variable)sprintf:string (format:string, variable, ...)
Variable Access Builtin Functions • @var ("varname[@src/FILE.c]"[, "module"]) (static or global)@cast (variable, "type_name"[, "module"])@defined (variable)@probewrite (variable) Probepoints
Some of the more commonly used probepoints • kernel.function(PATTERN) kernel.function(PATTERN).call • kernel.function(PATTERN).return • kernel.FUNCTION (PATTERN).return.maxactive(VALUE) • kernel.FUNCTION (PATTERN).inline • kernel.FUNCTION (PATTERN).label(LPATTERN) • module(MPATTERN).FUNCTION (PATTERN) • module(MPATTERN).FUNCTION (PATTERN).call • module(MPATTERN).FUNCTION (PATTERN).return.maxactive(VALUE) • module(MPATTERN).FUNCTION (PATTERN).inline • kernel.statement(PATTERN) • kernel.statement(ADDRESS).absolute • module(MPATTERN).statement(PATTERN) • kprobe.FUNCTION (FUNCTION) • kprobe.FUNCTION (FUNCTION).return • kprobe.module(NAME).FUNCTION (FUNCTION) • kprobe.module(NAME).FUNCTION (FUNCTION).return • kprobe.statement(ADDRESS).absolute • process.begin process("PATH").begin • process(PID).begin process.thread.begin • process("PATH").thread.begin • process(PID).thread.begin • process.end • process("PATH").end • process(PID).end • process.thread.end • process("PATH").thread.end • process(PID).thread.end • process("PATH").syscall • process(PID).syscall • process.syscall.return • process("PATH").syscall.return • process(PID).syscall.return • process("PATH").FUNCTION ("NAME") • process("PATH").statement("*@FILE.c:123") • process("PATH").FUNCTION ("*").return • process("PATH").FUNCTION ("myfun").label("foo") • process("PATH").mark("LABEL") • java("PNAME").class("CLASSNAME").method("PATTERN") • java("PNAME").class("CLASSNAME").method("PATTERN").return • java(PID).class("CLASSNAME").method("PATTERN") • java(PID).class("CLASSNAME").method("PATTERN").return • python2.module("MODULENAME").function("PATTERN") • python2.module("MODULENAME").function("PATTERN").return • python3.module("MODULENAME").function("PATTERN") • python3.module("MODULENAME").function("PATTERN").return Tapset Functions
Some of the more commonly used tapset functions • addr:long () • backtrace:string () • caller:string () • caller_addr:long () • cmdline_arg:string (N:long) • cmdline_args:string (N:long,m:long,delim:string) • cmdline_str:string () • env_var:string (name:string) • execname:string () • int_arg:long (N:long) • isinstr:long(s1:string,s2:string) • long_arg:long (N:long) • modname:string () • module_name:string () • pid:long () • pn:string () • pointer_arg:string (N:long) • pp:string () • print_backtrace () • probefunc:string () • register:long(name:string) • str_replace:string(prnt_str:string,srch_str:string,rplc_str:string) • stringat:long(str:string,pos:long) • strlen:long(str:string) • strtol:long(str:string,base:long) • substr:string(str:string,start:long,length:long) • user_long:long(addr:long) • user_string:string(addr:long)

SEE ALSOstap(1)

BUGS Use the Bugzilla link of the project web page or our mailing list. http://sourceware.org/systemtap/,<systemtap@sourceware.org>.
0
Johanes Gumabo
Data Size   :   30,375 byte
man-stapref.1Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   4 / 181,942
Visitor ID   :     :  
Visitor IP   :   3.146.176.112   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (rof_nr_xx|137|stapref.1|34/10|\n(.i |.nr oldin \\n(.i )         (rof_nr|67|stapref.1|34/10|\*24(.*240|.nr oldin \\n(.i )         (rof_nr_xxx|123|stapref.1|52/19|\n[oldin]u |.in \\n[oldin]u )         (rof_unit_scale_ch|20|stapref.1|52/19|n]u|.in \\n[oldin]u )         (rof_in|18|stapref.1|52/19|\n[oldin]u|.in \\n[oldin]u )         (rof_nr_xx|137|stapref.1|55/10|\n(.i |.nr oldin \\n(.i )         (rof_nr|67|stapref.1|55/10|\*24(.*240|.nr oldin \\n(.i )         (rof_escape_sequence|91|stapref.1|102|\in\fR array|\[bu] [index] \fB\in\fR array )         (rof_nr_xxx|123|stapref.1|106/19|\n[oldin]u |.in \\n[oldin]u )         (rof_unit_scale_ch|20|stapref.1|106/19|n]u|.in \\n[oldin]u )         (rof_in|18|stapref.1|106/19|\n[oldin]u|.in \\n[oldin]u )         (rof_nr_xx|137|stapref.1|109/10|\n(.i |.nr oldin \\n(.i )         (rof_nr|67|stapref.1|109/10|\*24(.*240|.nr oldin \\n(.i )         (rof_nr_xxx|123|stapref.1|116/19|\n[oldin]u |.in \\n[oldin]u )         (rof_unit_scale_ch|20|stapref.1|116/19|n]u|.in \\n[oldin]u )         (rof_in|18|stapref.1|116/19|\n[oldin]u|.in \\n[oldin]u )         (rof_nr_xx|137|stapref.1|117/10|\n(.i |.nr oldin \\n(.i )         (rof_nr|67|stapref.1|117/10|\*24(.*240|.nr oldin \\n(.i )         (rof_nr_xxx|123|stapref.1|121/19|\n[oldin]u |.in \\n[oldin]u )         (rof_unit_scale_ch|20|stapref.1|121/19|n]u|.in \\n[oldin]u )         (rof_in|18|stapref.1|121/19|\n[oldin]u|.in \\n[oldin]u )         (rof_nr_xx|137|stapref.1|122/10|\n(.i |.nr oldin \\n(.i )         (rof_nr|67|stapref.1|122/10|\*24(.*240|.nr oldin \\n(.i )         (rof_nr_xxx|123|stapref.1|128/19|\n[oldin]u |.in \\n[oldin]u )         (rof_unit_scale_ch|20|stapref.1|128/19|n]u|.in \\n[oldin]u )         (rof_in|18|stapref.1|128/19|\n[oldin]u|.in \\n[oldin]u )         (rof_nr_xx|137|stapref.1|129/10|\n(.i |.nr oldin \\n(.i )         (rof_nr|67|stapref.1|129/10|\*24(.*240|.nr oldin \\n(.i )         (rof_nr_xxx|123|stapref.1|136/19|\n[oldin]u |.in \\n[oldin]u )         (rof_unit_scale_ch|20|stapref.1|136/19|n]u|.in \\n[oldin]u )         (rof_in|18|stapref.1|136/19|\n[oldin]u|.in \\n[oldin]u )         (rof_nr_xx|137|stapref.1|139/10|\n(.i |.nr oldin \\n(.i )         (rof_nr|67|stapref.1|139/10|\*24(.*240|.nr oldin \\n(.i )         (rof_nr_xxx|123|stapref.1|144/19|\n[oldin]u |.in \\n[oldin]u )         (rof_unit_scale_ch|20|stapref.1|144/19|n]u|.in \\n[oldin]u )         (rof_in|18|stapref.1|144/19|\n[oldin]u|.in \\n[oldin]u )         (rof_nr_xx|137|stapref.1|145/10|\n(.i |.nr oldin \\n(.i )         (rof_nr|67|stapref.1|145/10|\*24(.*240|.nr oldin \\n(.i )         (rof_nr_xxx|123|stapref.1|149/19|\n[oldin]u |.in \\n[oldin]u )         (rof_unit_scale_ch|20|stapref.1|149/19|n]u|.in \\n[oldin]u )         (rof_in|18|stapref.1|149/19|\n[oldin]u|.in \\n[oldin]u )         (rof_nr_xx|137|stapref.1|152/10|\n(.i |.nr oldin \\n(.i )         (rof_nr|67|stapref.1|152/10|\*24(.*240|.nr oldin \\n(.i )         (rof_nr_xxx|123|stapref.1|161/19|\n[oldin]u |.in \\n[oldin]u )         (rof_unit_scale_ch|20|stapref.1|161/19|n]u|.in \\n[oldin]u )         (rof_in|18|stapref.1|161/19|\n[oldin]u|.in \\n[oldin]u )         (rof_nr_xx|137|stapref.1|162/10|\n(.i |.nr oldin \\n(.i )         (rof_nr|67|stapref.1|162/10|\*24(.*240|.nr oldin \\n(.i )         (rof_nr_xxx|123|stapref.1|172/19|\n[oldin]u |.in \\n[oldin]u )         (rof_unit_scale_ch|20|stapref.1|172/19|n]u|.in \\n[oldin]u )         (rof_in|18|stapref.1|172/19|\n[oldin]u|.in \\n[oldin]u )         (rof_nr_xx|137|stapref.1|173/10|\n(.i |.nr oldin \\n(.i )         (rof_nr|67|stapref.1|173/10|\*24(.*240|.nr oldin \\n(.i )         (rof_nr_xxx|123|stapref.1|179/19|\n[oldin]u |.in \\n[oldin]u )         (rof_unit_scale_ch|20|stapref.1|179/19|n]u|.in \\n[oldin]u )         (rof_in|18|stapref.1|179/19|\n[oldin]u|.in \\n[oldin]u )         (rof_nr_xx|137|stapref.1|182/10|\n(.i |.nr oldin \\n(.i )         (rof_nr|67|stapref.1|182/10|\*24(.*240|.nr oldin \\n(.i )         (rof_nr_xxx|123|stapref.1|229/19|\n[oldin]u |.in \\n[oldin]u )         (rof_unit_scale_ch|20|stapref.1|229/19|n]u|.in \\n[oldin]u )         (rof_in|18|stapref.1|229/19|\n[oldin]u|.in \\n[oldin]u )         (rof_nr_xx|137|stapref.1|232/10|\n(.i |.nr oldin \\n(.i )         (rof_nr|67|stapref.1|232/10|\*24(.*240|.nr oldin \\n(.i )         (rof_nr_xxx|123|stapref.1|262/19|\n[oldin]u |.in \\n[oldin]u )         (rof_unit_scale_ch|20|stapref.1|262/19|n]u|.in \\n[oldin]u )         (rof_in|18|stapref.1|262/19|\n[oldin]u|.in \\n[oldin]u )