承接 ocolin/netonix 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ocolin/netonix

Composer 安装命令:

composer require ocolin/netonix

包简介

Basic SNMP lib for querying Netonix switch

README 文档

README

Simple SNMP interface for Netonix switch.

Requirements

  • PHP 8.3 or higher

Usage

Instantiation

First we need to create an instance of the Netonix object. It required a hostname/ip and a community string. Only SNMP 2 is supported right now.

Example:

$netonix = new Ocolin\Netonix\Netonix(
    host: '129.168.1.100',
    community: 'my_community_string'
);

Function calls

Get System information

$output = $netonix->get_System();

print_r( $output );

Ocolin\Netonix\SystemObject Object
(
    [descr] => Netonix WS-12-250-DC
    [id] => .1.3.6.1.4.1.46242
    [uptime] => 111040191
    [contact] => noc.isp.net
    [name] => Netonix_Switch
    [location] => Sky Moon
    [lastchange] => 11
)

Get ingerfaces

$output = $netonix->get_Interfaces();

print_r( $output );

Array
(
    [0] => Ocolin\Netonix\InterfaceObject Object
        (
            [index] => 1
            [descr] => Port 1
            [type] => 6
            [mtu] => 1528
            [speed] => 0
            [adminstatus] => 1
            [operstatus] => 2
            [inoctets] => 260353251
            [inucastpkts] => 491651
            [innucastpkts] => 46
            [indiscards] => 0
            [inerrors] => 0
            [outoctets] => 3730538824
            [outucastpkts] => 1212974
            [outnucastpkts] => 43576018
            [outdiscards] => 0
            [outerrors] => 0
        )
    )

Get bridge table

$output = $netonix->get_Bridge_Table();

print_r( $output );

Array
(
    [0] => Ocolin\Netonix\BridgeObject Object
        (
            [index] => 1
            [address] => EC:13:B2:84:9F:56
            [port] => 0
            [status] => 4
        )

    [1] => Ocolin\Netonix\BridgeObject Object
        (
            [index] => 2
            [address] => 00:15:6D:B0:5B:DC
            [port] => 12
            [status] => 3
        )
    )

Get interface aliases

$output = self::$netonix->get_Aliases();

print_r( $output );

Array
(
    [0] => Port 1
    [1] => Uplink
    [2] => Tarana.Eest
    [3] => Port 4
    [4] => Port 5
    [5] => Port 6
    [6] => Port 7
    [7] => Port 8
    [8] => Port 9
    [9] => AP-East E
    [10] => AP-East SE
    [11] => AP-East E2
    [12] => Port 13
    [13] => Port 14
)

Get Netonix custom data

$output = self::$netonix->get_Netonix();

print_r( $output );

Ocolin\Netonix\NetonixObject Object
(
    [firmware] => 1.5.8
    [fans] => Array
        (
            [0] => Ocolin\Netonix\FanObject Object
                (
                    [index] => 1
                    [speed] => 2920
                )

        )

    [temps] => Array
        (
            [0] => Ocolin\Netonix\TempObject Object
                (
                    [index] => 1
                    [descr] => Board Temp
                    [temp] => 35
                )

            [1] => Ocolin\Netonix\TempObject Object
                (
                    [index] => 2
                    [descr] => CPU Temp
                    [temp] => 51
                )

            [2] => Ocolin\Netonix\TempObject Object
                (
                    [index] => 3
                    [descr] => PHY Temp
                    [temp] => 51
                )

            [3] => Ocolin\Netonix\TempObject Object
                (
                    [index] => 4
                    [descr] => DCDC Board Temp
                    [temp] => 34
                )

            [4] => Ocolin\Netonix\TempObject Object
                (
                    [index] => 5
                    [descr] => DCDC Heatsink #1 Temp
                    [temp] => 28
                )

            [5] => Ocolin\Netonix\TempObject Object
                (
                    [index] => 6
                    [descr] => DCDC Heatsink #2 Temp
                    [temp] => 13
                )

            [6] => Ocolin\Netonix\TempObject Object
                (
                    [index] => 7
                    [descr] => DCDC Controller Temp
                    [temp] => 53
                )

        )

    [voltage] => Array
        (
            [0] => Ocolin\Netonix\VoltageObject Object
                (
                    [index] => 1
                    [descr] => Board 48V
                    [voltage] => 4970
                )

            [1] => Ocolin\Netonix\VoltageObject Object
                (
                    [index] => 2
                    [descr] => Board 24V
                    [voltage] => 2450
                )

            [2] => Ocolin\Netonix\VoltageObject Object
                (
                    [index] => 3
                    [descr] => Board 3V
                    [voltage] => 330
                )

            [3] => Ocolin\Netonix\VoltageObject Object
                (
                    [index] => 4
                    [descr] => DCDC Input Voltage
                    [voltage] => 4960
                )

            [4] => Ocolin\Netonix\VoltageObject Object
                (
                    [index] => 5
                    [descr] => DCDC Output Voltage
                    [voltage] => 5110
                )

        )

    [poe] => Array
        (
            [0] => Off
            [1] => Off
            [2] => Off
            [3] => Off
            [4] => Off
            [5] => Off
            [6] => Off
            [7] => Off
            [8] => Off
            [9] => 24V
            [10] => 24V
            [11] => 24V
            [12] => Off
            [13] => Off
        )

    [powerConsumption] => 251
    [inputCurrent] => 5
    [efficiency] => 93
)

ocolin/netonix 适用场景与选型建议

ocolin/netonix 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 10 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 ocolin/netonix 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 ocolin/netonix 我们能提供哪些服务?
定制开发 / 二次开发

基于 ocolin/netonix 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 16
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-09