Skip to content

Instantly share code, notes, and snippets.

##################################################
##################################################
### datacenter : ofis
##################################################
##################################################
Datastore name: datastore1 (3)
Capacity: 550.2 GiB
Provisioned space: 241.0 GiB
Free space: 432.1 GiB
#!/usr/bin/env python
import atexit
from pyVmomi import vim, vmodl
from pyVim.connect import SmartConnect, Disconnect
import humanize
MBFACTOR = float(1 << 20)
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 /Users/aliyaman/PycharmProjects/snmp/main.py
IF-MIB::ifNumber.0 = 7
IF-MIB::ifIndex.1 = 1
IF-MIB::ifIndex.2 = 2
IF-MIB::ifIndex.3 = 3
IF-MIB::ifIndex.4 = 4
IF-MIB::ifIndex.5 = 5
IF-MIB::ifIndex.6 = 6
IF-MIB::ifIndex.7 = 7
IF-MIB::ifDescr.1 = Device vmnic0 at 02:00.0 tg3
(0,)
(0, 0)
(1,)
(1, 3)
(1, 3, 6)
(1, 3, 6, 1)
(1, 3, 6, 1, 1)
(1, 3, 6, 1, 2)
(1, 3, 6, 1, 2, 1)
(1, 3, 6, 1, 2, 1, 1)
# Çekilen Veriler
FIELDS = ["ifNumber", "ifIndex", "ifDescr", "ifType", "ifMtu", "ifSpeed", "ifPhysAddress", "ifAdminStatus",
"ifOperStatus", "ifLastChange",
"ifLastChange", "ifInOctets", "ifInUcastPkts", "ifInNUcastPkts", "ifInDiscards", "ifInErrors", "ifOutOctets",
"ifOutUcastPkts",
"ifOutNUcastPkts", "ifOutDiscards", "ifOutErrors", "ifOutQLen", "ifSpecific", "ifName", "ifInMulticastPkts",
"ifInBroadcastPkts", ]
# Başlangıç
@AliYmn
AliYmn / snmp-command.txt
Created August 15, 2017 08:58
Snmp command list
[0] 1.3.6.1.2.1.1.1. sysDescr
[1] 1.3.6.1.2.1.1.2. sysObjectID
[2] 1.3.6.1.2.1.1.3. sysUpTime
[3] 1.3.6.1.2.1.1.4. sysContact
[4] 1.3.6.1.2.1.1.5. sysName
[5] 1.3.6.1.2.1.1.6. sysLocation
[6] 1.3.6.1.2.1.1.7. sysServices
[7] 1.3.6.1.2.1.2.1. ifNumber
[8] 1.3.6.1.2.1.2.2.1.1. ifIndex
[9] 1.3.6.1.2.1.2.2.1.2. ifDescr
@AliYmn
AliYmn / rancher.sh
Created August 11, 2017 13:49
Ubuntu Rancher
sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server
@AliYmn
AliYmn / gist:1fc16e4d82aafd997c16e50b2a6e9f74
Created August 10, 2017 07:48
Ubuntu change LANGUAGE
apt-get install --reinstall locales && sudo dpkg-reconfigure locales
nano ~/.bashrc
export LANG=tr_TR.UTF-8
export LANGUAGE=tr
@AliYmn
AliYmn / .bash_profile
Created August 8, 2017 07:28
Macbook Terminal Colors
nano ~/.bash_profile
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
# Add Environment Variables
SECRET_KEY=5(15ds+i2+%ik6z&!yer+ga9m=e%jcqiz_5wszg)r-z!2--b2d
DB_NAME=djangoproject
DB_USER=admin
DB_PASS=adminpass
DB_SERVICE=postgres
DB_PORT=5432