This file contains 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
--- cfgmaker.ORG 2012-11-12 06:44:43.000000000 -0500 | |
+++ cfgmaker 2016-03-24 12:29:08.318018921 -0400 | |
@@ -691,7 +691,9 @@ | |
"$$i{Descr} $$i{ifAlias} $$i{CiscolocIfDescr}"; | |
last}; | |
/^name$/ && do {$if_title_desc = "#".$$i{Name} if $$i{Name}; last}; | |
- /^catname$/ && do {$if_title_desc = "$if_port_name"; last}; | |
+ /^catname$/ && do {$if_title_desc = "$if_port_name"." (".$$i{Name}. | |
+ ($$i{vmVlan} ? " - VLAN ".$$i{vmVlan} : " - dot1q") | |
+ .")"; last}; |
This file contains 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/perl -w | |
# | |
#This polls multiple haproxy servers via their admin stats urls and sums up statistics. | |
#Scenario for usage is when you have multiple HaProxy boxes behind a load balancer and want to view the | |
# "sum total" of some key statistics like Bytes In/Out, Sessions etc across all HAProxy servers. | |
#Usage: Assuming you want to sum up stats across ha proxies lb1,2 and 3 which are have stats available via http://lbname:8080/statspath. | |
# /etc/nagios3/scripts/check_haproxy_all.pl -u lb1.domain.com,lb2.domain.com,lb3.domain.com -U admin -a '/statspath' -P 'PASSWORD' | |
# See http://www.onepwr.org/haproxy-consolidated-stats for detailed info. | |
use strict; # always! :) |
This file contains 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
#!/bin/sh | |
# | |
# IPCAD data transfer for LightSquid on pfSense | |
# | |
ttime=`/usr/bin/rsh 127.0.0.1 show ip accounting | grep 'Accounting data saved' | awk '{print ($4)}'` | |
/usr/bin/rsh 127.0.0.1 clear ip accounting | |
/usr/bin/rsh 127.0.0.1 show ip accounting checkpoint | \ |
This file contains 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/php -q | |
<?php | |
/* | |
check_ip.php | |
part of pfSense (https://www.pfSense.org/) | |
Copyright (C) 2013-2015 Marcello Coutinho | |
Copyright (C) 2015 ESF, LLC | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without |
This file contains 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
local function hex1(hc) | |
if hc >= 0x30 and hc <= 0x39 then return hc-0x30 end -- 0..9 | |
if hc >= 0x61 and hc <= 0x66 then return hc-0x61+10 end -- a..f | |
if hc >= 0x41 and hc <= 0x46 then return hc-0x41+10 end -- A..F | |
return 0; | |
end | |
local function hex2(hstr, pos) | |
return 16*hex1(string.byte(hstr,pos)) + hex1(string.byte(hstr,pos+1)) | |
end |
This file contains 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/perl -w | |
# | |
# Check array performance on Dells MD3000i iSCSI-SAN | |
# You need SMcli installed to use this check. It's part of | |
# Dells MDSM package. | |
# Also Sys::Alone Perl library is required | |
# | |
# Performance counters description: http://en.community.dell.com/techcenter/storage/w/wiki/md3000i-performance-monitoring | |
# |
This file contains 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
#!/bin/bash | |
#Requirements: etckeeper, diffcolor | |
#This script concatenates multiple files of haproxy configuration into | |
#one file, and than checks if monolithic config contains errors. If everything is | |
#OK with new config script will write new config to $CURRENTCFG and reload haproxy | |
#Also, script will commit changes to etckeeper, if you don't use etckeeper you | |
#should start using it. | |
#Script assumes following directory structure: | |
#/etc/haproxy/conf.d/ |
This file contains 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
#!/bin/bash | |
# | |
# Detects mysql deadlocks and notify developers by email | |
# Notification sent on new deadlocks only | |
# monuser must have "PROCESS" permission in mysql server | |
# Set EXCLUDE_PTRN to avoid alerting if the pattern was found | |
# | |
host=$1 | |
user=monuser |
This file contains 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
#!/bin/bash | |
# | |
# Iterates over all available RDS instances in all regions and creates snapshots of them along with dumping (if necessary). Dump | |
# is encrypted if the database itself is encrypted at rest. Only dumping MySQL instances is implemented at the moment | |
# | |
# Usage: | |
# $ aws configure - configure AWS access and secret keys | |
# $ vi .rds_backup - setup environment variables required for the script (see below) | |
# $ source .rds_backup - export the environment variables | |
# $ ./rds_backup.sh [(makedump|anyotherword) [db-instance]] |
This file contains 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
--- src/kcompat.h.org 2015-09-21 23:09:52.000000000 +0000 | |
+++ src/kcompat.h 2017-04-03 10:31:09.000000000 +0000 | |
@@ -3347,7 +3347,7 @@ | |
#ifndef vlan_get_protocol | |
static inline __be16 __kc_vlan_get_protocol(const struct sk_buff *skb) | |
{ | |
- if (vlan_tx_tag_present(skb) || | |
+ if (skb_vlan_tag_get(skb) || | |
skb->protocol != cpu_to_be16(ETH_P_8021Q)) | |
return skb->protocol; |
OlderNewer