Skip to content

Instantly share code, notes, and snippets.

View ilivessevili's full-sized avatar

9lives ilivessevili

  • Beijing China
View GitHub Profile
{% extends "/base.html" %}
{% block html_attr %} ng-app="App"{% endblock %}
{% block title_text %}Rally Task Report{% endblock %}
{% block libs %}
{% if include_libs %}
<style>
{{ include_raw_file("/libs/nv.d3.1.1.15-beta.min.css") }}
#!/bin/sh -eux
############################################################################################################
# this script will check and auto start
# the selected vms in VMware ESXi 6.0
# just put this script to /usr/sbin/ then
# append the following to the root's crontable then restart crond by pkill crond && crond
##min hour day mon dow command
#1 1 * * * /sbin/tmpwatch.py
#1 * * * * /sbin/auto-backup.sh
#!/bin/bash
[ -n "$1" ] || exit 1
UUID=`nova list | grep $1 | awk '{print $2 }'`
PORT=`ps -ef | grep $UUID | grep -iEo port=.{5}`
echo "instance name: $1 => $PORT"
Posted on May 9, 2016 by virtuallylg
Fixing Horizon Re-login issue
There is an issue in OpenStack Kilo with re-login because of a bad cookie session. Here is how to fix the issue.
#vi /etc/openstack-dashboard/local_settings
AUTH_USER_MODEL = 'openstack_auth.User'
==rabbitmq-plugins enable rabbitmq_management==
root@openstack:~# rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management
ovs-dpctl show -s
ovs-ofctl show, dump-ports, dump-flows, add-flow, mod-flows, del-flows
ovsdb-tools show-log -m
ovs-vsctl
show - show the ovsdb
bridge - add-br, list-br, del-br, br-exists.
port - list-ports, add-port, del-port, add-bond, port-to-br.
interface - list-ifaces, iface-to-br
ovs-vsctl list/set/get/add/remove/clear/destroy table record column [value], tables like "bridge", "controller","interface","mirror","netflow","open_vswitch","port","qos","queue","ssl","sflow".
Add a new harddisk
/dev/sdb
Create partition
Sudo fdisk /dev/sdb
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
ip route add default via my-gateway ip route del default
ip route del 0/0
while ip route del default; do :; done
#!/bin/bash
sync
echo 1 > /proc/sys/vm/drop_caches
echo 2 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/drop_caches
##using fallocate
fallocate -l 100G large_file.img
##using xfs
xfs_mkfile 10240m 10Gigfile
## using dd
#kilobytes
dd if=/dev/zero of=filename bs=1 count=0 seek=200K