Edition 1
register and u_register in current context. mmap is requested. munmap is requested. brk is requested (i.e. the heap will be resized). setsockoptsetsockoptsocket.sendmsg. sock_aio_writesock_aio_writesock_aio_readsock_aio_readsocket_writevsocket_writevsock_readvsock_readvSIGSEGVSIGSEGV complete Mono-spaced Bold
To see the contents of the filemy_next_bestselling_novelin your current working directory, enter thecat my_next_bestselling_novelcommand at the shell prompt and press Enter to execute the command.
Press Enter to execute the command.Press Ctrl+Alt+F2 to switch to the first virtual terminal. Press Ctrl+Alt+F1 to return to your X-Windows session.
mono-spaced bold. For example:
File-related classes includefilesystemfor file systems,filefor files, anddirfor directories. Each class has its own associated set of permissions.
Choose → → from the main menu bar to launch Mouse Preferences. In the Buttons tab, click the Left-handed mouse check box and click to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).To insert a special character into a gedit file, choose → → from the main menu bar. Next, choose → from the Character Map menu bar, type the name of the character in the Search field and click . The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the button. Now switch back to your document and choose → from the gedit menu bar.
Mono-spaced Bold Italic or Proportional Bold Italic
To connect to a remote machine using ssh, typesshat a shell prompt. If the remote machine isusername@domain.nameexample.comand your username on that machine is john, typessh john@example.com.Themount -o remountcommand remounts the named file system. For example, to remount thefile-system/homefile system, the command ismount -o remount /home.To see the version of a currently installed package, use therpm -qcommand. It will return a result as follows:package.package-version-release
Publican is a DocBook publishing system.
mono-spaced roman and presented thus:
books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs
mono-spaced roman but add syntax highlighting as follows:
package org.jboss.book.jca.ex1; import javax.naming.InitialContext; public class ExClient { public static void main(String args[]) throws Exception { InitialContext iniCtx = new InitialContext(); Object ref = iniCtx.lookup("EchoBean"); EchoHome home = (EchoHome) ref; Echo echo = home.create(); System.out.println("Created Echo"); System.out.println("Echo.echo('Hello') = " + echo.echo("Hello")); } }
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}
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.
probe kprocess.create = kernel.function("copy_process").return
{
task = $return
new_pid = task_pid(task)
}
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.
tapset_name.probe_name. For example, the probe for sending a signal could be named signal.send.
_).
/** * probe tapset.name - Short summary of what the tapset does. * @argument: Explanation of argument. * @argument2: Explanation of argument2. Probes can have multiple arguments. * * Context: * A brief explanation of the tapset context. * Note that the context should only be 1 paragraph short. * * Text that will appear under "Description." * * A new paragraph that will also appear under the heading "Description". * * Header: * A paragraph that will appear under the heading "Header". **/
/**
* probe vm.write_shared_copy- Page copy for shared page write.
* @address: The address of the shared write.
* @zero: Boolean indicating whether it is a zero page
* (can do a clear instead of a copy).
*
* Context:
* The process attempting the write.
*
* Fires when a write to a shared page requires a page copy. This is
* always preceded by a vm.shared_write.
**/
Synopsis content, use:
* Synopsis:
* New Synopsis string
*
/** * probe signal.handle - Fires when the signal handler is invoked * @sig: The signal number that invoked the signal handler * * Synopsis: * <programlisting>static int handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, * sigset_t *oldset, struct pt_regs * regs)</programlisting> */
<programlisting> tag in this instance, since overriding the Synopsis content of an entry does not automatically form the necessary tags.
command
emphasis
programlisting
remark (tagged strings will appear in Publican beta builds of the document)
register and u_register in current context. print_regs — Print a register dump.
function print_regs()
execname — Returns the execname of a target process (or group of processes).
function execname:string()
pid — Returns the ID of a target process.
function pid:long()
tid — Returns the thread ID of a target process.
function tid:long()
ppid — Returns the process ID of a target process's parent process.
function ppid:long()
pgrp — Returns the process group ID of the current process.
function pgrp:long()
sid — Returns the session ID of the current process.
function sid:long()
pexecname — Returns the execname of a target process's parent process.
function pexecname:string()
gid — Returns the group ID of a target process.
function gid:long()
egid — Returns the effective gid of a target process.
function egid:long()
uid — Returns the user ID of a target process.
function uid:long()
euid — Return the effective uid of a target process.
function euid:long()
cpu — Returns the current cpu number.
function cpu:long()
pp — Return the probe point associated with the currently running probe handler,
function pp:string()
registers_valid — Determines validity of and register in current context. u_register
function registers_valid:long()
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.
user_mode — Determines if probe point occurs in user-mode.
function user_mode:long()
is_return — Determines if probe point is a return probe.
function is_return:long()
target — Return the process ID of the target process.
function target:long()
stack_size — Return the size of the kernel stack.
function stack_size:long()
stack_used — Returns the amount of kernel stack used.
function stack_used:long()
stack_unused — Returns the amount of kernel stack currently available.
function stack_unused:long()
uaddr — User space address of current running task. EXPERIMENTAL.
function uaddr:long()
usymname or symdata. Often the task will be in the VDSO where it entered the kernel. FIXME - need VDSO tracking support #10080.
print_stack — Print out stack from string.
function print_stack(stk:string)
stkbacktrace.
probefunc — Return the probe point's function name, if known.
function probefunc:string()
probemod — Return the probe point's module name, if known.
function probemod:string()
modname — Return the kernel module name loaded at the address.
function modname:string(addr:long)
addrsymname — Return the symbol associated with the given address.
function symname:string(addr:long)
addrsymdata — Return the symbol and module offset for the address.
function symdata:string(addr:long)
addrusymname — Return the symbol of an address in the current task. EXPERIMENTAL!
function usymname:string(addr:long)
addrusymdata — Return the symbol and module offset of an address. EXPERIMENTAL!
function usymdata:string(addr:long)
addrprint_ustack — Print out stack for the current task from string. EXPERIMENTAL!
function print_ustack(stk:string)
stkubacktrace for the current task.
print_backtrace — Print stack back trace
function print_backtrace()
print_stack(backtrace), except that deeper stack nesting may be supported. Return nothing.
backtrace — Hex backtrace of current stack
function backtrace:string()
caller — Return name and address of calling function
function caller:string()
s 0xx”, symname(caller_addr, caller_addr)) Works only for return probes at this time.
caller_addr — Return caller address
function caller_addr:long()
print_ubacktrace — Print stack back trace for current task. EXPERIMENTAL!
function print_ubacktrace()
print_ustack(ubacktrace), except that deeper stack nesting may be supported. Return nothing.
ubacktrace — Hex backtrace of current task stack. EXPERIMENTAL!
function ubacktrace:string()
get_cycles — Processor cycle count.
function get_cycles:long()
mmap is requested. munmap is requested. brk is requested (i.e. the heap will be resized). vm_fault_contains — Test return value for page fault reason
function vm_fault_contains:long(value:long,test:long)
valuetestvm.pagefault — Records that a page fault occurred.
vm.pagefault
write_access1 indicates a write, while 0 indicates a read.
addressvm.pagefault.return — Indicates what type of fault occurred.
vm.pagefault.return
fault_type0 (VM_FAULT_OOM) for out of memory faults, 2 (VM_FAULT_MINOR) for minor faults, 3 (VM_FAULT_MAJOR) for major faults, or 1 (VM_FAULT_SIGBUS) if the fault was neither OOM, minor fault, nor major fault.
addr_to_node — Returns which node a given address belongs to within a NUMA system.
function addr_to_node:long(addr:long)
addrvm.mmap — Fires when an mmap is requested.
vm.mmap
lengthaddressmmap.
vm.munmap — Fires when an munmap is requested.
vm.munmap
lengthaddressmunmap.
vm.brk — Fires when a brk is requested (i.e. the heap will be resized).
vm.brk
lengthaddressbrk.
vm.oom_kill — Fires when a thread is selected for termination by the OOM killer.
vm.oom_kill
taskioscheduler.elv_next_request — Fires when a request is retrieved from the request queue
ioscheduler.elv_next_request
elevator_nameioscheduler.elv_next_request.return — Fires when a request retrieval issues a return signal
ioscheduler.elv_next_request.return
req_flagsreqdisk_majordisk_minorioscheduler.elv_add_request — A request was added to the request queue
ioscheduler.elv_add_request
req_flagsreqdisk_majorelevator_namedisk_minorioscheduler.elv_completed_request — Fires when a request is completed
ioscheduler.elv_completed_request
req_flagsreqdisk_majorelevator_namedisk_minorscsi.ioentry — Prepares a SCSI mid-layer request
scsi.ioentry
disk_majordevice_statedisk_minorscsi.iodispatching — SCSI mid-layer dispatched low-level SCSI command
scsi.iodispatching
lunreq_bufflenhost_nodevice_statedev_idchanneldata_directionrequest_bufferscsi.iodone — SCSI command completed by low level driver and enqueued into the done queue.
scsi.iodone
lunhost_nodevice_statedev_idchanneldata_directionscsi.iocompleted — SCSI mid-layer running the completion processing for block device I/O requests
scsi.iocompleted
lunhost_nodevice_statedev_idchanneldata_directiongoodbytessetsockoptsetsockoptnetdev.receive — Data recieved from network device.
netdev.receive
protocoldev_namelengthnetdev.transmit — Network device transmitting buffer
netdev.transmit
protocoldev_namelengthtruesizetcp.sendmsg — Sending a tcp message
tcp.sendmsg
namesizesocktcp.sendmsg.return — Sending TCP message is done
tcp.sendmsg.return
namesizetcp.recvmsg — Receiving TCP message
tcp.recvmsg
saddrdaddrnamesportdportsizesocktcp.recvmsg.return — Receiving TCP message complete
tcp.recvmsg.return
saddrdaddrnamesportdportsizetcp.disconnect — TCP socket disconnection
tcp.disconnect
saddrdaddrflagsnamesportdportsocktcp.disconnect.return — TCP socket disconnection complete
tcp.disconnect.return
retnametcp.setsockopt — Call to setsockopt
tcp.setsockopt
optstrleveloptlensetsockopt
nameoptnamesocktcp.setsockopt.return — Return from setsockopt
tcp.setsockopt.return
retnametcp.receive — Called when a TCP packet is received
tcp.receive
urgpshrstdportsaddrdaddracksynfinsportudp.sendmsg — Fires whenever a process sends a UDP message
udp.sendmsg
namesizesockudp.sendmsg.return — Fires whenever an attempt to send a UDP message is completed
udp.sendmsg.return
namesizeudp.recvmsg — Fires whenever a UDP message is received
udp.recvmsg
namesizesockudp.recvmsg.return — Fires whenever an attempt to receive a UDP message received is completed
udp.recvmsg.return
namesizeudp.disconnect — Fires when a process requests for a UDP disconnection
udp.disconnect
flagsnamesockudp.disconnect.return — UDP has been disconnected successfully
udp.disconnect.return
retnameip_ntop — returns a string representation from an integer IP number
function ip_ntop:string(addr:long)
addrsocket.sendmsg. sock_aio_writesock_aio_writesock_aio_readsock_aio_readsocket_writevsocket_writevsock_readvsock_readvsocket.send — Message sent on a socket.
socket.send
successprotocolflagsnamestatesizetypefamilysocket.receive — Message received on a socket.
socket.receive
successprotocolflagsnamestatesizetypefamilysocket.sendmsg — Message is currently being sent on a socket.
socket.sendmsg
protocolflagsnamestatesizetypefamilysock_sendmsg function
socket.sendmsg.return — Return from socket.sendmsg.
socket.sendmsg.return
successprotocolflagsnamestatesizetypefamilysock_sendmsg function
socket.recvmsg — Message being received on socket
socket.recvmsg
protocolflagsnamestatesizetypefamilysock_recvmsg function
socket.recvmsg.return — Return from Message being received on socket
socket.recvmsg.return
successprotocolflagsnamestatesizetypefamilysock_recvmsg function.
socket.aio_write — Message send via sock_aio_write
socket.aio_write
protocolflagsnamestatesizetypefamilysock_aio_write function
socket.aio_write.return — Conclusion of message send via sock_aio_write
socket.aio_write.return
successprotocolflagsnamestatesizetypefamilysock_aio_write function
socket.aio_read — Receiving message via sock_aio_read
socket.aio_read
protocolflagsnamestatesizetypefamilysock_aio_read function
socket.aio_read.return — Conclusion of message received via sock_aio_read
socket.aio_read.return
successprotocolflagsnamestatesizetypefamilysock_aio_read function
socket.writev — Message sent via socket_writev
socket.writev
protocolflagsnamestatesizetypefamilysock_writev function
socket.writev.return — Conclusion of message sent via socket_writev
socket.writev.return
successprotocolflagsnamestatesizetypefamilysock_writev function
socket.readv — Receiving a message via sock_readv
socket.readv
protocolflagsnamestatesizetypefamilysock_readv function
socket.readv.return — Conclusion of receiving a message via sock_readv
socket.readv.return
successprotocolflagsnamestatesizetypefamilysock_readv function
socket.create — Creation of a socket
socket.create
protocolnamerequestertypefamilysocket.create.return — Return from Creation of a socket
socket.create.return
successprotocolerrnamerequestertypefamilysocket.close — Close a socket
socket.close
protocolflagsnamestatetypefamilysocket.close.return — Return from closing a socket
socket.close.return
namesock_prot_num2str — Given a protocol number, return a string representation.
function sock_prot_num2str:string(proto:long)
protosock_prot_str2num — Given a protocol name (string), return the corresponding protocol number.
function sock_prot_str2num:long(proto:string)
protosock_fam_num2str — Given a protocol family number, return a string representation.
function sock_fam_num2str:string(family:long)
familysock_fam_str2num — Given a protocol family name (string), return the corresponding
function sock_fam_str2num:long(family:string)
familysock_state_num2str — Given a socket state number, return a string representation.
function sock_state_num2str:string(state:long)
statesock_state_str2num — Given a socket state string, return the corresponding state number.
function sock_state_str2num:long(state:string)
statekprocess.create — Fires whenever a new process is successfully created
kprocess.create
new_pidfork (or one of its syscall variants), or a new kernel thread.
kprocess.start — Starting new process
kprocess.start
kprocess.exec — Attempt to exec to a new program
kprocess.exec
filenamekprocess.exec_complete — Return from exec to a new program
kprocess.exec_complete
successerrnokprocess.exit — Exit from process
kprocess.exit
codekprocess.release — Process released
kprocess.release
pidtaskSIGSEGVSIGSEGV complete signal.send — Signal being sent to a process
signal.send
send2queuesigqueue
nametasksinfosiginfo struct
si_codesig_namesigsharedsig_pidpid_namesignal.send.return — Signal being sent to a process completed
signal.send.return
retstr__group_send_sig_info, specific_send_sig_info, or send_sigqueue
send2queuesigqueue
nameshared__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.
signal.checkperm — Check being performed on a sent signal
signal.checkperm
namesignal.checkperm
tasksinfosiginfo structure
si_codesig_namesigpid_namesig_pidsignal.checkperm.return — Check performed on a sent signal completed
signal.checkperm.return
retstrnamesignal.checkperm
signal.wakeup — Sleeping process being wakened for signal
signal.wakeup
resumeSTOPPED or TRACED state
state_maskTASK_INTERRUPTIBLE, TASK_STOPPED, TASK_TRACED, and TASK_INTERRUPTIBLE.
pid_namesig_pidsignal.check_ignored — Checking to see signal is ignored
signal.check_ignored
sig_namesigpid_namesig_pidsignal.check_ignored.return — Check to see signal is ignored completed
signal.check_ignored.return
retstrnamesignal.checkperm
signal.force_segv — Forcing send of SIGSEGV
signal.force_segv
sig_namesigpid_namesig_pidsignal.force_segv.return — Forcing send of SIGSEGV complete
signal.force_segv.return
retstrnameforce_sigsegv
signal.syskill — Sending kill signal to a process
signal.syskill
sigpidsignal.syskill.return — Sending kill signal completed
signal.syskill.return
signal.sys_tkill — Sending a kill signal to a thread
signal.sys_tkill
sig_namesigpidtkill 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).
signal.systkill.return — Sending kill signal to a thread completed
signal.systkill.return
signal.sys_tgkill — Sending kill signal to a thread group
signal.sys_tgkill
sig_namesigpidtgidtgkill 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.
signal.sys_tgkill.return — Sending kill signal to a thread group completed
signal.sys_tgkill.return
signal.send_sig_queue — Queuing a signal to a process
signal.send_sig_queue
sigqueue_addrsig_namesigpid_namesig_pidsignal.send_sig_queue.return — Queuing a signal to a process completed
signal.send_sig_queue.return
retstrsignal.pending — Examining pending signal
signal.pending
sigset_sizesigset_addsigset_t)
do_sigpending kernel function is executed.
signal.pending.return — Examination of pending signal completed
signal.pending.return
retstrsignal.handle — Signal handler being invoked
signal.handle
regssig_codesi_code value of the siginfo signal
sig_modesinfosiginfo table
oldset_addrsigka_addrk_sigaction table associated with the signal
signal.handle.return — Signal handler invocation completed
signal.handle.return
retstrsignal.do_action — Examining or changing a signal action
signal.do_action
sa_maskoldsigact_addrsigaction struct associated with the signal
sigsa_handlersigact_addrsigaction struct associated with the signal
signal.do_action.return — Examining or changing a signal action completed
signal.do_action.return
retstrsignal.procmask — Examining or changing blocked signals
signal.procmask
howSIG_BLOCK=0 (for blocking signals), SIG_UNBLOCK=1 (for unblocking signals), and SIG_SETMASK=2 for setting the signal mask.
oldsigset_addrsigset_t)
sigsetsigset_t
sigset_addrsigset_t) to be implemented
signal.flush — Flusing all pending signals for a task
signal.flush
taskpid_namesig_pid| Revision History | |||
|---|---|---|---|
| Revision 1.0 | Wed Jun 17 2009 | ||
| |||