随笔分类 - 网络自动化运维-CISCO
摘要:概述 脚本功能功能是全程模拟了人的手工巡检,并收集数据,处理后发送邮件。主要分为远程到交换机,查看转换机状态如:show process cpu | in CPU utilization查看cpu占用率;将查询后的结果记录并保存下来,如结果;11%;读取查询的数据文件;将文件中的数据如11%提取部分
阅读全文
摘要:import xlwt import sys import time import os # with open('hexin.txt') as f1: with open('10.10.45.11.txt') as f1: for i in f1: if "POWER" in i: power1=
阅读全文
摘要:一、安装mailx sendmail 1.1查看是否已经安装 yum install -y mailx sendmail 如果已经安装,会提示已经安装,没有安装会自动安装。 二、开启sendmail服务 查看状态:systemctl status sendmail 如果Active:显示active
阅读全文
摘要:https://www.cnblogs.com/xy51/p/10905652.html 一、使用yum命令安装 yum -y install sendmail yum install -y mail yum install -y mutt 二、启动email命令 查看email运行状态:/etc/
阅读全文
摘要:自动化巡检脚本 创建两个巡检excel import xlwt workbook = xlwt.Workbook(encoding='utf-8') #创建第一个巡检sheet cisco = workbook.add_sheet('上海网络设备巡检') style = xlwt.XFStyle()
阅读全文