Debian Codegraph @

doc/SystemTap_Tapset_Reference/man3/function::target.3stap

raw
1 '\" t
2 .\" Title: function::target
3 .\" Author:
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: October 2025
6 .\" Manual: Context Functions
7 .\" Source: SystemTap Tapset Reference
8 .\" Language: English
9 .\"
10 .TH "FUNCTION::TARGET" "3stap" "October 2025" "SystemTap Tapset Reference" "Context Functions"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 function::target \- Return the process ID of the target process
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 target:long()
36 .fi
37 .SH "ARGUMENTS"
38 .PP
39 None
40 .SH "DESCRIPTION"
41 .PP
42 This function returns the process ID of the target process\&. This is useful in conjunction with the \-x PID or \-c CMD command\-line options to stap\&. An example of its use is to create scripts that filter on a specific process\&.
43 .PP
44 \-x <pid>
45 \fBtarget\fR
46 returns the pid specified by \-x
47 .PP
48 \-c <command>
49 \fBtarget\fR
50 returns the pid for the executed command specified by \-c
51 .SH SEE ALSO\n
52 .IR tapset::context (3stap)