This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import getopt | |
| import os | |
| import re | |
| import subprocess | |
| import sys | |
| import time | |
| ip = '10.148.38.156' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #03032022 Julius | |
| import csv | |
| import datetime | |
| now = datetime.datetime.now() | |
| print ("Current date and time : ") | |
| print (now.strftime("%Y-%m-%d %H:%M:%S")) | |
| # Open the file with eaton pdu list | |
| eaton_list = open("eaton_pdu_list.txt", "r").read().splitlines() | |
| eaton_list = list(eaton_list) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Julius 16.02.22 Eaton | |
| from pysnmp.hlapi import * | |
| ip = "10.148.38.156" | |
| iterator = getCmd( | |
| SnmpEngine(), | |
| CommunityData('public', mpModel=0), | |
| UdpTransportTarget((ip, 161)), | |
| ContextData(), | |
| ObjectType(ObjectIdentity('SNMPv2-MIB', 'sysDescr', 0)) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Julius 16.02.22 Eaton | |
| import csv | |
| from pysnmp.entity.rfc3413.oneliner import cmdgen | |
| import datetime | |
| now = datetime.datetime.now() | |
| from pysnmp.hlapi import * | |
| print ("Current date and time : ") | |
| print (now.strftime("%Y-%m-%d %H:%M:%S")) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Julius 16.02.22 Eaton | |
| from pysnmp.hlapi import * | |
| ip = "10.148.38.156" | |
| iterator = getCmd( | |
| SnmpEngine(), | |
| CommunityData('public', mpModel=0), | |
| UdpTransportTarget((ip, 161)), | |
| ContextData(), | |
| ObjectType(ObjectIdentity('SNMPv2-MIB', 'sysDescr', 0)) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #work 09.02.2022 last | |
| import csv | |
| from pysnmp.entity.rfc3413.oneliner import cmdgen | |
| import datetime | |
| now = datetime.datetime.now() | |
| print ("Current date and time : ") | |
| print (now.strftime("%Y-%m-%d %H:%M:%S")) | |
| # Open the file with apc pdu lits | |
| apc_list = open("apc_pdu_list.txt", "r").read().splitlines() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #work 09.02.2022 | |
| import csv | |
| from pysnmp.entity.rfc3413.oneliner import cmdgen | |
| # Open the file with ips | |
| myfile = open("pdu_list.txt", "r").read().splitlines() | |
| myfile = list(myfile) | |
| print(myfile) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #work 09.02.2022 | |
| import csv | |
| #linecounter = sum(1 for line in open('pdu_list.txt', 'r')) | |
| #myfile = open("pdu_list.txt", "r") | |
| myfile =['10.148.38.107','10.148.38.190'] | |
| print(myfile) | |
| from pysnmp.entity.rfc3413.oneliner import cmdgen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import csv | |
| linecounter = sum(1 for line in open('pdu_list.txt', 'r')) | |
| #myfile = open("pdu_list.txt", "r") | |
| myfile =['10.148.38.107','10.148.38.190'] | |
| print(myfile) | |
| from pysnmp.entity.rfc3413.oneliner import cmdgen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import serial | |
| import time | |
| import glob | |
| from Tkinter import * | |
| from colorama import Fore, Back, Style | |
| import logging | |
| logging.basicConfig(filename="tk_hw.log", level=logging.INFO, format='%(asctime)s %(message)s', | |
| datefmt='%d/%m/%Y %I:%M:%S %p') |
NewerOlder