PHPackages                             freedsx/snmp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. freedsx/snmp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

freedsx/snmp
============

A Pure PHP SNMP Library

0.5.3(1mo ago)6758.1k↑17.2%17[9 issues](https://github.com/FreeDSx/SNMP/issues)3MITPHPPHP &gt;=7.1CI passing

Since Aug 4Pushed 1mo ago5 watchersCompare

[ Source](https://github.com/FreeDSx/SNMP)[ Packagist](https://packagist.org/packages/freedsx/snmp)[ Docs](https://github.com/FreeDSx/SNMP)[ RSS](/packages/freedsx-snmp/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (21)Versions (17)Used By (3)

FreeDSx SNMP [![](https://github.com/FreeDSx/SNMP/workflows/Build/badge.svg)](https://github.com/FreeDSx/SNMP/workflows/Build/badge.svg)
========================================================================================================================================

[](#freedsx-snmp-)

FreeDSx SNMP is a pure PHP SNMP library. It has no requirement on the core PHP SNMP extension. It implements SNMP client functionality described in [RFC 3412](https://tools.ietf.org/html/rfc3412) / [RFC 3416](https://tools.ietf.org/html/rfc3416) / [RFC 3414](https://tools.ietf.org/html/rfc3414). It also includes functionality described in various other RFCs, such as SHA2 authentication ([RFC 7860](https://tools.ietf.org/html/rfc7860)) and strong encryption mechanisms ([3DES](https://tools.ietf.org/html/draft-reeder-snmpv3-usm-3desede-00) / [AES-192-256](https://tools.ietf.org/html/draft-blumenthal-aes-usm-04)). Some main features include:

- SNMP version 1, 2, and 3 support.
- Supports all authentication mechanisms (md5, sha1, sha224, sha256, sha384, sha512).
- Supports all privacy encryption mechanisms (des, 3des, aes128, aes192, aes256).
- Supports all client request types (Get, GetNext, GetBulk, Set, Inform, TrapV1, TrapV2).
- Supports sending SNMPv1 and SNMPv2 traps (including inform requests).
- Trap Sink server for receiving and processing incoming traps.

The OpenSSL extension is required for privacy / encryption support. The GMP extension is required for 64-bit counters (BigCounter).

Documentation
=============

[](#documentation)

- [SNMP Client](/docs/Client)
    - [Configuration](/docs/Client/Configuration.md)
    - [General Usage](/docs/Client/General-Usage.md)
    - [Request Types](/docs/Client/Request-Types.md)
    - [SNMP Walk](/docs/Client/SNMP-Walk.md)
- [SNMP Server](/docs/Server)
    - [Trap Sink](/docs/Server/Trap-Sink.md)

Getting Started
===============

[](#getting-started)

Install via composer:

```
composer require freedsx/snmp
```

Use the SnmpClient class and the helper classes:

```
use FreeDSx\Snmp\SnmpClient;

$snmp = new SnmpClient([
    'host' => 'servername',
    'version' => 2,
    'community' => 'secret',
]);

# Get a specific OID value as a string...
echo $snmp->getValue('1.3.6.1.2.1').PHP_EOL;

# Get a specific OID as an object...
$oid = $snmp->getOid('1.3.6.1.2.1');
var_dump($oid);

echo sprintf("%s == %s", $oid->getOid(), (string) $oid->getValue()).PHP_EOL;

# Get multiple OIDs and iterate through them as needed...
$oids = $snmp->get('1.3.6.1.2.1.1.1', '1.3.6.1.2.1.1.3', '1.3.6.1.2.1.1.5');

foreach($oids as $oid) {
    echo sprintf("%s == %s", $oid->getOid(), (string) $oid->getValue()).PHP_EOL;
}

# Using the SnmpClient, get the helper class for an SNMP walk...
$walk = $snmp->walk();

# Keep the walk going until there are no more OIDs left
while($walk->hasOids()) {
    try {
        # Get the next OID in the walk
        $oid = $walk->next();
        echo sprintf("%s = %s", $oid->getOid(), $oid->getValue()).PHP_EOL;
    } catch (\Exception $e) {
        # If we had an issue, display it here (network timeout, etc)
        echo "Unable to retrieve OID. ".$e->getMessage().PHP_EOL;
    }
}

echo sprintf("Walked a total of %s OIDs.", $walk->count()).PHP_EOL;
```

For a complete configuration reference please see the [configuration doc](/docs/Client/Configuration.md). There are also SNMP v3 examples for [NoAuthNoPriv](/docs/Client/General-Usage.md#noauthnopriv), [AuthNoPriv](/docs/Client/General-Usage.md#authnopriv), and [AuthPriv](/docs/Client/General-Usage.md#authpriv)in the [general usage doc](/docs/Client/General-Usage.md).

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance89

Actively maintained with recent releases

Popularity46

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~259 days

Recently: every ~406 days

Total

12

Last Release

41d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/388229?v=4)[Chad Sikorra](/maintainers/ChadSikorra)[@ChadSikorra](https://github.com/ChadSikorra)

---

Top Contributors

[![ChadSikorra](https://avatars.githubusercontent.com/u/388229?v=4)](https://github.com/ChadSikorra "ChadSikorra (111 commits)")[![simPod](https://avatars.githubusercontent.com/u/327717?v=4)](https://github.com/simPod "simPod (6 commits)")[![einardivision](https://avatars.githubusercontent.com/u/5608299?v=4)](https://github.com/einardivision "einardivision (1 commits)")[![ocolin](https://avatars.githubusercontent.com/u/8870196?v=4)](https://github.com/ocolin "ocolin (1 commits)")

---

Tags

phpsnmpsnmp-trap-listenersnmp-trapssnmpv2snmpv3snmp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/freedsx-snmp/health.svg)

```
[![Health](https://phpackages.com/badges/freedsx-snmp/health.svg)](https://phpackages.com/packages/freedsx-snmp)
```

###  Alternatives

[freedsx/ldap

A Pure PHP LDAP library

157150.3k2](/packages/freedsx-ldap)[opensolutions/oss-snmp

A PHP SNMP library for people who hate SNMP, MIBs and OIDs!

10925.1k](/packages/opensolutions-oss-snmp)[logiscape/mcp-sdk-php

Model Context Protocol SDK for PHP

368116.8k12](/packages/logiscape-mcp-sdk-php)[genealabs/laravel-maps

Easy-peasy map integration for Laravel.

8330.9k](/packages/genealabs-laravel-maps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
