Last active
January 20, 2022 21:50
-
-
Save froop/73dc422eb78e6079aa99d59be2757897 to your computer and use it in GitHub Desktop.
[Python] snmptrap負荷テスト
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 subprocess | |
import time | |
import datetime | |
for i in range(10000): | |
time.sleep(0.01) | |
command = 'snmptrap -v 2c -c public 172.31.1.11 "" netSnmpExperimental netSnmpExperimental.1 s "%08d" netSnmpExperimental.2 s "%s"' % (i, datetime.datetime.now().time()) | |
subprocess.check_call(command, shell=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment