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, delettion, changing, and displaying a list of all buffers.

COMMANDS

shift [-c cpu_id]
    Change currently selected buffer to next buffer.

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

create [-b buffer_id] [-c cpu_id] -s size
    Create a new kernel event buffer.

-b buffer_id
    Specify an id of a buffer to be created. If omitted, the empty id is selected automatically.

-c cpu_id
    Specify an 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 for all CPUs. In this case, specified buffer_id is ignored.

-s size
    Specify a size of the buffer in byte.

delete/del -b buffer_id
    Delete a kernel event buffer.

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

list/ls
    Output a list of all kernel event buffers.

read [-b buffer_id] [-f output_file] [-n number]
    Read a content of kernel event buffer(s).

-b buffer_id
    Specify an id of a buffer to be read. If omitted, all buffer is read.

-f output_file
    Specify an name of 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 [-b buffer_id | -f input_file] [-c cpu_id] [-e event_name ...] [-h] [-n entry_num] [-r]
    Display LKST trace data.

-b buffer_id
    Specify an id of a buffer to be read. If omitted, all buffer is read.

-f input_file
    Specify the file name of binary trace data, which is created by using lkstbuf read or lkstlogd. (Also use kerenl crash dump file by using LKCD.) If omitted, kernel buffer is read directly.

-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)

version/ver
    Print version information.

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_XCHG)(2), ioctl(LKST_IOC_BUFFER_CREATE)(2), ioctl(LKST_IOC_BUFFER_DELETE)(2)