core

package module
v0.0.0-...-dce38a7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2019 License: ISC Imports: 5 Imported by: 0

README

Core

Facilities for creating core dumps from Go.

Documentation

Overview

Package core provides facilities for creating core dumps.

Index

Constants

This section is empty.

Variables

View Source
var Log = log15.New()

Functions

func DumpAll

func DumpAll() (pid int, err error)

Dump all threads. This is done using the external tool `gcore`. `gcore` is part of GDB's binutils and must be installed for this method to work. The core dump will contain all threads of the current process.

func DumpAllTo

func DumpAllTo(prefix string) (pid int, err error)

Same as `DumpAll`, but use the provided prefix for the core file path.

func DumpSelf

func DumpSelf() (int, error)

Dump the calling thread's state. This is done with a fork and SIGABRT. Only one thread will be present in the dump.

The environment variable `GOTRACEBACK` needs to be set to `crash` otherwise the Go runtime will not produce a core dump.

The ulimit for core dumps should also be set to allow them: `ulimit -u unlimited`.

Types

This section is empty.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL