Note: Run this script as the root user (no sudo calls are used in the script).
You will need the curl package installed, though I would have no idea why it wouldn't be installed by default:
zypper --non-interactive install curl
| #!/usr/bin/python | |
| import os, sys | |
| import logging | |
| import hashlib | |
| from xmlrpclib import ServerProxy | |
| import xml2obj | |
| ONE_SERVER="http://localhost:2633/RPC2" | |
| ONE_USER="oneadmin" |
| #!/usr/bin/env python | |
| # Nagios monitoring script for moosefs master server | |
| # Based on mfscgiserv from moosefs author | |
| # hungnv 13022012 | |
| import socket | |
| import struct | |
| import sys |
| #!/bin/sh | |
| # This shows how to handle combined short options along with | |
| # other long and short options. It does so by splitting them | |
| # apart (e.g. 'tar -xvzf ...' -> 'tar -x -v -z -f ...') | |
| while test $# -gt 0 | |
| do | |
| case $1 in |
| #!/usr/bin/perl | |
| our $VERSION = 1.00; | |
| =pod | |
| This script compares checksums of local files belonging to the Archive Team's | |
| Geocities Torrent with checksums published on archive.org. It can generate | |
| shell scripts that complete an aborted torrent download by getting | |
| missing/broken parts from archive.org |
| vcl 4.0; | |
| import std; | |
| import directors; | |
| import saintmode; | |
| # dig +noall +answer +short srv _http._tcp.update.freebsd.org | sort -k 2,2nr | while read priority weight port target; do printf "backend %s {\n\t.host = \"%s\";\n\t.port = \"80\";\n}\n" ${target//.*} $target; done | |
| backend update5 { | |
| .host = "update5.freebsd.org."; | |
| .port = "80"; | |
| } | |
| backend update6 { |
| Run the following commands on all three nodes in the cluster (nodes are named f1, f2 and f3). This will create the corosync.conf files for the cluster. | |
| [root@f1 pcs]# ./pcs cluster configure my_cluster_name f1 f2 f3 | |
| [root@f2 pcs]# ./pcs cluster configure my_cluster_name f1 f2 f3 | |
| [root@f3 pcs]# ./pcs cluster configure my_cluster_name f1 f2 f3 | |
| Then run the following command on all three nodes in the cluster, to start corosync and pacemaker. |
| This playbook has been removed as it is now very outdated. |
| #!/usr/bin/env python | |
| """ | |
| Synchronise block devices over the network | |
| Copyright 2006-2008 Justin Azoff <justin@bouncybouncy.net> | |
| Copyright 2011 Robert Coup <robert@coup.net.nz> | |
| License: GPL | |
| Getting started: |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |