| SystemTap Tapset ReferenceChapter 14. Signal Tapset- probe::signal.send - Signal being sent to a process
- probe::signal.send.return - Signal being sent to a process completed
- probe::signal.checkperm - Check being performed on a sent signal
- probe::signal.checkperm.return - Check performed on a sent signal completed
- probe::signal.wakeup - Sleeping process being wakened for signal
- probe::signal.check_ignored - Checking to see signal is ignored
- probe::signal.check_ignored.return - Check to see signal is ignored completed
- probe::signal.force_segv - Forcing send of SIGSEGV
- probe::signal.force_segv.return - Forcing send of SIGSEGV complete
- probe::signal.syskill - Sending kill signal to a process
- probe::signal.syskill.return - Sending kill signal completed
- probe::signal.sys_tkill - Sending a kill signal to a thread
- probe::signal.systkill.return - Sending kill signal to a thread completed
- probe::signal.sys_tgkill - Sending kill signal to a thread group
- probe::signal.sys_tgkill.return - Sending kill signal to a thread group completed
- probe::signal.send_sig_queue - Queuing a signal to a process
- probe::signal.send_sig_queue.return - Queuing a signal to a process completed
- probe::signal.pending - Examining pending signal
- probe::signal.pending.return - Examination of pending signal completed
- probe::signal.handle - Signal handler being invoked
- probe::signal.handle.return - Signal handler invocation completed
- probe::signal.do_action - Examining or changing a signal action
- probe::signal.do_action.return - Examining or changing a signal action completed
- probe::signal.procmask - Examining or changing blocked signals
- probe::signal.procmask.return - Examining or changing blocked signals completed
- probe::signal.flush - Flushing all pending signals for a task
This family of probe points is used to probe signal activities. It contains the following probe points: Nameprobe::signal.send - Signal being sent to a process Valuessend2queue 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 siginfo struct si_code Indicates the signal type sig_name A string representation of the signal sig 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
Nameprobe::signal.send.return - Signal being sent to a process completed Synopsissignal.send.return Valuesretstr The return value to either __group_send_sig_info, specific_send_sig_info, or send_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.
ContextThe signal's sender. (correct?) DescriptionPossible __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 . Possible 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.
Nameprobe::signal.checkperm - Check being performed on a sent signal Valuesname task A task handle to the signal recipient sinfo The address of the siginfo structure si_code Indicates the signal type sig_name A string representation of the signal sig pid_name Name of the process receiving the signal sig_pid The PID of the process receiving the signal
Nameprobe::signal.checkperm.return - Check performed on a sent signal completed Synopsissignal.checkperm.return
Nameprobe::signal.wakeup - Sleeping process being wakened for signal Valuesresume Indicates whether to wake up a task in a STOPPED or TRACED state state_mask A string representation indicating the mask of task states to wake. Possible values are TASK_INTERRUPTIBLE, TASK_STOPPED, TASK_TRACED, and TASK_INTERRUPTIBLE. pid_name Name of the process to wake sig_pid The PID of the process to wake
Nameprobe::signal.check_ignored - Checking to see signal is ignored Synopsissignal.check_ignored Valuessig_name A string representation of the signal sig pid_name Name of the process receiving the signal sig_pid The PID of the process receiving the signal
Nameprobe::signal.check_ignored.return - Check to see signal is ignored completed Synopsissignal.check_ignored.return
Nameprobe::signal.force_segv - Forcing send of SIGSEGV Synopsissignal.force_segv Valuesname sig_name A string representation of the signal sig pid_name Name of the process receiving the signal sig_pid The PID of the process receiving the signal
Nameprobe::signal.force_segv.return - Forcing send of SIGSEGV complete Synopsissignal.force_segv.return
Nameprobe::signal.syskill - Sending kill signal to a process Valuesname sig_name A string representation of the signal sig The specific signal sent to the process pid_name The name of the signal recipient sig_pid The PID of the process receiving the signal
Nameprobe::signal.syskill.return - Sending kill signal completed Synopsissignal.syskill.return
Nameprobe::signal.sys_tkill - Sending a kill signal to a thread Valuesname sig_name A string representation of the signal sig The specific signal sent to the process pid_name The name of the signal recipient sig_pid The PID of the process receiving the kill signal
DescriptionThe tkill call is analogous to kill(2), except that it also allows a process within a specific thread group to be targeted. Such processes are targeted through their unique thread IDs (TID).
Nameprobe::signal.systkill.return - Sending kill signal to a thread completed Synopsissignal.systkill.return Valuesretstr The return value to either __group_send_sig_info, name
Nameprobe::signal.sys_tgkill - Sending kill signal to a thread group Synopsissignal.sys_tgkill Valuesname sig_name A string representation of the signal sig The specific kill signal sent to the process tgid The thread group ID of the thread receiving the kill signal pid_name The name of the signal recipient sig_pid The PID of the thread receiving the kill signal
DescriptionThe 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.
Nameprobe::signal.sys_tgkill.return - Sending kill signal to a thread group completed Synopsissignal.sys_tgkill.return Valuesretstr The return value to either __group_send_sig_info, name
Nameprobe::signal.send_sig_queue - Queuing a signal to a process Synopsissignal.send_sig_queue Valuessigqueue_addr The address of the signal queue name sig_name A string representation of the signal sig 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
Nameprobe::signal.send_sig_queue.return - Queuing a signal to a process completed Synopsissignal.send_sig_queue.return
Nameprobe::signal.pending - Examining pending signal Valuesname sigset_size The size of the user-space signal set sigset_add The address of the user-space signal set (sigset_t)
DescriptionThis probe is used to examine a set of signals pending for delivery to a specific thread. This normally occurs when the do_sigpending kernel function is executed.
Nameprobe::signal.pending.return - Examination of pending signal completed Synopsissignal.pending.return
Nameprobe::signal.handle - Signal handler being invoked Valuesregs The address of the kernel-mode stack area sig_code The si_code value of the siginfo signal name sig_mode Indicates whether the signal was a user-mode or kernel-mode signal sinfo The address of the siginfo table sig_name A string representation of the signal 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_sigaction table associated with the signal
Nameprobe::signal.handle.return - Signal handler invocation completed Synopsissignal.handle.return
Nameprobe::signal.do_action - Examining or changing a signal action Valuessa_mask The new mask of the signal name sig_name A string representation of the signal oldsigact_addr The address of the old sigaction struct 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 sigaction struct associated with the signal
Nameprobe::signal.do_action.return - Examining or changing a signal action completed Synopsissignal.do_action.return
Nameprobe::signal.procmask - Examining or changing blocked signals Valueshow Indicates how to change the blocked signals; possible values are SIG_BLOCK=0 (for blocking signals), SIG_UNBLOCK=1 (for unblocking signals), and SIG_SETMASK=2 for setting the signal mask. name oldsigset_addr The old address of the signal set (sigset_t) sigset The actual value to be set for sigset_t (correct?) sigset_addr The address of the signal set (sigset_t) to be implemented
Nameprobe::signal.procmask.return - Examining or changing blocked signals completed Synopsissignal.procmask.return
Nameprobe::signal.flush - Flushing all pending signals for a task Valuesname 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
Chapter 15. Directory-entry (dentry) Tapset- function::d_name - get the dirent name
- function::reverse_path_walk - get the full dirent path
- function::task_dentry_path - get the full dentry path
- function::d_path - get the full nameidata path
This family of functions is used to map kernel VFS directory entry pointers to file or full path names. Namefunction::d_name - get the dirent name Synopsisfunction d_name:string(dentry:long) DescriptionReturns the dirent name (path basename).
Namefunction::reverse_path_walk - get the full dirent path Synopsisfunction reverse_path_walk:string(dentry:long) DescriptionReturns the path name (partial path to mount point).
Namefunction::task_dentry_path - get the full dentry path Synopsisfunction task_dentry_path:string(task:long,dentry:long,vfsmnt:long) DescriptionReturns the full dirent name (full path to the root), like the kernel d_path function.
Namefunction::d_path - get the full nameidata path Synopsisfunction d_path:string(nd:long) DescriptionReturns the full dirent name (full path to the root), like the kernel d_path function. Chapter 16. Logging Tapset- function::log - Send a line to the common trace buffer.
- function::warn - Send a line to the warning stream.
- function::exit - Start shutting down probing script.
- function::error - Send an error message.
- function::ftrace - Send a message to the ftrace ring-buffer.
This family of functions is used to send simple message strings to various destinations. Namefunction::log - Send a line to the common trace buffer. Synopsisfunction log(msg:string) Argumentsmsg The formatted message string.
DescriptionThis function logs data. log sends the message immediately to staprun and to the bulk transport (relayfs) if it is being used. If the last character given is not a newline, then one is added. This function is not as effecient as printf and should be used only for urgent messages.
Namefunction::warn - Send a line to the warning stream. Synopsisfunction warn(msg:string) Argumentsmsg The formatted message string.
DescriptionThis function sends a warning message immediately to staprun. It is also sent over the bulk transport (relayfs) if it is being used. If the last characater is not a newline, the one is added.
Namefunction::exit - Start shutting down probing script. DescriptionThis only enqueues a request to start shutting down the script. New probes will not fire (except "end" probes), but all currently running ones may complete their work.
Namefunction::error - Send an error message. Synopsisfunction error(msg:string) Argumentsmsg The formatted message string.
DescriptionAn implicit end-of-line is added. staprun prepends the string "ERROR:". Sending an error message aborts the currently running probe. Depending on the MAXERRORS parameter, it may trigger an exit .
Namefunction::ftrace - Send a message to the ftrace ring-buffer. Synopsisfunction ftrace(msg:string) Argumentsmsg The formatted message string.
DescriptionIf the ftrace ring-buffer is configured & available, see /debugfs/tracing/trace for the message. Otherwise, the message may be quietly dropped. An implicit end-of-line is added. Chapter 17. Random functions Tapset- function::randint - Return a random number between [0,n)
These functions deal with random number generation. Namefunction::randint - Return a random number between [0,n) Synopsisfunction randint:long(n:long) Argumentsn Number past upper limit of range, not larger than 2**20.
Chapter 18. String and data retrieving functions Tapset- function::kernel_string - Retrieves string from kernel memory.
- function::kernel_string2 - Retrieves string from kernel memory with alternative error string.
- function::kernel_string_n - Retrieves string of given length from kernel memory.
- function::kernel_long - Retrieves a long value stored in kernel memory.
- function::kernel_int - Retrieves an int value stored in kernel memory.
- function::kernel_short - Retrieves a short value stored in kernel memory.
- function::kernel_char - Retrieves a char value stored in kernel memory.
- function::kernel_pointer - Retrieves a pointer value stored in kernel memory.
- function::user_string - Retrieves string from user space.
- function::user_string2 - Retrieves string from user space with alternative error string.
- function::user_string_warn - Retrieves string from user space.
- function::user_string_quoted - Retrieves and quotes string from user space.
- function::user_string_n - Retrieves string of given length from user space.
- function::user_string_n2 - Retrieves string of given length from user space.
- function::user_string_n_warn - Retrieves string from user space.
- function::user_string_n_quoted - Retrieves and quotes string from user space.
- function::user_short - Retrieves a short value stored in user space.
- function::user_short_warn - Retrieves a short value stored in user space.
- function::user_int - Retrieves an int value stored in user space.
- function::user_int_warn - Retrieves an int value stored in user space.
- function::user_long - Retrieves a long value stored in user space.
- function::user_long_warn - Retrieves a long value stored in user space.
- function::user_char - Retrieves a char value stored in user space.
- function::user_char_warn - Retrieves a char value stored in user space.
Functions to retrieve strings and other primitive types from the kernel or a user space programs based on addresses. All strings are of a maximum length given by MAXSTRINGLEN. Namefunction::kernel_string - Retrieves string from kernel memory. Synopsisfunction kernel_string:string(addr:long) Argumentsaddr The kernel address to retrieve the string from.
General Syntaxkernel_string:string(addr:long) DescriptionThis function returns the null terminated C string from a given kernel memory address. Reports an error on string copy fault.
Namefunction::kernel_string2 - Retrieves string from kernel memory with alternative error string. Synopsisfunction kernel_string2:string(addr:long,err_msg:string) Argumentsaddr The kernel address to retrieve the string from. err_msg The error message to return when data isn't available.
General Syntaxkernel_string2:string(addr:long, err_msg:string) DescriptionThis function returns the null terminated C string from a given kernel memory address. Reports the given error message on string copy fault.
Namefunction::kernel_string_n - Retrieves string of given length from kernel memory. Synopsisfunction kernel_string_n:string(addr:long,n:long) Argumentsaddr The kernel address to retrieve the string from. n The maximum length of the string (if not null terminated).
General Syntaxkernel_string_n:string(addr:long, n:long) DescriptionReturns the C string of a maximum given length from a given kernel memory address. Reports an error on string copy fault.
Namefunction::kernel_long - Retrieves a long value stored in kernel memory. Synopsisfunction kernel_long:long(addr:long) Argumentsaddr The kernel address to retrieve the long from.
General Syntaxkernel_long:long(addr:long) DescriptionReturns the long value from a given kernel memory address. Reports an error when reading from the given address fails.
Namefunction::kernel_int - Retrieves an int value stored in kernel memory. Synopsisfunction kernel_int:long(addr:long) Argumentsaddr The kernel address to retrieve the int from.
DescriptionReturns the int value from a given kernel memory address. Reports an error when reading from the given address fails.
Namefunction::kernel_short - Retrieves a short value stored in kernel memory. Synopsisfunction kernel_short:long(addr:long) Argumentsaddr The kernel address to retrieve the short from.
General Syntaxkernel_short:long(addr:long) DescriptionReturns the short value from a given kernel memory address. Reports an error when reading from the given address fails.
Namefunction::kernel_char - Retrieves a char value stored in kernel memory. Synopsisfunction kernel_char:long(addr:long) Argumentsaddr The kernel address to retrieve the char from.
General Syntaxkernel_char:long(addr:long) DescriptionReturns the char value from a given kernel memory address. Reports an error when reading from the given address fails.
Namefunction::kernel_pointer - Retrieves a pointer value stored in kernel memory. Synopsisfunction kernel_pointer:long(addr:long) Argumentsaddr The kernel address to retrieve the pointer from.
General Syntaxkernel_pointer:long(addr:long) DescriptionReturns the pointer value from a given kernel memory address. Reports an error when reading from the given address fails.
Namefunction::user_string - Retrieves string from user space. Synopsisfunction user_string:string(addr:long) Argumentsaddr The user space address to retrieve the string from.
General Syntaxuser_string:string(addr:long) DescriptionReturns the null terminated C string from a given user space memory address. Reports "<unknown>" on the rare cases when userspace data is not accessible.
Namefunction::user_string2 - Retrieves string from user space with alternative error string. Synopsisfunction user_string2:string(addr:long,err_msg:string) Argumentsaddr The user space address to retrieve the string from. err_msg The error message to return when data isn't available.
General Syntaxuser_string2:string(addr:long, err_msg:string) DescriptionReturns the null terminated C string from a given user space memory address. Reports the given error message on the rare cases when userspace data is not accessible.
Namefunction::user_string_warn - Retrieves string from user space. Synopsisfunction user_string_warn:string(addr:long) Argumentsaddr The user space address to retrieve the string from.
General Syntaxuser_string_warn:string(addr:long) DescriptionReturns the null terminated C string from a given user space memory address. Reports "<unknown>" on the rare cases when userspace data is not accessible and warns (but does not abort) about the failure.
Namefunction::user_string_quoted - Retrieves and quotes string from user space. Synopsisfunction user_string_quoted:string(addr:long) Argumentsaddr The user space address to retrieve the string from.
General Syntaxuser_string_quoted:string(addr:long) DescriptionReturns the null terminated C string from a given user space memory address where any ASCII characters that are not printable are replaced by the corresponding escape sequence in the returned string. Reports "NULL" for address zero. Returns "<unknown>" on the rare cases when userspace data is not accessible at the given address.
Namefunction::user_string_n - Retrieves string of given length from user space. Synopsisfunction user_string_n:string(addr:long,n:long) Argumentsaddr The user space address to retrieve the string from. n The maximum length of the string (if not null terminated).
General Syntaxuser_string_n:string(addr:long, n:long) DescriptionReturns the C string of a maximum given length from a given user space address. Returns "<unknown>" on the rare cases when userspace data is not accessible at the given address.
Namefunction::user_string_n2 - Retrieves string of given length from user space. Synopsisfunction user_string_n2:string(addr:long,n:long,err_msg:string) Argumentsaddr The user space address to retrieve the string from. n The maximum length of the string (if not null terminated). err_msg The error message to return when data isn't available.
General Syntaxuser_string_n2:string(addr:long, n:long, err_msg:string) DescriptionReturns the C string of a maximum given length from a given user space address. Returns the given error message string on the rare cases when userspace data is not accessible at the given address.
Namefunction::user_string_n_warn - Retrieves string from user space. Synopsisfunction user_string_n_warn:string(addr:long,n:long) Argumentsaddr The user space address to retrieve the string from. n The maximum length of the string (if not null terminated).
General Syntaxuser_string_n_warn:string(addr:long, n:long) DescriptionReturns up to n characters of a C string from a given user space memory address. Reports "<unknown>" on the rare cases when userspace data is not accessible and warns (but does not abort) about the failure.
Namefunction::user_string_n_quoted - Retrieves and quotes string from user space. Synopsisfunction user_string_n_quoted:string(addr:long,n:long) Argumentsaddr The user space address to retrieve the string from. n The maximum length of the string (if not null terminated).
General Syntaxuser_string_n_quoted:string(addr:long, n:long) DescriptionReturns up to n characters of a C string from the given user space memory address where any ASCII characters that are not printable are replaced by the corresponding escape sequence in the returned string. Reports "NULL" for address zero. Returns "<unknown>" on the rare cases when userspace data is not accessible at the given address.
Namefunction::user_short - Retrieves a short value stored in user space. Synopsisfunction user_short:long(addr:long) Argumentsaddr The user space address to retrieve the short from.
General Syntaxuser_short:long(addr:long) DescriptionReturns the short value from a given user space address. Returns zero when user space data is not accessible.
Namefunction::user_short_warn - Retrieves a short value stored in user space. Synopsisfunction user_short_warn:long(addr:long) Argumentsaddr The user space address to retrieve the short from.
General Syntaxuser_short_warn:long(addr:long) DescriptionReturns the short value from a given user space address. Returns zero when user space and warns (but does not abort) about the failure.
Namefunction::user_int - Retrieves an int value stored in user space. Synopsisfunction user_int:long(addr:long) Argumentsaddr The user space address to retrieve the int from.
DescriptionReturns the int value from a given user space address. Returns zero when user space data is not accessible.
Namefunction::user_int_warn - Retrieves an int value stored in user space. Synopsisfunction user_int_warn:long(addr:long) Argumentsaddr The user space address to retrieve the int from.
General Syntaxuser_ing_warn:long(addr:long) DescriptionReturns the int value from a given user space address. Returns zero when user space and warns (but does not abort) about the failure.
Namefunction::user_long - Retrieves a long value stored in user space. Synopsisfunction user_long:long(addr:long) Argumentsaddr The user space address to retrieve the long from.
General Syntaxuser_long:long(addr:long) DescriptionReturns the long value from a given user space address. Returns zero when user space data is not accessible. Note that the size of the long depends on the architecture of the current user space task (for those architectures that support both 64/32 bit compat tasks).
Namefunction::user_long_warn - Retrieves a long value stored in user space. Synopsisfunction user_long_warn:long(addr:long) Argumentsaddr The user space address to retrieve the long from.
General Syntaxuser_long_warn:long(addr:long) DescriptionReturns the long value from a given user space address. Returns zero when user space and warns (but does not abort) about the failure. Note that the size of the long depends on the architecture of the current user space task (for those architectures that support both 64/32 bit compat tasks).
Namefunction::user_char - Retrieves a char value stored in user space. Synopsisfunction user_char:long(addr:long) Argumentsaddr The user space address to retrieve the char from.
General Syntaxuser_char:long(addr:long) DescriptionReturns the char value from a given user space address. Returns zero when user space data is not accessible.
Namefunction::user_char_warn - Retrieves a char value stored in user space. Synopsisfunction user_char_warn:long(addr:long) Argumentsaddr The user space address to retrieve the char from.
General Syntaxuser_char_warn:long(addr:long) DescriptionReturns the char value from a given user space address. Returns zero when user space and warns (but does not abort) about the failure. Chapter 19. A collection of standard string functions- function::strlen - Returns the length of a string.
- function::substr - Returns a substring.
- function::stringat - Returns the char at a given position in the string.
- function::isinstr - Returns whether a string is a substring of another string.
- function::text_str - Escape any non-printable chars in a string.
- function::text_strn - Escape any non-printable chars in a string.
- function::tokenize - Return the next non-empty token in a string.
- function::str_replace - str_replace Replaces all instances of a substring with another.
- function::strtol - strtol - Convert a string to a long.
- function::isdigit - Checks for a digit.
Functions to get the length, a substring, getting at individual characters, string seaching, escaping, tokenizing, and converting strings to longs. Namefunction::strlen - Returns the length of a string. Synopsisfunction strlen:long(s:string) General Syntaxstrlen: long (str:string) DescriptionThis function returns the length of the string, which can be zero up to MAXSTRINGLEN.
Namefunction::substr - Returns a substring. Synopsisfunction substr:string(str:string,start:long,length:long) Argumentsstr The string to take a substring from start Starting position. 0 = start of the string. length Length of string to return.
General Syntaxsubstr:string (str:string, start:long, stop:long) DescriptionReturns the substring of the up to the given length starting at the given start position and ending at given stop position.
Namefunction::stringat - Returns the char at a given position in the string. Synopsisfunction stringat:long(str:string,pos:long) Argumentsstr The string to fetch the character from. pos The position to get the character from. 0 = start of the string.
General Syntaxstringat:long(srt:string, pos:long) DescriptionThis function returns the character at a given position in the string or zero if thestring doesn't have as many characters.
Namefunction::isinstr - Returns whether a string is a substring of another string. Synopsisfunction isinstr:long(s1:string,s2:string) General syntaxisinstr:long (s1:string, s2:string) DescriptionThis function returns 1 if string s1 contains s2, otherwise zero.
Namefunction::text_str - Escape any non-printable chars in a string. Synopsisfunction text_str:string(input:string) General Syntaxtext_str:string (input:string) DescriptionThis function accepts a string argument, and any ASCII characters that are not printable are replaced by the corresponding escape sequence in the returned string.
Namefunction::text_strn - Escape any non-printable chars in a string. Synopsisfunction text_strn:string(input:string,len:long,quoted:long) Argumentsinput len Maximum length of string to return. 0 means MAXSTRINGLEN. quoted Put double quotes around the string. If input string is truncated it will have "..." after the second quote.
General Syntaxtext_strn:string (input:string, len:long, quoted:long) DescriptionThis function accepts a string of designated length, and any ASCII characters that are not printable are replaced by the corresponding escape sequence in the returned string.
Namefunction::tokenize - Return the next non-empty token in a string. Synopsisfunction tokenize:string(input:string,delim:string) Argumentsinput String to tokenize. If NULL, returns the next non-empty token in the string passed in the previous call to tokenize . delim Token delimiter. Set of characters that delimit the tokens.
General Syntaxtokenize:string (input:string, delim:string) DescriptionThis function returns the next non-empty token in the given input string, where the tokens are delimited by characters in the delim string. If the input string is non-NULL, it returns the first token. If the input string is NULL, it returns the next token in the string passed in the previous call to tokenize. If no delimiter is found, the entire remaining input string is returned. It returns NULL when no more tokens are available.
Namefunction::str_replace - str_replace Replaces all instances of a substring with another. Synopsisfunction str_replace:string(prnt_str:string,srch_str:string,rplc_str:string) Argumentsprnt_str The string to search and replace in. srch_str The substring which is used to search in prnt_str string. rplc_str The substring which is used to replace srch_str.
General Syntaxstr_replace:string(prnt_str:string, srch_str:string, rplc_str:string) DescriptionThis function returns the given string with substrings replaced.
Namefunction::strtol - strtol - Convert a string to a long. Synopsisfunction strtol:long(str:string,base:long) General Syntaxstrtol:long (str:string, base:long) DescriptionThis function converts the string representation of a number to an integer. The base parameter indicates the number base to assume for the string (eg. 16 for hex, 8 for octal, 2 for binary).
Namefunction::isdigit - Checks for a digit. Synopsisfunction isdigit:long(str:string) DescriptionChecks for a digit (0 through 9) as the first character of a string. Returns non-zero if true, and a zero if false. Chapter 20. Utility functions for using ansi control chars in logs- function::ansi_clear_screen - Move cursor to top left and clear screen.
- function::ansi_set_color - Set the ansi Select Graphic Rendition mode.
- function::ansi_set_color2 - Set the ansi Select Graphic Rendition mode.
- function::ansi_set_color3 - Set the ansi Select Graphic Rendition mode.
- function::ansi_reset_color - Resets Select Graphic Rendition mode.
- function::ansi_new_line - Move cursor to new line.
- function::ansi_cursor_move - Move cursor to new coordinates.
- function::ansi_cursor_hide - Hides the cursor.
- function::ansi_cursor_save - Saves the cursor position.
- function::ansi_cursor_restore - Restores a previously saved cursor position.
- function::ansi_cursor_show - Shows the cursor.
Utility functions for logging using ansi control characters. This lets you manipulate the cursor position and character color output and attributes of log messages. Namefunction::ansi_clear_screen - Move cursor to top left and clear screen. Synopsisfunction ansi_clear_screen() DescriptionSends ansi code for moving cursor to top left and then the ansi code for clearing the screen from the cursor position to the end.
Namefunction::ansi_set_color - Set the ansi Select Graphic Rendition mode. Synopsisfunction ansi_set_color(fg:long) DescriptionSends ansi code for Select Graphic Rendition mode for the given forground color. Black (30), Blue (34), Green (32), Cyan (36), Red (31), Purple (35), Brown (33), Light Gray (37).
Namefunction::ansi_set_color2 - Set the ansi Select Graphic Rendition mode. Synopsisfunction ansi_set_color2(fg:long,bg:long) General Syntaxansi_set_color2(fg:long, bg:long) DescriptionSends ansi code for Select Graphic Rendition mode for the given forground color, Black (30), Blue (34), Green (32), Cyan (36), Red (31), Purple (35), Brown (33), Light Gray (37) and the given background color, Black (40), Red (41), Green (42), Yellow (43), Blue (44), Magenta (45), Cyan (46), White (47).
Namefunction::ansi_set_color3 - Set the ansi Select Graphic Rendition mode. Synopsisfunction ansi_set_color3(fg:long,bg:long,attr:long) General Syntaxansi_set_color3(fg:long, bg:long, attr:long) DescriptionSends ansi code for Select Graphic Rendition mode for the given forground color, Black (30), Blue (34), Green (32), Cyan (36), Red (31), Purple (35), Brown (33), Light Gray (37), the given background color, Black (40), Red (41), Green (42), Yellow (43), Blue (44), Magenta (45), Cyan (46), White (47) and the color attribute All attributes off (0), Intensity Bold (1), Underline Single (4), Blink Slow (5), Blink Rapid (6), Image Negative (7).
Namefunction::ansi_reset_color - Resets Select Graphic Rendition mode. Synopsisfunction ansi_reset_color() DescriptionSends ansi code to reset foreground, background and color attribute to default values.
Namefunction::ansi_new_line - Move cursor to new line. Synopsisfunction ansi_new_line() DescriptionSends ansi code new line.
Namefunction::ansi_cursor_move - Move cursor to new coordinates. Synopsisfunction ansi_cursor_move(x:long,y:long) Argumentsx Row to move the cursor to. y Colomn to move the cursor to.
General Syntaxansi_curos_move(x:long, y:long) DescriptionSends ansi code for positioning the cursor at row x and column y. Coordinates start at one, (1,1) is the top-left corner.
Namefunction::ansi_cursor_hide - Hides the cursor. Synopsisfunction ansi_cursor_hide() DescriptionSends ansi code for hiding the cursor.
Namefunction::ansi_cursor_save - Saves the cursor position. Synopsisfunction ansi_cursor_save() DescriptionSends ansi code for saving the current cursor position.
Namefunction::ansi_cursor_restore - Restores a previously saved cursor position. Synopsisfunction ansi_cursor_restore() DescriptionSends ansi code for restoring the current cursor position previously saved with ansi_cursor_save .
Namefunction::ansi_cursor_show - Shows the cursor. Synopsisfunction ansi_cursor_show() DescriptionSends ansi code for showing the cursor. |
| |
|