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
#/usr/bin/python | |
import pylibmc | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
import cgi | |
import logging | |
class example(): | |
host = "" | |
server = "" | |
def __init__(self, host='10.10.93.16',port=11211): |
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
#!/usr/bin/python | |
# Copyright Jon Berg , turtlemeat.com | |
# Modified by nikomu @ code.google.com | |
import string,cgi,time | |
from os import curdir, sep | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
from sys import exit | |
import os # os. path |
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
#!/usr/local/bin/python | |
import sys | |
import MySQLdb | |
import ConfigParser | |
config=ConfigParser.ConfigParser() | |
config.readfp(open('/tmp/DNS.conf')) | |
pick_list=config.get('DNS','ip') | |
hostlist=map(str,pick_list.split(',')) | |
monitor_user=config.get('check_mysql','username') |
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
#!/usr/bin/python | |
import socket,select | |
# -*- coding: utf-8 -*- | |
import sys, os, time, atexit | |
from signal import SIGTERM | |
class Daemon: | |
""" | |
A generic daemon class. | |
Usage: subclass the Daemon class and override the _run() method |
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
#!/usr/bin/python | |
import sys | |
import MySQLdb | |
import ConfigParser | |
config=ConfigParser.ConfigParser() | |
config.readfp(open('/tmp/DNS.conf')) | |
pick_list=config.get('DNS','ip') | |
hostlist=map(str,pick_list.split(',')) | |
def pingcmd(ip,port): |
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
#!/usr/bin/python | |
import socket,select | |
# -*- coding: utf-8 -*- | |
import sys, os, time, atexit | |
from signal import SIGTERM | |
class Daemon: | |
""" | |
A generic daemon class. | |
Usage: subclass the Daemon class and override the _run() method |
NewerOlder