Skip to content

Instantly share code, notes, and snippets.

View kyob's full-sized avatar

kyob

View GitHub Profile
LibreNMS Discovery
Version info:
Commit SHA: 1c48fe399f78b7acd93384646ef159c0d00d0ac1
DB Schema: 173
PHP: 7.0.16
MySQL: 5.5.52-MariaDB
RRDTool: 1.4.8
SNMP: NET-SNMP 5.7.2
DEBUG!
SQL[SELECT version FROM `dbSchema` ORDER BY version DESC LIMIT 1]
LibreNMS Poller
Version info:
Commit SHA: 1c48fe399f78b7acd93384646ef159c0d00d0ac1
Commit Date: 1488955655
DB Schema: 173
PHP: 7.0.16
MySQL: 5.5.52-MariaDB
RRDTool: 1.4.8
SNMP: NET-SNMP 5.7.2
DEBUG!
.1.0.8802.1.1.1.1.1.1.0 = INTEGER: 2
.1.0.8802.1.1.1.1.1.2.1.2.1 = Gauge32: 1
.1.0.8802.1.1.1.1.1.2.1.2.2 = Gauge32: 1
.1.0.8802.1.1.1.1.1.2.1.2.3 = Gauge32: 1
.1.0.8802.1.1.1.1.1.2.1.2.4 = Gauge32: 1
.1.0.8802.1.1.1.1.1.2.1.2.5 = Gauge32: 1
.1.0.8802.1.1.1.1.1.2.1.2.6 = Gauge32: 1
.1.0.8802.1.1.1.1.1.2.1.2.7 = Gauge32: 1
.1.0.8802.1.1.1.1.1.2.1.2.8 = Gauge32: 1
.1.0.8802.1.1.1.1.1.2.1.2.9 = Gauge32: 1
@kyob
kyob / asr920-logi-1.txt
Created April 22, 2017 14:12
show ip igmp snooping event-history vlan
2017 Apr 22 15:10:30.058941 igmp [22479]: [22662]: SN: <217> While trying to forward packet should_check_report_flooding is true
2017 Apr 22 15:10:30.058935 igmp [22479]: [22662]: SN: <217> Suppressing report for (*,239.239.0.38) came on Eth1/34
2017 Apr 22 15:10:30.058926 igmp [22479]: [22662]: SN: <217> Updated oif Eth1/34 for (*, 239.239.0.38) entry
2017 Apr 22 15:10:30.058724 igmp [22479]: [22662]: SN: <217> Created IGMPv2 oif Eth1/34 for (*, 239.239.0.38)
2017 Apr 22 15:10:30.058706 igmp [22479]: [22662]: SN: <217> Created ET V2 host-entry 10.200.199.69 on port Eth1/34 for group 239.239.0.38
2017 Apr 22 15:10:30.058698 igmp [22479]: [22662]: SN: <217> Created ET V2 port Eth1/34 for group 239.239.0.38
2017 Apr 22 15:10:30.058682 igmp [22479]: [22662]: SN: <217> Received v2 report: group 239.239.0.38 from 10.200.199.69 on Eth1/34
2017 Apr 22 15:10:30.058673 igmp [22479]: [22662]: SN: <217> Process a valid IGMP packet, pkttype:v2report(22), iif:Eth1/34
2017 Apr 22 15:10:30.058659 igmp [22479]: [22662]: SN:
@kyob
kyob / jpegoptim-recursively.txt
Created June 23, 2017 10:41
Recursively optimze jpg starting from current directory.
find -type f -name "*.jpg" -exec jpegoptim --strip-all {} \;
echo "/ip firewall filter" ; whois -h whois.radb.net -- '-i origin AS32934' | grep '^route:' | sort -n | uniq | awk '{print "add action=drop chain=forward comment=Facebook dst-address="$2}'
echo "/ipv6 firewall filter" ; whois -h whois.radb.net -- '-i origin AS32934' | grep '^route6:' | sort -n | uniq | awk '{print "add action=drop chain=forward comment=Facebook dst-address="$2}'
@kyob
kyob / smarty-smart-debug.tpl
Created May 23, 2018 11:58
smarty debug highlights
{"<?php\n\$data =\n"|@cat:{$variable|@var_export:true|@cat:";\n?>"}|@highlight_string:true}
@kyob
kyob / bonding-primary-reselect.sh
Created July 14, 2018 07:20
Force to set prefered nic for bonding. It can be useful when we mix 1G and 10G in bonding to two switches.
#!/bin/bash
exec 1> >(logger -s -t $(basename $0)) 2>&1
# VLAN 12 LAN
SLAVE_INTERFACE="eth6"
BONDING_INTERFACE="bond0"
echo -$SLAVE_INTERFACE > /sys/class/net/$BONDING_INTERFACE/bonding/slaves
echo +$SLAVE_INTERFACE > /sys/class/net/$BONDING_INTERFACE/bonding/slaves
#!/bin/bash
cmd="${0##*/}"
usage() {
cat >&2 <<EOI
usage: $cmd [ -h ]
Output column definitions:
cpu # of the cpu
<?php
//SELECT `id`, `pin` FROM `customersview` WHERE `ssn` != '' AND `deleted` = '0' AND `email` != '' ORDER BY `id`
//echo htmlentities($row['_message']);
$mysqli_remote = new mysqli("remote_host", "user", "pass", "db");
$mysqli_local = new mysqli("localhost", "user", "pass", "db");
/* check connection */