Python Forum
is this possible in python? please support
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
is this possible in python? please support
#1
Hi All,

I am polling ZTE OLT, and getting different length List from 6 different OIDs, as below, suggestion required to print

### Operation status of the interface###
[root@localhost ~]# snmpwalk -v2c -c sky123 172.19.2.130 1.3.6.1.2.1.2.2.1.8.285278722
IF-MIB::ifOperStatus.285278722 = INTEGER: up(1)

### Admin status of interface ###
[root@localhost ~]# snmpwalk -v2c -c sky123 172.19.2.130 1.3.6.1.2.1.2.2.1.7.285278722
IF-MIB::ifAdminStatus.285278722 = INTEGER: up(1)


### Name of interface ###

[root@localhost ~]# snmpwalk -v2c -c sky123 172.19.2.130 1.3.6.1.2.1.31.1.1.1.1.285278722
IF-MIB::ifName.285278722 = STRING: gpon_1/2/2

### ONU ports ####

[root@localhost ~]# snmpwalk -v2c -c sky123 172.19.2.130 1.3.6.1.4.1.3902.1082.500.10.2.3.3.1.3.285278722
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.3.285278722.1 = STRING: "ONU-2:1"
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.3.285278722.2 = STRING: "ONU-2:2"
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.3.285278722.4 = STRING: "ONU-2:4"
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.3.285278722.5 = STRING: "ONU-2:5"
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.3.285278722.6 = STRING: "ONU-2:6"
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.3.285278722.7 = STRING: "ONU-2:7"
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.3.285278722.8 = STRING: "ONU-2:8"

### Connected customers ###

[root@localhost ~]# snmpwalk -v2c -c sky123 172.19.2.130 1.3.6.1.4.1.3902.1082.500.10.2.3.3.1.2.285278722
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.2.285278722.1 = STRING: "ONU-2:1"
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.2.285278722.2 = STRING: "Customer ID - C2100010833 Mr Adithya BJ Port 1/2/2 ONU Id - 2"
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.2.285278722.4 = STRING: "Customer ID - C2100011918 Mrs Vijayalakshmi A Port 1/2/2 ONU Id - 4"
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.2.285278722.5 = STRING: "Customer ID - C2100011948 Mr. Balasundaram Port 1/2/2 ONU Id - 5"
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.2.285278722.6 = STRING: "Customer ID - C2100012259 Mr Ramkumar S Port 1/2/2 ONU Id - 6"
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.2.285278722.7 = STRING: "Customer ID - C2100012980 Mr Muthukumar K Port 1/2/2 ONU Id - 7"
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.3.1.2.285278722.8 = STRING: "Customer ID-C2100016300 Mr Ramakrishnamission Ashrama Port 1/2/2 ONU Id - 8"

### status of ports ###
[root@localhost ~]# snmpwalk -v2c -c sky123 172.19.2.130 1.3.6.1.4.1.3902.1082.500.10.2.3.8.1.4.285278722
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.8.1.4.285278722.1 = INTEGER: 7
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.8.1.4.285278722.2 = INTEGER: 4
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.8.1.4.285278722.4 = INTEGER: 4
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.8.1.4.285278722.5 = INTEGER: 4
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.8.1.4.285278722.6 = INTEGER: 5
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.8.1.4.285278722.7 = INTEGER: 4
SNMPv2-SMI::enterprises.3902.1082.500.10.2.3.8.1.4.285278722.8 = INTEGER: 5

possible to print output in below format? please guide

PON Port admin status op Status ONU Customer ONU Status
gpon_1/2/2 Up Up ONU-2:1 1 7
gpon_1/2/2 Up Up ONU-2:2 2 5
gpon_1/2/2 Up Up ONU-2:3 3 4
gpon_1/2/2 Up Up ONU-2:4 4 4
gpon_1/2/2 Up Up ONU-2:5 5 4
gpon_1/2/2 Up Up ONU-2:6 6 4
gpon_1/2/2 Up Up ONU-2:7 7 4
gpon_1/2/2 Up Up ONU-2:8 8 4
Reply


Messages In This Thread
is this possible in python? please support - by anna - Apr-04-2018, 08:02 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Support Python loop ECDSA Secp256k1 MaxiMous 0 1,936 Mar-21-2021, 04:34 PM
Last Post: MaxiMous

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020