Skip to content

Commit

Permalink
Incorporate comments from OGHO.
Browse files Browse the repository at this point in the history
  • Loading branch information
webbaker0226 committed Nov 13, 2019
1 parent b5b53a4 commit 4bf0aa6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 26 deletions.
25 changes: 10 additions & 15 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@

Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

The Universal Permissive License (UPL), Version 1.0

Subject to the condition set forth below, permission is hereby granted to any
person obtaining a copy of this software, associated documentation and/or
data (collectively the "Software"), free of charge and under any and all
copyright rights in the Software, and any and all patent rights owned or
freely licensable by each licensor hereunder covering either (i) the
unmodified Software as contributed to or provided by such licensor, or (ii)
the Larger Works (as defined below), to deal in both
person obtaining a copy of this software, associated documentation and/or data
(collectively the "Software"), free of charge and under any and all copyright
rights in the Software, and any and all patent rights owned or freely
licensable by each licensor hereunder covering either (i) the unmodified
Software as contributed to or provided by such licensor, or (ii) the Larger
Works (as defined below), to deal in both

(a) the Software, and

(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
one is included with the Software each a "Larger Work" to which the Software
one is included with the Software (each a "Larger Work" to which the Software
is contributed by such licensors),

without restriction, including without limitation the rights to copy, create
Expand All @@ -25,10 +22,9 @@ Software and the Larger Work(s), and to sublicense the foregoing rights on
either these or other terms.

This license is subject to the following condition:

The above copyright notice and either this complete permission notice or at a
minimum a reference to the UPL must be included in all copies or substantial
portions of the Software.
The above copyright notice and either this complete permission notice or at
a minimum a reference to the UPL must be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Expand All @@ -37,4 +33,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ The flight data recorder (fdr) is a daemon which enables ftrace probes,
harvests ftrace data and (optionally) writes the data to a file.

The behavior of fdr is defined by configuration files stored in
/etc/fdr.d. During service startup, fdr will process each file in
```/etc/fdr.d```. During service startup, fdr will process each file in
the directory which has the suffix of .conf. If new config files
are added to the fdr.d directory, then the service must be restarted
to recognize the new configuration information.

fdr is controlled by systemd(8) on systems where systemd is
fdr is controlled by ```systemd(8)``` on systems where systemd is
available. Error messages from fdr can be viewed via systemctl,
for example, systemctl status -l fdr.
for example, ```systemctl status -l fdr```.

## Configuration File Syntax

The following keywords and options are recognized

### instance iname
### instance iname [buffer-size]

Create a new ftrace instance called "iname". This instance
will appear in /sys/kernel/debug/tracing/instances.
will appear in ```/sys/kernel/debug/tracing/instances```

The optional buffer-size parameter can be used to control
the size of the ftrace buffers for this instance in the
Expand All @@ -35,7 +35,7 @@ Force the named module to be loaded by fdr. This can be
useful when the module is normally loaded on demand and
the probes cannot be enabled until the module is loaded.

### enable subsystem-name/probe-name
### enable subsystem-name/probe-name [filter]

Enable an ftrace probe in the specified subsystem. Both
the subsystem name and probe name are defined by the kernel.
Expand All @@ -60,19 +60,22 @@ keyword has been used.

Disable all probes in the specified subsystem.

### saveto file-name
### saveto file-name [maxsize]

Save the output of enabled probes to the named file. If
the optional maxsize parameter is given, the daemon will
initiate a log rotation, see "LOG ROTATION" below. A suffix
initiate a log rotation, see [Log Rotation](README.md#log-rotation) below.
A suffix
of 'k', 'K', 'm', 'M', 'g' or 'G' may be used to specify
kilobytes, megabytes or gigabytes.

If no saveto directive is present, then fdr will create the
instance and enable the probes. In this case, the data
can be harvested manually by reading:

```
/sys/kernel/debug/tracing/instances/iname/trace_pipe
```

The ftrace buffers in the kernel are circular. If no
process harvests the data, new data will overwrite old data.
Expand All @@ -88,8 +91,8 @@ default.

## Log Rotation

fdr can use logrotate(8) to manage the output files. By convention,
/etc/logrotate.d/instance-name controls the behavior of logrotate.
fdr can use ```logrotate(8)``` to manage the output files. By convention,
``` /etc/logrotate.d/instance-name ``` controls the behavior of logrotate.

fdr will also invoke logrotate directly at startup and when reaching
the maxsize limit for the save file.
Expand All @@ -111,7 +114,7 @@ the `install` tool (provided by the coreutils rpm) as well as
make inself (provided by make rpm).

The source code itself depends on standard header files such
as <stdio.h> (provided by glibc-headers).
as ```<stdio.h>``` (provided by glibc-headers).

## License

Expand Down

0 comments on commit 4bf0aa6

Please sign in to comment.