ovs-vsctl list open_vswitch
ovs-vsctl list interface
ovs-vsctl --columns=ofport,name list Interface
ovs-vsctl --columns=ofport,name --format=table list Interface
ovs-vsctl --format=table --columns=name,mac_in_use find Interface name=br-dpdk1
ovs-vsctl get interface vhub656c3cb-23 name/ofport
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
# | |
## Count number of pyhsical/virtual drives | |
``` | |
MegaCli64 -PDGetNum -aN | |
MegaCli64 -LDGetNum -aN | |
``` | |
## List all existent physical/virtual drives |
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
udevadm info -q property -n ${DIKS_OR_PARTION_NAME} | |
blkid /dev/${DISK_OR_PARTITION_NAME} |
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
# print local date | |
date | |
# print UTC date | |
date -u | |
# format | |
date "+%m/%d/%Y -%H:%M:%S" | |
# date substraction |
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
# force reinstall existing packages | |
apt install --reinstall -y ${PAKCAGE} |
A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.
Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).
You can deploy a node with the maas cli which is often preferable to clicking a button on a web UI.
$ SYSTEM_ID=node-787b19d8-d25c-11e4-9f9e-00163eca91de
$ NAME="random-nodename"
$ MAASNAME="maaslocal"
$ maas $MAASNAME machine allocate "name=$NAME"
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
# get router gateway external gateway network id | |
ROUTER_ID= | |
openstack router show ${ROUTER_ID} -f value -c gateway_external_info | jq '.network_id' | sed 's/"//g' | |
# router namespace is named in the form of qrouter-<ROUTER-ID> | |
# snat namespace is named with snat-<ROUTER-ID> | |
# fip namespace is named with fip-<EXTERNAL-NETWORK-ID> | |
# dvr layout | |
# edge node |
#!/bin/bash
set -e
source ${ENV_FILE}
# set image name
IMAGE_DEF=
# set url
OlderNewer