Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
/usr/bin/kvm\
-id 5007\
-name cm2\
-chardev socket,id=qmp,path=/var/run/qemu-server/5007.qmp,server,nowait\
-mon chardev=qmp,mode=control\
-chardev socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5\
-mon chardev=qmp-event,mode=control\
-pidfile /var/run/qemu-server/5007.pid\
@thehonker
thehonker / var_log_frr_debug.log
Created May 6, 2019 17:21
Added "debug zebra events", "debug zebra kernel", and "log file /var/log/frr/debug.log" to frr.conf. This is a boot where the set-src directive was not loaded at startup.
2019/05/06 17:19:19 ZEBRA: netlink_parse_info: netlink-listen (NS 0) type RTM_NEWADDR(20), len=76, seq=1557163160, pid=607
2019/05/06 17:19:19 ZEBRA: netlink_interface_addr RTM_NEWADDR lo flags 0x80:
2019/05/06 17:19:19 ZEBRA: IFA_LOCAL 10.66.66.10/32
2019/05/06 17:19:19 ZEBRA: IFA_ADDRESS 10.66.66.10/32
2019/05/06 17:19:19 ZEBRA: IFA_CACHEINFO pref -1, valid -1
2019/05/06 17:19:19 ZEBRA: MESSAGE: ZEBRA_INTERFACE_ADDRESS_ADD 10.66.66.10/32 on lo(0)
2019/05/06 17:19:19 ZEBRA: rib_update : AFI_IP event 0
2019/05/06 17:19:19 ZEBRA: rib_update : AFI_IP6 event 0
2019/05/06 17:19:19 ZEBRA: netlink_parse_info: netlink-listen (NS 0) type RTM_NEWROUTE(24), len=60, seq=0, pid=0
2019/05/06 17:19:19 ZEBRA: RTM_NEWROUTE ipv4 proto kernel NS 0
@thehonker
thehonker / var_log_frr_zebra_debug.log
Created May 6, 2019 17:23
Created by adding "--log file:/var/log/frr/zebra_debug.log --log-level debug" to zebra launch options in /etc/frr/daemons
root@frr7-test:/var/log/frr# cat zebra_debug.log
2019/05/06 17:19:19 ZEBRA: Registration for extended cmd ACK failed : 92 Protocol not available
2019/05/06 17:19:19 ZEBRA: Registration for extended dp ACK failed : 92 Protocol not available
2019/05/06 17:19:19 ZEBRA: Setting netlink socket receive buffer size: 212992 -> 180000000
2019/05/06 17:19:19 ZEBRA: [EC 4043309105] Disabling MPLS support (no kernel support)
2019/05/06 17:19:19 ZEBRA: Initializing internal label manager
2019/05/06 17:19:19 ZEBRA: zebra 7.0 starting: vty@2601
@thehonker
thehonker / ifupdown2_debug_log
Created May 6, 2019 17:25
Created by setting VERBOSE="yes" and DEBUG="yes" in /etc/default/networking
root@frr7-test:/var/log/frr# !journalctl
journalctl -xeu networking.service --no-pager
-- Logs begin at Mon 2019-05-06 17:19:18 UTC, end at Mon 2019-05-06 17:22:53 UTC. --
May 06 17:19:18 frr7-test systemd[1]: Starting ifupdown2 networking initialization...
-- Subject: Unit networking.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit networking.service has begun starting up.
May 06 17:19:18 frr7-test networking[559]: networking: Configuring network interfaces
@thehonker
thehonker / var_log_frr_debug.log
Created May 7, 2019 13:07
Switched to old ifupdown, set src directive is properly set on boot.
root@frr7-test:/var/log/frr# cat debug.log
2019/05/07 13:02:59.983826 ZEBRA: vty[??]@(config)# debug zebra events
2019/05/07 13:02:59.984330 ZEBRA: vty[??]@(config)# debug zebra kernel
2019/05/07 13:02:59.984711 ZEBRA: vty[??]@(config)# debug zebra rib
2019/05/07 13:02:59.985051 ZEBRA: vty[??]@(config)# interface ens18
2019/05/07 13:02:59.985436 ZEBRA: vty[??]@(config-if)# interface lo
@thehonker
thehonker / ifupdown_debug_log
Created May 7, 2019 13:11
Working boot, classic ifupdown "VERBOSE=yes" logging
root@frr7-test:/var/log/frr# !journalctl
journalctl --no-pager -xeu networking.service > networking.service.debuglog
root@frr7-test:/var/log/frr# cat networking.service.debuglog
-- Logs begin at Tue 2019-05-07 13:02:59 UTC, end at Tue 2019-05-07 13:03:23 UTC. --
May 07 13:02:59 frr7-test systemd[1]: Starting Raise network interfaces...
-- Subject: Unit networking.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
@thehonker
thehonker / var_log_frr_debug.log
Created May 7, 2019 13:32
Working boot, ifupdown2, 6.0.2 unit file with frr 7.0
root@frr7-test:/var/log/frr# cat debug.log
2019/05/07 13:30:57.444258 ZEBRA: vty[??]@(config)# debug zebra events
2019/05/07 13:30:57.444773 ZEBRA: vty[??]@(config)# debug zebra kernel
2019/05/07 13:30:57.445151 ZEBRA: vty[??]@(config)# debug zebra rib
2019/05/07 13:30:57.445508 ZEBRA: vty[??]@(config)# interface ens18
2019/05/07 13:30:57.445757 ZEBRA: vty[??]@(config-if)# interface lo
@thehonker
thehonker / ifupdown2_debug_log
Created May 7, 2019 13:34
Working boot, ifupdown2, 6.0.2 unit file with frr 7.0
root@frr7-test:/var/log/frr# journalctl --no-pager -xeu networking.service
-- Logs begin at Tue 2019-05-07 13:30:56 UTC, end at Tue 2019-05-07 13:33:17 UTC. --
May 07 13:30:56 frr7-test systemd[1]: Starting ifupdown2 networking initialization...
-- Subject: Unit networking.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit networking.service has begun starting up.
May 07 13:30:56 frr7-test networking[561]: networking: Configuring network interfaces
May 07 13:30:57 frr7-test networking[561]: debug: args = Namespace(CLASS=None, all=True, debug=True, excludepats=None, force=False, iflist=[], interfacesfile=None, interfacesfileformat='native', noact=False, noaddons=False, nocache=False, perfmode=True, printdependency=None, quiet=False, skipupperifaces=False, syntaxcheck=False, syslog=False, type=None, verbose=True, withdepends=False)
/**
* This sketch is specifically for programming the EEPROM used in the 8-bit
* decimal display decoder described in https://youtu.be/dLh1n2dErzE
*/
#define SHIFT_DATA 16
#define SHIFT_CLK 15 // 15
#define SHIFT_LATCH 14 // 14
#define EEPROM_D0 2
#define EEPROM_D7 9
#define WRITE_EN 10
/**
* This sketch is specifically for programming the EEPROM used in the 8-bit
* decimal display decoder described in https://youtu.be/dLh1n2dErzE
*/
#define SHIFT_DATA 16
#define SHIFT_CLK 15 // 15
#define SHIFT_LATCH 14 // 14
#define EEPROM_D0 2
#define EEPROM_D7 9
#define WRITE_EN 10