lkstbuf(8)

NAME
lkstbuf - Control kernel event buffer in LKST.

SYNOPSIS
lkstbuf command [ option(s) ]

DESCRIPTION
This command controls kernel event buffer in LKST such as creation, deletion, changing, reading, formatting, and listing of all buffers.

COMMANDS

link/ln -b buffer_id [-n next_buffer_id] [-c cpu_id]
    Change destination buffer for the shift operation.

-b buffer_id
    Specify the id of a buffer.

-n next_buffer_id
    Specify the id of the destination buffer. If omitted, clear destination of specified buffer. NOTE: You can specify a buffer doesn't exist yet to distination, except itself. However, you must fail to shift while it doesn't exist.

-c cpu_id
    Specify the id of a CPU of which buffer is changed. If omitted, buffers which have specified id in each CPU are changed. The id must be same as described in "/proc/cpuinfo".

shift [-c cpu_id]
    Change currently selected buffer to next buffer. NOTE: If destination buffer does not exist, this operation would fail.

-c cpu_id
    Specify the id of a CPU of which buffer is changed. If omitted, buffers which have specified id in each CPU are changed. The id must be same as described in "/proc/cpuinfo".

jump -b buffer_id [-c cpu_id]
    Change currently selected buffer to specified buffer.

-b buffer_id
    Specify the id of a buffer.

-c cpu_id
    Specify the id of a CPU of which buffer is changed. If omitted, buffers of all CPUs are changed. The id must be same as described in "/proc/cpuinfo".

create -s size[K|M] [-b buffer_id] [-n next_buffer_id] [-c cpu_id]
    Create a new event buffer.

-s size[K|M]
    Specify size of a buffer. size is followed by K and M suffixes representing size in Kilo bytes and in Mega bytes, respectively.

-b buffer_id
    Specify the id of a buffer(s) to be created. If omitted, the unused id is selected automatically.

-n next_buffer_id
    Specify the id of the destination buffer. If omitted, clear the destination of new buffer(s).

-c cpu_id
    Specify the id of a CPU of which the buffer is created. The id must be same as described in "/proc/cpuinfo". If omitted, new buffers are created in each CPU.

delete/del -b buffer_id [-c cpu_id]
    Delete an event buffer.

-b buffer_id
    Specify the id of a buffer to be deleted.

-c cpu_id
    Specify the id of a CPU of which the buffer is deleted. The id must be same as described in "/proc/cpuinfo". If omitted, all buffers those have buffer_id id are deleted in each CPU (if exist).

list/ls [-c cpu_id] [-v]
    Output the list of all kernel event buffers.

-c cpu_id
    Specify the id of a CPU to list. The id must be same as described in "/proc/cpuinfo". If omitted, all buffers those have buffer_id id are deleted in each CPU (if exist).

-v  Specify that the list of buffers display as verbose format.

read [-c cpu_id] [-b buffer_id] [-f output_file] [-n number]

read -S [-f output_file] [-n number]
    Read the contents of an event buffer/event buffers.

-c cpu_id
    Specify the id of a cpu to read from. If omitted, all buffers those have buffer_id id are read.

-b buffer_id
    Specify the id of a buffer to be read. If omitted, all buffers owned by cpu_id are read. Neither cpu_id nor buffer_id is specified, all buffers in system are read (except for static buffer )

-S  Specify that the command read from static buffer.

-f output_file
    Specify the output file. If omitted, this command displays the content.

-n number
    Specify the number of read entry of the buffer. If omitted, all entries of the buffer are read.

print -f log_file [-c cpu_id] [-e event_name ...] [-h] [-n entry_num] [-r] [-C] [-V]
    Format LKST trace data.

-f log_file
    Specify the file containing binary trace data, which is created by using lkstbuf read or lkstlogd. (Also use kerenl crash dump file by using LKCD.)

-c cpu_id
    Specify the cpu number.

-e event_name ...
    Specify event filter. Enumerate the names of events which you want to trace. ( Event name list is displayed by option -h. ) Each event is separated by comma. example(1) Display only "system_call_entry" and "system_call_exit". -e system_call_entry,system_call_exit If you don't want to trace some events, specify "!" followed by the names of the events, like "!system_call_entry". You can specify "all" to specify all events. example(2) Display all events except for "system_call_entry" and "system_call_exit". -e all,!system_call_entry,!system_call_exit NOTE: Enumerated event name is evaluated from the left to the right. If both display and non-display are specified for the same event, the specification of the right side is given to priority. -e all,!spin_lock => display all events except spin_lock
    -e !spin_lock,all => display all events
    -e !spin_lock,spin_lock => the same as "-e spin_lock"
    -e spin_lock,!spin_lock => the same as "-e !spin_lock"

-h  Display command help. ( Also event name list is displayed. )

-n entry_num
    Specify the number of output entry.

-r  Reverse the order of output record.
    (default : time descending sort)

-V  Verbose mode.
    Display all arguments.(default : display only commented arguments.)

-C  Dislpay trace data by CSV format.
    The meaning of column in the CSV format is explained.
    First column is event name or event number.
    Second column is CPU number.
    Third column is process id.
    4th-8th columns are date which an event caused.
        ...,day of week, month, day, hour,year,...
    9th column is name of parameter.
    10th column is value of parameter.(under 32bit)
    11th column is value of parameter.(upper 32bit)
        ... following ,same mean 9th-11th column.

version/ver
    Print version of this command.

help
    Print help message.

RETURN VALUE

0   success

Except 0
    failure

REFERENCES
lkst(8), ioctl(LKST_IOC_BUFFER_READ)(2), ioctl(LKST_IOC_BUFFER_LIST)(2), ioctl(LKST_IOC_BUFFER_LINK)(2), ioctl(LKST_IOC_BUFFER_JUMP)(2), ioctl(LKST_IOC_BUFFER_CREATE)(2), ioctl(LKST_IOC_BUFFER_DELETE)(2)