# siginfo

> Utility module to print pretty messages on SIGINFO/SIGUSR1

Latest version **2.0.0** (published 2020-06-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install siginfo
pnpm add siginfo
yarn add siginfo
bun add siginfo
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-06-16 |
| First published | 2017-10-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | Emil Bay |
| Maintainers | emilbayes |
| Keywords | siginfo, sigusr1, ctrl, t, info, progress, inspect |

## Links

- npm: https://www.npmjs.com/package/siginfo
- Repository: https://github.com/emilbayes/siginfo
- Homepage: https://github.com/emilbayes/siginfo#readme
- Issues: https://github.com/emilbayes/siginfo/issues
- npm.io page: https://npm.io/package/siginfo

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2020-06-16
- 1.0.2 — 2017-11-21
- 1.0.1 — 2017-10-03
- 1.0.0 — 2017-10-03

## README

# `siginfo`

[![Build Status](https://travis-ci.org/emilbayes/siginfo.svg?branch=master)](https://travis-ci.org/eemilbayes/siginfo)

> Utility module to print pretty messages on SIGINFO/SIGUSR1

`SIGINFO` on BSD / macOS and `SIGUSR1` on Linux, usually triggered by
`Ctrl + T`, are by convention used to print information about
a long running process internal state. Eg. `dd` will tell you how many blocks it
has written and at what speed, while `xz` will tell you progress, compression
ratio and estimated time remaining.

This module wraps both signals, checks if the process is connected to TTY and
lets you do whatever you want.

## Usage

```js
var siginfo = require('siginfo')
var pkg = require('./package.json')

siginfo(function () {
  console.dir({
    version: pkg.version,
    uptime: process.uptime()
  })
})

```

## API

### `var removeListener = siginfo(queryFn, [force])`

`queryFn` can be used for whatever you want (logging, sending a UDP message, etc.).
Setting `force = true` will attach the event handlers whether a TTY is present
or not.

## Install

```sh
npm install siginfo
```

## License

[ISC](LICENSE)

---
_Source: https://npm.io/package/siginfo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
