1tnfctl_kernel_open(3TNF)     TNF Library Functions    tnfctl_kernel_open(3TNF)
2
3
4

NAME

6       tnfctl_kernel_open - create handle for kernel probe control
7

SYNOPSIS

9       cc [ flag ... ] file ... -ltnfctl [ library ... ]
10       #include <tnf/tnfctl.h>
11
12
13
14       tnfctl_errcode_t tnfctl_kernel_open(tnfctl_handle_t **ret_val);
15
16

DESCRIPTION

18       tnfctl_kernel_open()  starts  a  kernel  tracing session and returns in
19       ret_val an opaque handle that can be used to control tracing and probes
20       in  the  kernel.  Only one kernel tracing session is possible at a time
21       on a given machine.  An error code of  TNFCTL_ERR_BUSY is  returned  if
22       there is another process using kernel tracing. Use the command
23
24         fuser -f /dev/tnfctl
25
26
27
28
29       to  print the process id of the process currently using kernel tracing.
30       Only a  superuser  may  use  tnfctl_kernel_open().  An  error  code  of
31       TNFCTL_ERR_ACCES  is returned if the caller does not have the necessary
32       privileges.
33

RETURN VALUES

35       tnfctl_kernel_open returns TNFCTL_ERR_NONE upon success.
36

ERRORS

38       TNFCTL_ERR_ACCES           Permission denied.  Superuser privileges are
39                                  needed for kernel tracing.
40
41
42       TNFCTL_ERR_BUSY            Another  client  is  currently  using kernel
43                                  tracing.
44
45
46       TNFCTL_ERR_ALLOCFAIL       Memory allocation failed.
47
48
49       TNFCTL_ERR_FILENOTFOUND    /dev/tnfctl not found.
50
51
52       TNFCTL_ERR_INTERNAL        Some other failure occurred.
53
54

ATTRIBUTES

56       See attributes(5) for descriptions of the following attributes:
57
58
59
60
61       ┌─────────────────────────────┬─────────────────────────────┐
62       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
63       ├─────────────────────────────┼─────────────────────────────┤
64       │Availability                 │SUNWtnfc                     │
65       ├─────────────────────────────┼─────────────────────────────┤
66       │MT Level                     │MT-Safe                      │
67       └─────────────────────────────┴─────────────────────────────┘
68

SEE ALSO

70       prex(1), fuser(1M),  TNF_PROBE(3TNF),  libtnfctl(3TNF),  tracing(3TNF),
71       tnf_kernel_probes(4), attributes(5)
72
73
74
75SunOS 5.11                        4 Mar 1997          tnfctl_kernel_open(3TNF)
Impressum