Skip to content

Commit

Permalink
Update the README
Browse files Browse the repository at this point in the history
  • Loading branch information
elwinar committed Feb 28, 2020
1 parent cd1ddcb commit cd508d3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@ _rcoredumpd_ is the indexation service. It listen on a TCP connection for
incoming files and process them.

```
Usage of rcoredumpd:
Usage of rcoredumpd: rcoredumpd [options]
-bind string
address to listen to (default "localhost:1105")
address to listen to (default "localhost:1105")
-conf string
configuration file to load (default "/etc/rcoredump/rcoredumpd.conf")
configuration file to load (default "/etc/rcoredump/rcoredumpd.conf")
-dir string
path of the directory to store the coredumps into (default "/var/lib/rcoredumpd/")
path of the directory to store the coredumps into (default "/var/lib/rcoredumpd/")
-version
print the version of rcoredumpd
```

Each connection yield a header file, a core dump and the binary that crashed.
All three are saved in the data directory as `<id>.<type>`.

### `rcoredump`

_rcoredump_ is the forwarding tool. It sends the core dump, the binary and a
Expand All @@ -31,18 +30,28 @@ header with some additional informations to the indexing service.
```
Usage of rcoredump: rcoredump [options] <executable path> <timestamp of dump>
-conf string
configuration file to load (default "/etc/rcoredump/rcoredump.conf")
configuration file to load (default "/etc/rcoredump/rcoredump.conf")
-dest string
address of the destination host (default "localhost:1105")
address of the destination host (default "http://localhost:1105")
-filelog string
path of the file to log into ('-' for stdout) (default "-")
-send-binary
send the binary along with the dump (default true)
-src string
path of the coredump to send to the host ('-' for stdin) (default "-")
path of the coredump to send to the host ('-' for stdin) (default "-")
-syslog
output logs to syslog
-version
print the version of rcoredum
```

On linux, you can use sysctl's `kernel.core_pattern` tunable to have the kernel
invoke _rcoredump_ everytime a dump is generated. For example:
`kernel.core_pattern=|rcoredump %E %t`.
`kernel.core_pattern=|/path/to/rcoredump %E %t`.

## Logging

All logging is done on stdout using the _logfmt_ format. This output can be
redirected easily enough using various utilities, like `logger` for syslog.
redirected easily enough using various utilities, like `logger` for syslog. For
convenience, the forwarder also accept a `syslog` flag to log using syslog, and
a `filelog` flag to log to a file.
2 changes: 1 addition & 1 deletion bin/rcoredumpd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type service struct {
func (s *service) configure() {
fs := flag.NewFlagSet("rcoredumpd-"+Version, flag.ExitOnError)
fs.Usage = func() {
fmt.Fprintln(fs.Output(), "Usage of rcoredumpd:")
fmt.Fprintln(fs.Output(), "Usage of rcoredumpd: rcoredumpd [options]")
fs.PrintDefaults()
}
fs.StringVar(&s.bind, "bind", "localhost:1105", "address to listen to")
Expand Down

0 comments on commit cd508d3

Please sign in to comment.