# rackpdu

> This is a native SNMP library for manage APC Rack PDU.

Latest version **1.0.5** (published 2023-06-05) · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2023-06-05 |
| First published | 2023-06-05 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 27.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ilia Skripchenko |
| Maintainers | ilya7u |
| Keywords | apc, rack, pdu, metered, switched, snmp |

## Links

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

## Dependencies (4)

- [pino](https://npm.io/package/pino.md) ^8.14.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [net-snmp](https://npm.io/package/net-snmp.md) ^3.9.6
- [pino-pretty](https://npm.io/package/pino-pretty.md) ^10.0.0

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 1.0.5 (latest) — 2023-06-05
- 1.0.4 — 2023-06-05
- 1.0.3 — 2023-06-05
- 1.0.2 — 2023-06-05

## README

# rackpdu

This is a native SNMP library for manage APC Rack PDU.

Tested on APC Rack PDU switched 9000 series.

## Install

Using NPM:
```
$ npm install rackpdu
```

Using YARN:
```
$ yarn add rackpdu
```

## Usage
```ts
import { RackPDU } from 'rackpdu';

const client = new RackPDU('192.168.1.102:161'); // or new RackPDU('192.168.1.102', { timeout: 30000});
console.log(await client.isAlive());

await client.close();
```

```ts
import { RackPDU } from 'rackpdu';

console.log(await RackPDU.isAlive('192.168.1.102'));
```

## Methods

Common:

- isAlive
- getName
- getHardwareRevision
- getFirmwareRevision
- getDayOfManufacture
- getModelNumber
- getSerialNumber
- getDescription
- getUptime
- getPowerDraw

Outlets:

- getOutletsCount
- getOutletName
- getOutletNames
- getOutletState
- getOutletStates

Commands:

- runDeviceCommand
- runOutletsCommand

## Static methods

- RackPDU.isAlive
- RackPDU.getOutletsNames
- RackPDU.outletRunCommand
- RackPDU.outletOn
- RackPDU.outletOff
- RackPDU.outletReboot
- RackPDU.outletsReboot

## Configure Rack PDU Hardware

1. In Administration -> Network -> SNMPv1 -> access

    - enable Enable 'Enable SNMPv1 access'

2. In Administration -> Network -> SNMPv1 -> access control
    - set 'Access Type' of public Community Name to 'Read'
    - set 'Access Type' of private Community Name to 'Write+'

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