Using Parameter Substitution for Column Names with Python MySQL Connector

The use of data parameter substitution with MySQL Connector is well documented:

To create a new row in a table by passing in multiple data parameters the syntax might be:

cur.execute('INSERT INTO table1 (name, address, phone, postcode) values (%s, %s, %s, %s)', ('John', '1 Front Street', '416-111-1234', 'N4R2E5'))
db.commit()

Where the %s are placeholders for the data values being passed in the following list.

Continue reading Using Parameter Substitution for Column Names with Python MySQL Connector

Viewing Ingress CoS Markings on a Juniper JUNOS MX Series Router

Introduction

When troubleshooting CoS related problems or testing CoS features it is often useful to be able to view the class of service of packets as they enter your router. If packets are not entering your router with the correct markings they will not be assigned to the correct forwarding class and will not receive the desired CoS treatment. Oddly, there does not seem to be a JUNOS command that displays counters of ingress markings. One way around this is to use an inbound firewall filter that matches and counts ingress packets based on their markings.

Continue reading Viewing Ingress CoS Markings on a Juniper JUNOS MX Series Router