Este conteúdo não está disponível no idioma selecionado.
SystemTap Tapset Reference
For SystemTap in Red Hat Enterprise Linux 5
Edition 1
Abstract
Preface
Chapter 1. Introduction Copiar o linkLink copiado para a área de transferência!
1.1. Documentation Goals Copiar o linkLink copiado para a área de transferência!
Chapter 2. Tapset Development Guidelines Copiar o linkLink copiado para a área de transferência!
2.1. Writing Good Tapsets Copiar o linkLink copiado para a área de transferência!
- process ID
- parent process ID
- process group ID
- forked
- exec'd
- running
- stopped
- terminated
Note
do_execve() or the compat_do_execve() functions. The following alias inserts probes at the beginning of those functions:
probe kprocess.exec = kernel.function("do_execve"),
kernel.function("compat_do_execve")
{probe body}
probe kprocess.exec = kernel.function("do_execve"),
kernel.function("compat_do_execve")
{probe body}
stap(1) man page for details).
copy_process() returns a pointer to the task_struct for the new process. Note that the process ID of the new process is retrieved by calling task_pid() and passing it the task_struct pointer. In this case, the auxiliary function is an embedded C function defined in task.stp.
2.2. Elements of a Tapset Copiar o linkLink copiado para a área de transferência!
2.2.1. Tapset Files Copiar o linkLink copiado para a área de transferência!
src/tapset/ of the SystemTap GIT directory. Most tapset files are kept at that level. If you have code that only works with a specific architecture or kernel version, you may choose to put your tapset in the appropriate subdirectory.
/usr/share/systemtap/tapset/ or /usr/local/share/systemtap/tapset.
-I tapset_directory to specify their location when invoking stap.
2.2.2. Namespace Copiar o linkLink copiado para a área de transferência!
tapset_name.probe_name. For example, the probe for sending a signal could be named signal.send.
_).
2.2.3. Comments and Documentation Copiar o linkLink copiado para a área de transferência!
Synopsis content, use:
* Synopsis: * New Synopsis string *
* Synopsis:
* New Synopsis string
*
<programlisting> tag in this instance, since overriding the Synopsis content of an entry does not automatically form the necessary tags.
commandemphasisprogramlistingremark(tagged strings will appear in Publican beta builds of the document)
Chapter 3. Context Functions Copiar o linkLink copiado para a área de transferência!
Name
print_regs — Print a register dump.
Synopsis
function print_regs()
function print_regs()
Arguments
Name
execname — Returns the execname of a target process (or group of processes).
Synopsis
function execname:string()
function execname:string()
Arguments
Name
pid — Returns the ID of a target process.
Synopsis
function pid:long()
function pid:long()
Arguments
Name
tid — Returns the thread ID of a target process.
Synopsis
function tid:long()
function tid:long()
Arguments
Name
ppid — Returns the process ID of a target process's parent process.
Synopsis
function ppid:long()
function ppid:long()
Arguments
Name
pgrp — Returns the process group ID of the current process.
Synopsis
function pgrp:long()
function pgrp:long()
Arguments
Name
sid — Returns the session ID of the current process.
Synopsis
function sid:long()
function sid:long()
Arguments
Description
Name
pexecname — Returns the execname of a target process's parent process.
Synopsis
function pexecname:string()
function pexecname:string()
Arguments
Name
gid — Returns the group ID of a target process.
Synopsis
function gid:long()
function gid:long()
Arguments
Name
egid — Returns the effective gid of a target process.
Synopsis
function egid:long()
function egid:long()
Arguments
Name
uid — Returns the user ID of a target process.
Synopsis
function uid:long()
function uid:long()
Arguments
Name
euid — Return the effective uid of a target process.
Synopsis
function euid:long()
function euid:long()
Arguments
Name
cpu — Returns the current cpu number.
Synopsis
function cpu:long()
function cpu:long()
Arguments
Name
pp — Return the probe point associated with the currently running probe handler,
Synopsis
function pp:string()
function pp:string()
Arguments
Description
Context
Name
registers_valid — Determines validity of and register in current context. u_register
Synopsis
function registers_valid:long()
function registers_valid:long()
Arguments
Description
register and u_register can be used in the current context, or 0 otherwise. For example, registers_valid returns 0 when called from a begin or end probe.
Name
user_mode — Determines if probe point occurs in user-mode.
Synopsis
function user_mode:long()
function user_mode:long()
Arguments
Description
Name
is_return — Determines if probe point is a return probe.
Synopsis
function is_return:long()
function is_return:long()
Arguments
Description
Name
target — Return the process ID of the target process.
Synopsis
function target:long()
function target:long()
Arguments
Name
stack_size — Return the size of the kernel stack.
Synopsis
function stack_size:long()
function stack_size:long()
Arguments
Name
stack_used — Returns the amount of kernel stack used.
Synopsis
function stack_used:long()
function stack_used:long()
Arguments
Description
Name
stack_unused — Returns the amount of kernel stack currently available.
Synopsis
function stack_unused:long()
function stack_unused:long()
Arguments
Description
Name
uaddr — User space address of current running task. EXPERIMENTAL.
Synopsis
function uaddr:long()
function uaddr:long()
Arguments
Description
usymname or symdata. Often the task will be in the VDSO where it entered the kernel. FIXME - need VDSO tracking support #10080.
Name
print_stack — Print out stack from string.
Synopsis
function print_stack(stk:string)
function print_stack(stk:string)
Arguments
stk- String with list of hexidecimal addresses.
Description
backtrace.
Name
probefunc — Return the probe point's function name, if known.
Synopsis
function probefunc:string()
function probefunc:string()
Arguments
Name
probemod — Return the probe point's module name, if known.
Synopsis
function probemod:string()
function probemod:string()
Arguments
Name
modname — Return the kernel module name loaded at the address.
Synopsis
function modname:string(addr:long)
function modname:string(addr:long)
Arguments
addr- The address.
Description
Name
symname — Return the symbol associated with the given address.
Synopsis
function symname:string(addr:long)
function symname:string(addr:long)
Arguments
addr- The address to translate.
Description
Name
symdata — Return the symbol and module offset for the address.
Synopsis
function symdata:string(addr:long)
function symdata:string(addr:long)
Arguments
addr- The address to translate.
Description
Name
usymname — Return the symbol of an address in the current task. EXPERIMENTAL!
Synopsis
function usymname:string(addr:long)
function usymname:string(addr:long)
Arguments
addr- The address to translate.
Description
Name
usymdata — Return the symbol and module offset of an address. EXPERIMENTAL!
Synopsis
function usymdata:string(addr:long)
function usymdata:string(addr:long)
Arguments
addr- The address to translate.
Description
Name
print_ustack — Print out stack for the current task from string. EXPERIMENTAL!
Synopsis
function print_ustack(stk:string)
function print_ustack(stk:string)
Arguments
stk- String with list of hexidecimal addresses for the current task.
Description
ubacktrace for the current task.
Name
print_backtrace — Print stack back trace
Synopsis
function print_backtrace()
function print_backtrace()
Arguments
Description
print_stack(backtrace), except that deeper stack nesting may be supported. Return nothing.
Name
backtrace — Hex backtrace of current stack
Synopsis
function backtrace:string()
function backtrace:string()
Arguments
Description
Name
caller — Return name and address of calling function
Synopsis
function caller:string()
function caller:string()
Arguments
Description
This is equivalent to calling
s 0xx”, symname(caller_addr, caller_addr)) Works only for return probes at this time.
Name
caller_addr — Return caller address
Synopsis
function caller_addr:long()
function caller_addr:long()
Arguments
Description
Name
print_ubacktrace — Print stack back trace for current task. EXPERIMENTAL!
Synopsis
function print_ubacktrace()
function print_ubacktrace()
Arguments
Description
print_ustack(ubacktrace), except that deeper stack nesting may be supported. Return nothing.
Name
ubacktrace — Hex backtrace of current task stack. EXPERIMENTAL!
Synopsis
function ubacktrace:string()
function ubacktrace:string()
Arguments
Description
Chapter 4. Timestamp Functions Copiar o linkLink copiado para a área de transferência!
Name
get_cycles — Processor cycle count.
Synopsis
function get_cycles:long()
function get_cycles:long()
Arguments
Description
Chapter 5. Memory Tapset Copiar o linkLink copiado para a área de transferência!
Name
vm_fault_contains — Test return value for page fault reason
Synopsis
function vm_fault_contains:long(value:long,test:long)
function vm_fault_contains:long(value:long,test:long)
Arguments
value- The fault_type returned by vm.page_fault.return
test- The type of fault to test for (VM_FAULT_OOM or similar)
Name
vm.pagefault — Records that a page fault occurred.
Synopsis
vm.pagefault
vm.pagefault
Values
write_access- Indicates whether this was a write or read access;
1indicates a write, while0indicates a read. address- The address of the faulting memory access; i.e. the address that caused the page fault.
Context
Name
vm.pagefault.return — Indicates what type of fault occurred.
Synopsis
vm.pagefault.return
vm.pagefault.return
Values
fault_type- Returns either
0(VM_FAULT_OOM) for out of memory faults,2(VM_FAULT_MINOR) for minor faults,3(VM_FAULT_MAJOR) for major faults, or1(VM_FAULT_SIGBUS) if the fault was neither OOM, minor fault, nor major fault.
Name
addr_to_node — Returns which node a given address belongs to within a NUMA system.
Synopsis
function addr_to_node:long(addr:long)
function addr_to_node:long(addr:long)
Arguments
addr- The address of the faulting memory access.
Name
vm.mmap — Fires when an mmap is requested.
Synopsis
vm.mmap
vm.mmap
Values
length- The length of the memory segment
address- The requested address
Context
mmap.
Name
vm.munmap — Fires when an munmap is requested.
Synopsis
vm.munmap
vm.munmap
Values
length- The length of the memory segment
address- The requested address
Context
munmap.
Name
vm.brk — Fires when a brk is requested (i.e. the heap will be resized).
Synopsis
vm.brk
vm.brk
Values
length- The length of the memory segment
address- The requested address
Context
brk.
Name
vm.oom_kill — Fires when a thread is selected for termination by the OOM killer.
Synopsis
vm.oom_kill
vm.oom_kill
Values
task- The task being killed
Context
Chapter 6. IO Scheduler Tapset Copiar o linkLink copiado para a área de transferência!
Name
ioscheduler.elv_next_request — Fires when a request is retrieved from the request queue
Synopsis
ioscheduler.elv_next_request
ioscheduler.elv_next_request
Values
elevator_name- The type of I/O elevator currently enabled
Name
ioscheduler.elv_next_request.return — Fires when a request retrieval issues a return signal
Synopsis
ioscheduler.elv_next_request.return
ioscheduler.elv_next_request.return
Values
req_flags- Request flags
req- Address of the request
disk_major- Disk major number of the request
disk_minor- Disk minor number of the request
Name
ioscheduler.elv_add_request — A request was added to the request queue
Synopsis
ioscheduler.elv_add_request
ioscheduler.elv_add_request
Values
req_flags- Request flags
req- Address of the request
disk_major- Disk major number of the request
elevator_name- The type of I/O elevator currently enabled
disk_minor- Disk minor number of the request
Name
ioscheduler.elv_completed_request — Fires when a request is completed
Synopsis
ioscheduler.elv_completed_request
ioscheduler.elv_completed_request
Values
req_flags- Request flags
req- Address of the request
disk_major- Disk major number of the request
elevator_name- The type of I/O elevator currently enabled
disk_minor- Disk minor number of the request
Chapter 7. SCSI Tapset Copiar o linkLink copiado para a área de transferência!
Name
scsi.ioentry — Prepares a SCSI mid-layer request
Synopsis
scsi.ioentry
scsi.ioentry
Values
disk_major- The major number of the disk (-1 if no information)
device_state- The current state of the device.
disk_minor- The minor number of the disk (-1 if no information)
Name
scsi.iodispatching — SCSI mid-layer dispatched low-level SCSI command
Synopsis
scsi.iodispatching
scsi.iodispatching
Values
lun- The lun number
req_bufflen- The request buffer length
host_no- The host number
device_state- The current state of the device.
dev_id- The scsi device id
channel- The channel number
data_direction- The data_direction specifies whether this command is from/to the device. 0 (DMA_BIDIRECTIONAL), 1 (DMA_TO_DEVICE), 2 (DMA_FROM_DEVICE), 3 (DMA_NONE)
request_buffer- The request buffer address
Name
scsi.iodone — SCSI command completed by low level driver and enqueued into the done queue.
Synopsis
scsi.iodone
scsi.iodone
Values
lun- The lun number
host_no- The host number
device_state- The current state of the device
dev_id- The scsi device id
channel- The channel number
data_direction- The data_direction specifies whether this command is from/to the device.
Name
scsi.iocompleted — SCSI mid-layer running the completion processing for block device I/O requests
Synopsis
scsi.iocompleted
scsi.iocompleted
Values
lun- The lun number
host_no- The host number
device_state- The current state of the device
dev_id- The scsi device id
channel- The channel number
data_direction- The data_direction specifies whether this command is from/to the device
goodbytes- The bytes completed.
Chapter 8. Networking Tapset Copiar o linkLink copiado para a área de transferência!
Name
netdev.receive — Data recieved from network device.
Synopsis
netdev.receive
netdev.receive
Values
protocol- Protocol of recieved packet.
dev_name- The name of the device. e.g: eth0, ath1.
length- The length of the receiving buffer.
Name
netdev.transmit — Network device transmitting buffer
Synopsis
netdev.transmit
netdev.transmit
Values
protocol- The protocol of this packet.
dev_name- The name of the device. e.g: eth0, ath1.
length- The length of the transmit buffer.
truesize- The size of the the data to be transmitted.
Name
tcp.sendmsg — Sending a tcp message
Synopsis
tcp.sendmsg
tcp.sendmsg
Values
name- Name of this probe
size- Number of bytes to send
sock- Network socket
Context
Name
tcp.sendmsg.return — Sending TCP message is done
Synopsis
tcp.sendmsg.return
tcp.sendmsg.return
Values
name- Name of this probe
size- Number of bytes sent or error code if an error occurred.
Context
Name
tcp.recvmsg — Receiving TCP message
Synopsis
tcp.recvmsg
tcp.recvmsg
Values
saddr- A string representing the source IP address
daddr- A string representing the destination IP address
name- Name of this probe
sport- TCP source port
dport- TCP destination port
size- Number of bytes to be received
sock- Network socket
Context
Name
tcp.recvmsg.return — Receiving TCP message complete
Synopsis
tcp.recvmsg.return
tcp.recvmsg.return
Values
saddr- A string representing the source IP address
daddr- A string representing the destination IP address
name- Name of this probe
sport- TCP source port
dport- TCP destination port
size- Number of bytes received or error code if an error occurred.
Context
Name
tcp.disconnect — TCP socket disconnection
Synopsis
tcp.disconnect
tcp.disconnect
Values
saddr- A string representing the source IP address
daddr- A string representing the destination IP address
flags- TCP flags (e.g. FIN, etc)
name- Name of this probe
sport- TCP source port
dport- TCP destination port
sock- Network socket
Context
Name
tcp.disconnect.return — TCP socket disconnection complete
Synopsis
tcp.disconnect.return
tcp.disconnect.return
Values
ret- Error code (0: no error)
name- Name of this probe
Context
Name
tcp.setsockopt — Call to setsockopt
Synopsis
tcp.setsockopt
tcp.setsockopt
Values
optstr- Resolves optname to a human-readable format
level- The level at which the socket options will be manipulated
optlen- Used to access values for
setsockopt name- Name of this probe
optname- TCP socket options (e.g. TCP_NODELAY, TCP_MAXSEG, etc)
sock- Network socket
Context
Name
tcp.setsockopt.return — Return from setsockopt
Synopsis
tcp.setsockopt.return
tcp.setsockopt.return
Values
ret- Error code (0: no error)
name- Name of this probe
Context
Name
tcp.receive — Called when a TCP packet is received
Synopsis
tcp.receive
tcp.receive
Values
urg- TCP URG flag
psh- TCP PSH flag
rst- TCP RST flag
dport- TCP destination port
saddr- A string representing the source IP address
daddr- A string representing the destination IP address
ack- TCP ACK flag
syn- TCP SYN flag
fin- TCP FIN flag
sport- TCP source port
Name
udp.sendmsg — Fires whenever a process sends a UDP message
Synopsis
udp.sendmsg
udp.sendmsg
Values
name- The name of this probe
size- Number of bytes sent by the process
sock- Network socket used by the process
Context
Name
udp.sendmsg.return — Fires whenever an attempt to send a UDP message is completed
Synopsis
udp.sendmsg.return
udp.sendmsg.return
Values
name- The name of this probe
size- Number of bytes sent by the process
Context
Name
udp.recvmsg — Fires whenever a UDP message is received
Synopsis
udp.recvmsg
udp.recvmsg
Values
name- The name of this probe
size- Number of bytes received by the process
sock- Network socket used by the process
Context
Name
udp.recvmsg.return — Fires whenever an attempt to receive a UDP message received is completed
Synopsis
udp.recvmsg.return
udp.recvmsg.return
Values
name- The name of this probe
size- Number of bytes received by the process
Context
Name
udp.disconnect — Fires when a process requests for a UDP disconnection
Synopsis
udp.disconnect
udp.disconnect
Values
flags- Flags (e.g. FIN, etc)
name- The name of this probe
sock- Network socket used by the process
Context
Name
udp.disconnect.return — UDP has been disconnected successfully
Synopsis
udp.disconnect.return
udp.disconnect.return
Values
ret- Error code (0: no error)
name- The name of this probe
Context
Name
ip_ntop — returns a string representation from an integer IP number
Synopsis
function ip_ntop:string(addr:long)
function ip_ntop:string(addr:long)
Arguments
addr- the ip represented as an integer
Chapter 9. Socket Tapset Copiar o linkLink copiado para a área de transferência!
Name
socket.send — Message sent on a socket.
Synopsis
socket.send
socket.send
Values
success- Was send successful? (1 = yes, 0 = no)
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Size of message sent (in bytes) or error code if success = 0
type- Socket type value
family- Protocol family value
Context
Name
socket.receive — Message received on a socket.
Synopsis
socket.receive
socket.receive
Values
success- Was send successful? (1 = yes, 0 = no)
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Size of message received (in bytes) or error code if success = 0
type- Socket type value
family- Protocol family value
Context
Name
socket.sendmsg — Message is currently being sent on a socket.
Synopsis
socket.sendmsg
socket.sendmsg
Values
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Message size in bytes
type- Socket type value
family- Protocol family value
Context
Description
sock_sendmsg function
Name
socket.sendmsg.return — Return from socket.sendmsg.
Synopsis
socket.sendmsg.return
socket.sendmsg.return
Values
success- Was send successful? (1 = yes, 0 = no)
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Size of message sent (in bytes) or error code if success = 0
type- Socket type value
family- Protocol family value
Context
Description
sock_sendmsg function
Name
socket.recvmsg — Message being received on socket
Synopsis
socket.recvmsg
socket.recvmsg
Values
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Message size in bytes
type- Socket type value
family- Protocol family value
Context
Description
sock_recvmsg function
Name
socket.recvmsg.return — Return from Message being received on socket
Synopsis
socket.recvmsg.return
socket.recvmsg.return
Values
success- Was receive successful? (1 = yes, 0 = no)
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Size of message received (in bytes) or error code if success = 0
type- Socket type value
family- Protocol family value
Context
Description
sock_recvmsg function.
Name
socket.aio_write — Message send via sock_aio_write
Synopsis
socket.aio_write
socket.aio_write
Values
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Message size in bytes
type- Socket type value
family- Protocol family value
Context
Description
sock_aio_write function
Name
socket.aio_write.return — Conclusion of message send via sock_aio_write
Synopsis
socket.aio_write.return
socket.aio_write.return
Values
success- Was receive successful? (1 = yes, 0 = no)
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Size of message received (in bytes) or error code if success = 0
type- Socket type value
family- Protocol family value
Context
Description
sock_aio_write function
Name
socket.aio_read — Receiving message via sock_aio_read
Synopsis
socket.aio_read
socket.aio_read
Values
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Message size in bytes
type- Socket type value
family- Protocol family value
Context
Description
sock_aio_read function
Name
socket.aio_read.return — Conclusion of message received via sock_aio_read
Synopsis
socket.aio_read.return
socket.aio_read.return
Values
success- Was receive successful? (1 = yes, 0 = no)
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Size of message received (in bytes) or error code if success = 0
type- Socket type value
family- Protocol family value
Context
Description
sock_aio_read function
Name
socket.writev — Message sent via socket_writev
Synopsis
socket.writev
socket.writev
Values
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Message size in bytes
type- Socket type value
family- Protocol family value
Context
Description
sock_writev function
Name
socket.writev.return — Conclusion of message sent via socket_writev
Synopsis
socket.writev.return
socket.writev.return
Values
success- Was send successful? (1 = yes, 0 = no)
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Size of message sent (in bytes) or error code if success = 0
type- Socket type value
family- Protocol family value
Context
Description
sock_writev function
Name
socket.readv — Receiving a message via sock_readv
Synopsis
socket.readv
socket.readv
Values
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Message size in bytes
type- Socket type value
family- Protocol family value
Context
Description
sock_readv function
Name
socket.readv.return — Conclusion of receiving a message via sock_readv
Synopsis
socket.readv.return
socket.readv.return
Values
success- Was receive successful? (1 = yes, 0 = no)
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
size- Size of message received (in bytes) or error code if success = 0
type- Socket type value
family- Protocol family value
Context
Description
sock_readv function
Name
socket.create — Creation of a socket
Synopsis
socket.create
socket.create
Values
protocol- Protocol value
name- Name of this probe
requester- Requested by user process or the kernel (1 = kernel, 0 = user)
type- Socket type value
family- Protocol family value
Context
Description
Name
socket.create.return — Return from Creation of a socket
Synopsis
socket.create.return
socket.create.return
Values
success- Was socket creation successful? (1 = yes, 0 = no)
protocol- Protocol value
err- Error code if success == 0
name- Name of this probe
requester- Requested by user process or the kernel (1 = kernel, 0 = user)
type- Socket type value
family- Protocol family value
Context
Description
Name
socket.close — Close a socket
Synopsis
socket.close
socket.close
Values
protocol- Protocol value
flags- Socket flags value
name- Name of this probe
state- Socket state value
type- Socket type value
family- Protocol family value
Context
Description
Name
socket.close.return — Return from closing a socket
Synopsis
socket.close.return
socket.close.return
Values
name- Name of this probe
Context
Description
Name
sock_prot_num2str — Given a protocol number, return a string representation.
Synopsis
function sock_prot_num2str:string(proto:long)
function sock_prot_num2str:string(proto:long)
Arguments
proto- The protocol number.
Name
sock_prot_str2num — Given a protocol name (string), return the corresponding protocol number.
Synopsis
function sock_prot_str2num:long(proto:string)
function sock_prot_str2num:long(proto:string)
Arguments
proto- The protocol name.
Name
sock_fam_num2str — Given a protocol family number, return a string representation.
Synopsis
function sock_fam_num2str:string(family:long)
function sock_fam_num2str:string(family:long)
Arguments
family- The family number.
Name
sock_fam_str2num — Given a protocol family name (string), return the corresponding
Synopsis
function sock_fam_str2num:long(family:string)
function sock_fam_str2num:long(family:string)
Arguments
family- The family name.
Description
Name
sock_state_num2str — Given a socket state number, return a string representation.
Synopsis
function sock_state_num2str:string(state:long)
function sock_state_num2str:string(state:long)
Arguments
state- The state number.
Name
sock_state_str2num — Given a socket state string, return the corresponding state number.
Synopsis
function sock_state_str2num:long(state:string)
function sock_state_str2num:long(state:string)
Arguments
state- The state name.
Chapter 10. Kernel Process Tapset Copiar o linkLink copiado para a área de transferência!
Name
kprocess.create — Fires whenever a new process is successfully created
Synopsis
kprocess.create
kprocess.create
Values
new_pid- The PID of the newly created process
Context
Description
fork (or one of its syscall variants), or a new kernel thread.
Name
kprocess.start — Starting new process
Synopsis
kprocess.start
kprocess.start
Values
Context
Description
Name
kprocess.exec — Attempt to exec to a new program
Synopsis
kprocess.exec
kprocess.exec
Values
filename- The path to the new executable
Context
Description
Name
kprocess.exec_complete — Return from exec to a new program
Synopsis
kprocess.exec_complete
kprocess.exec_complete
Values
success- A boolean indicating whether the exec was successful
errno- The error number resulting from the exec
Context
Description
Name
kprocess.exit — Exit from process
Synopsis
kprocess.exit
kprocess.exit
Values
code- The exit code of the process
Context
Description
Name
kprocess.release — Process released
Synopsis
kprocess.release
kprocess.release
Values
pid- PID of the process being released
task- A task handle to the process being released
Context
Description
Chapter 11. Signal Tapset Copiar o linkLink copiado para a área de transferência!
Name
signal.send — Signal being sent to a process
Synopsis
signal.send
signal.send
Values
send2queue- Indicates whether the signal is sent to an existing
sigqueue name- The name of the function used to send out the signal
task- A task handle to the signal recipient
sinfo- The address of
siginfostruct si_code- Indicates the signal type
sig_name- A string representation of the signal
sig- The number of the signal
shared- Indicates whether the signal is shared by the thread group
sig_pid- The PID of the process receiving the signal
pid_name- The name of the signal recipient
Context
Name
signal.send.return — Signal being sent to a process completed
Synopsis
signal.send.return
signal.send.return
Values
retstr- The return value to either
__group_send_sig_info,specific_send_sig_info, orsend_sigqueue send2queue- Indicates whether the sent signal was sent to an existing
sigqueue name- The name of the function used to send out the signal
shared- Indicates whether the sent signal is shared by the thread group.
Context
Description
__group_send_sig_info and specific_send_sig_info return values are as follows;
0 -- The signal is sucessfully sent to a process, which means that <1> the signal was ignored by the receiving process, <2> this is a non-RT signal and the system already has one queued, and <3> the signal was successfully added to the sigqueue of the receiving process.
-EAGAIN -- The sigqueue of the receiving process is overflowing, the signal was RT, and the signal was sent by a user using something other than kill.
send_group_sigqueue and send_sigqueue return values are as follows;
0 -- The signal was either sucessfully added into the sigqueue of the receiving process, or a SI_TIMER entry is already queued (in which case, the overrun count will be simply incremented).
1 -- The signal was ignored by the receiving process.
-1 -- (send_sigqueue only) The task was marked exiting, allowing * posix_timer_event to redirect it to the group leader.
Name
signal.checkperm — Check being performed on a sent signal
Synopsis
signal.checkperm
signal.checkperm
Values
name- Name of the probe point; default value is
signal.checkperm task- A task handle to the signal recipient
sinfo- The address of the
siginfostructure si_code- Indicates the signal type
sig_name- A string representation of the signal
sig- The number of the signal
pid_name- Name of the process receiving the signal
sig_pid- The PID of the process receiving the signal
Name
signal.checkperm.return — Check performed on a sent signal completed
Synopsis
signal.checkperm.return
signal.checkperm.return
Values
retstr- Return value as a string
name- Name of the probe point; default value is
signal.checkperm
Name
signal.wakeup — Sleeping process being wakened for signal
Synopsis
signal.wakeup
signal.wakeup
Values
resume- Indicates whether to wake up a task in a
STOPPEDorTRACEDstate state_mask- A string representation indicating the mask of task states to wake. Possible values are
TASK_INTERRUPTIBLE,TASK_STOPPED,TASK_TRACED, andTASK_INTERRUPTIBLE. pid_name- Name of the process to wake
sig_pid- The PID of the process to wake
Name
signal.check_ignored — Checking to see signal is ignored
Synopsis
signal.check_ignored
signal.check_ignored
Values
sig_name- A string representation of the signal
sig- The number of the signal
pid_name- Name of the process receiving the signal
sig_pid- The PID of the process receiving the signal
Name
signal.check_ignored.return — Check to see signal is ignored completed
Synopsis
signal.check_ignored.return
signal.check_ignored.return
Values
retstr- Return value as a string
name- Name of the probe point; default value is
signal.checkperm
Name
signal.force_segv — Forcing send of SIGSEGV
Synopsis
signal.force_segv
signal.force_segv
Values
sig_name- A string representation of the signal
sig- The number of the signal
pid_name- Name of the process receiving the signal
sig_pid- The PID of the process receiving the signal
Name
signal.force_segv.return — Forcing send of SIGSEGV complete
Synopsis
signal.force_segv.return
signal.force_segv.return
Values
retstr- Return value as a string
name- Name of the probe point; default value is
force_sigsegv
Name
signal.syskill — Sending kill signal to a process
Synopsis
signal.syskill
signal.syskill
Values
sig- The specific signal sent to the process
pid- The PID of the process receiving the signal
Name
signal.syskill.return — Sending kill signal completed
Synopsis
signal.syskill.return
signal.syskill.return
Values
Name
signal.sys_tkill — Sending a kill signal to a thread
Synopsis
signal.sys_tkill
signal.sys_tkill
Values
sig_name- The specific signal sent to the process
sig- The specific signal sent to the process
pid- The PID of the process receiving the kill signal
Description
tkill call is analogous to kill(2), except that it also allows a process within a specific thread group to be targetted. Such processes are targetted through their unique thread IDs (TID).
Name
signal.systkill.return — Sending kill signal to a thread completed
Synopsis
signal.systkill.return
signal.systkill.return
Values
Name
signal.sys_tgkill — Sending kill signal to a thread group
Synopsis
signal.sys_tgkill
signal.sys_tgkill
Values
sig_name- A string representation of the signal
sig- The specific kill signal sent to the process
pid- The PID of the thread receiving the kill signal
tgid- The thread group ID of the thread receiving the kill signal
Description
tgkill call is similar to tkill, except that it also allows the caller to specify the thread group ID of the thread to be signalled. This protects against TID reuse.
Name
signal.sys_tgkill.return — Sending kill signal to a thread group completed
Synopsis
signal.sys_tgkill.return
signal.sys_tgkill.return
Values
Name
signal.send_sig_queue — Queuing a signal to a process
Synopsis
signal.send_sig_queue
signal.send_sig_queue
Values
sigqueue_addr- The address of the signal queue
sig_name- A string representation of the signal
sig- The queued signal
pid_name- Name of the process to which the signal is queued
sig_pid- The PID of the process to which the signal is queued
Name
signal.send_sig_queue.return — Queuing a signal to a process completed
Synopsis
signal.send_sig_queue.return
signal.send_sig_queue.return
Values
retstr- Return value as a string
Name
signal.pending — Examining pending signal
Synopsis
signal.pending
signal.pending
Values
sigset_size- The size of the user-space signal set
sigset_add- The address of the user-space signal set (
sigset_t)
Description
do_sigpending kernel function is executed.
Name
signal.pending.return — Examination of pending signal completed
Synopsis
signal.pending.return
signal.pending.return
Values
retstr- Return value as a string
Name
signal.handle — Signal handler being invoked
Synopsis
signal.handle
signal.handle
Values
regs- The address of the kernel-mode stack area
sig_code- The
si_codevalue of thesiginfosignal sig_mode- Indicates whether the signal was a user-mode or kernel-mode signal
sinfo- The address of the
siginfotable oldset_addr- The address of the bitmask array of blocked signals
sig- The signal number that invoked the signal handler
ka_addr- The address of the
k_sigactiontable associated with the signal
Name
signal.handle.return — Signal handler invocation completed
Synopsis
signal.handle.return
signal.handle.return
Values
retstr- Return value as a string
Name
signal.do_action — Examining or changing a signal action
Synopsis
signal.do_action
signal.do_action
Values
sa_mask- The new mask of the signal
oldsigact_addr- The address of the old
sigactionstruct associated with the signal sig- The signal to be examined/changed
sa_handler- The new handler of the signal
sigact_addr- The address of the new
sigactionstruct associated with the signal
Name
signal.do_action.return — Examining or changing a signal action completed
Synopsis
signal.do_action.return
signal.do_action.return
Values
retstr- Return value as a string
Name
signal.procmask — Examining or changing blocked signals
Synopsis
signal.procmask
signal.procmask
Values
how- Indicates how to change the blocked signals; possible values are
SIG_BLOCK=0(for blocking signals),SIG_UNBLOCK=1(for unblocking signals), andSIG_SETMASK=2for setting the signal mask. oldsigset_addr- The old address of the signal set (
sigset_t) sigset- The actual value to be set for
sigset_t sigset_addr- The address of the signal set (
sigset_t) to be implemented
Name
signal.flush — Flusing all pending signals for a task
Synopsis
signal.flush
signal.flush
Values
task- The task handler of the process performing the flush
pid_name- The name of the process associated with the task performing the flush
sig_pid- The PID of the process associated with the task performing the flush
Appendix A. Revision History Copiar o linkLink copiado para a área de transferência!
| Revision History | |||
|---|---|---|---|
| Revision 1.0-5.400 | 2013-10-31 | ||
| |||
| Revision 1.0-5 | 2012-07-18 | ||
| |||
| Revision 1.0-0 | Wed Jun 17 2009 | ||
| |||