Skip to content

Instantly share code, notes, and snippets.

jaseywang jaseywang

Block or report user

Report or block jaseywang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jaseywang
jaseywang / cn={4}cisco.ldif
Last active Apr 22, 2019
extended cisco ldap schema
View cn={4}cisco.ldif
# AUTO-GENERATED FILE - DO NOT EDIT !! Use ldapmodify.
# CRC32 bc108cba
dn: cn={4}cisco
objectClass: olcSchemaConfig
cn: {4}cisco
olcAttributeTypes: {0}( 1.3.6.1.4.1.9.500.1.1 NAME 'CiscoBanner' DESC 'Banne
rName for VPN users' EQUALITY caseIgnoreMatch ORDERING caseIgnoreOrderingMa
tch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1
28} SINGLE-VALUE )
olcAttributeTypes: {1}( 1.3.6.1.4.1.9.500.1.2 NAME 'CiscoACLin' DESC 'ACL in
@jaseywang
jaseywang / lld - ss
Created Sep 26, 2013
Replace netstat with ss to implement the low level discovery for zabbix
View lld - ss
#!/bin/bash
lines=$(sudo ss -lp | grep $1 | awk '{print $3}' | cut -d: -f2 | sort | wc -l)
if [ "$1" == "mongod" ]
then
portarray=(`sudo ss -lp | grep $1 | awk '{print $3}' | cut -d: -f2 | sort | head -n $(($lines/2)) 2>/dev/null`)
else
portarray=(`sudo ss -lp | grep $1 | awk '{print $3}' | cut -d: -f2 | sort 2>/dev/null`)
fi
@jaseywang
jaseywang / cisco.schema
Created Feb 3, 2017
default cisco ldap schema
View cisco.schema
attributetype ( 1.3.6.1.4.1.9.500.1.1
NAME 'CiscoBanner'
DESC 'Banner Name for VPN users'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
ORDERING caseIgnoreOrderingMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128}
SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.9.500.1.2
View gist:08c7d7d78ee97112162b1772b84d6eaa
资产优化,资源大量富裕,100+
MHA 上线/DB backup/数据迁移(MySQL/RDS),按业务拆分
CDN,调了一个月,没测试直接上线
MySQL 审计,没有测试直接上线/growingIO 规划混乱
webvirtmgt,测试环境上线,业务量太小,下线
办公网双线,动静态 BGP 切换,院方的一些问题
故障,明确是运维的故障已经全部优化修复
View gist:5939f34b269987a32cf97225be708902
Jun 20 22:53:09 jaseywang vps pptpd: ======= Backtrace: =========
Jun 20 22:53:09 jaseywang vps pptpd: /lib64/libc.so.6(__fortify_fail+0x37)[0x7fdba6416047]
Jun 20 22:53:09 jaseywang vps pptpd: /lib64/libc.so.6(+0x10d200)[0x7fdba6414200]
Jun 20 22:53:09 jaseywang vps pptpd: /lib64/libc.so.6(+0x10c709)[0x7fdba6413709]
Jun 20 22:53:09 jaseywang vps pptpd: /lib64/libc.so.6(_IO_default_xsputn+0xbc)[0x7fdba637f60c]
Jun 20 22:53:09 jaseywang vps pptpd: /lib64/libc.so.6(_IO_vfprintf+0xb0d)[0x7fdba634ec3d]
Jun 20 22:53:09 jaseywang vps pptpd: /lib64/libc.so.6(__vsprintf_chk+0x88)[0x7fdba6413798]
Jun 20 22:53:09 jaseywang vps pptpd: /lib64/libc.so.6(__sprintf_chk+0x7d)[0x7fdba64136ed]
Jun 20 22:53:09 jaseywang vps pptpd: /usr/lib/../lib64/pppd/2.4.5/radius.so(rc_mksid+0x43)[0x7fdba4272763]
Jun 20 22:53:09 jaseywang vps pptpd: /usr/lib/../lib64/pppd/2.4.5/radius.so(+0x48f0)[0x7fdba426d8f0]
View samba.ldif
# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.
# CRC32 e457e536
dn: cn={5}samba
objectClass: olcSchemaConfig
cn: {5}samba
olcAttributeTypes: {0}( 1.3.6.1.4.1.7165.2.1.24 NAME 'sambaLMPassword' DESC
'LanManager Password' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.1
15.121.1.26{32} SINGLE-VALUE )
olcAttributeTypes: {1}( 1.3.6.1.4.1.7165.2.1.25 NAME 'sambaNTPassword' DESC
'MD4 hash of the unicode password' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6
View ring buffer for diff nics
ring buffer:
ethtool -g networkinterface
BCM5709:
Ring parameters for eth0:
Pre-set maximums:
RX: 1020
RX Mini: 0
RX Jumbo: 4080
View 8.2.3. HTTP log format
8.2.3. HTTP log format
----------------------
The HTTP format is the most complete and the best suited for HTTP proxies. It
is enabled by when "option httplog" is specified in the frontend. It provides
the same level of information as the TCP format with additional features which
are specific to the HTTP protocol. Just like the TCP format, the log is usually
emitted at the end of the session, unless "option logasap" is specified, which
generally only makes sense for download sites. A session which matches the
"monitor" rules will never logged. It is also possible not to log sessions for
@jaseywang
jaseywang / pydmesg
Created Jul 8, 2012 — forked from saghul/pydmesg
pydmesg: dmesg with human readable timestamps
View pydmesg
#!/usr/bin/env python
# coding=utf8
# Copyright (C) 2010 Saúl ibarra Corretgé <saghul@gmail.com>
#
"""
pydmesg: dmesg with human-readable timestamps
"""
View affinity test report
I spend some time to have some test, all are redhat 6.2, here is the test.
1. Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet(bnx2), host8, E5606x2
# lspci | grep net
01:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
01:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
02:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
You can’t perform that action at this time.