Custom Search

Thursday, January 28, 2016

Linux Ubuntu Run command in watch mode and append output to a file and print in terminal

Run command in watch mode and append output to a file and print in terminal

$watch "myscript.sh 2>&1 | tee -a mylog.txt"








Wednesday, January 20, 2016

git How to see the changes in a commit


$git diff 230c23ddd5b8ecde960ac9c57c4019da039f4940^!

* add ^! at the end



Thursday, January 14, 2016

Ubuntu Hide current working directory in terminal

1)
$vim ~/.bashrc

export PS1='$ '

2)
$source ~/.bashrc


Tuesday, January 12, 2016

How to Install pdfedit In Ubuntu Linux

1)
Download and Install libqt3-mt

$wget http://us.archive.ubuntu.com/ubuntu/pool/main/q/qt-x11-free/libqt3-mt_3.3.8-b-8ubuntu3_amd64.deb

$sudo dpkg -i libqt3-mt_3.3.8-b-8ubuntu3_amd64.deb

2)
Download and Install pdfedit

$wget http://us.archive.ubuntu.com/ubuntu/pool/universe/p/pdfedit/pdfedit_0.4.5-2_amd64.deb

$sudo dpkg -i pdfedit_0.4.5-2_amd64.deb

Saturday, January 9, 2016

How to Install vagrant-scp plugin and copy file from Vagrant VM to Host Machine

1)
Install vagrant-scp plugin
a)
$vagrant plugin install vagrant-scp

b)
$vagrant scp [local_path] [vm_name]:[remote_path]
$vagrant scp [vm_name]:[remote_path] [local_path]

OR

2)
a)
How to copy file from Host Machine to Vagrant VM
$scp -i /root/puppet-vpc/.vagrant/machines/vpc-ctrl1/virtualbox/private_key -P 2201 myfile.txt vagrant@127.0.0.1:~

b)
How to copy file from Vagrant VM to Host Machine

$scp -i /root/puppet-vpc/.vagrant/machines/vpc-ctrl1/virtualbox/private_key -P 2201 vagrant@127.0.0.1:~/myfile.txt .

Friday, January 8, 2016

neutron net-list filter by tenant

1)
#neutron net-list --tenant_id 8144d33074674d11baadf40e6f92fa15

#curl -g -i -X GET https://network.jiocloud.com:9696/v2.0/networks.json?tenant_id=8144d33074674d11baadf40e6f92fa15 -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}6c2acb7389ddd912936fad33f260b7e24ce9ed70"








Contrail Discovery Publishers (services) and Subscribers (clients) list from multinode setup

 Actual port of discovery server is 9110, here 5998 is proxy port.

1)
Publishers (services) list
http://127.0.0.1:5998/services
http://127.0.0.1:5998/services.json


Publishers:
a) ApiServer (contrail_config)
b) IfmapServer (contrail_config)
c) xmpp_server (contrail_control)
e) Collector (Analytics)
f) OpServer

2)
Subscribers (clients) list
http://127.0.0.1:5998/clients
http://127.0.0.1:5998/clients.json






Subscribers:
a) contrail-control
b) contrail-vrouter-agent
c) ContrailWebUI
d) contrail-api
e) contrail-schema
f) contrail-discovery

Subscriber Publisher Relation:
a) contrail-control  === IfmapServer
b) contrail-vrouter-agent === xmpp_server
c) ContrailWebUI === ApiServer
d) ContrailWebUI === OpServer
e) contrail-api === Collector (Analytics)
f) contrail-schema === Collector (Analytics)
g) contrail-discovery === Collector (Analytics)
h) contrail-vrouter-agent === Collector (Analytics)
i) contrail-control === Collector (Analytics)

* Subscriber "contrail-control " connect to publisher "IfmapServer"
* Subscriber "contrail-vrouter-agent " connect to publisher "xmpp_server"
* Subscriber "ContrailWebUI " connect to publisher "ApiServer"

3)
Config
http://127.0.0.1:5998/config


one contrail_vrouter_agent will connect to two contrail_control that is two xmpp_server

1)
Subscriber or Client List from discovery server.
http://127.0.0.1:5998/clients




In this picture, "vpc-cp1" (contrail-vrouter-agent) is the compute node, which is connected to "xmpp-server" running on contrail_control "vpc-cfg1" and "vpc-ctrl2".

Here "vpc-cp1" (contrail-vrouter-agent) is the Subscriber or Client which is connected to Publisher or Service "xmpp-server".

2)
Subscriber or Client List from discovery server when "contrail-vrouter-agent" down in compute node "vpc_cp1".


In this picture, you can't find entry of "vcp_cp1" (contrail-vrouter-agent).






Tuesday, January 5, 2016

grep exclude files with extension


$grep -l --exclude=*.py --exclude=*.cc --exclude=*.h -r searchstring .

$grep -l --exclude=*.py --exclude=*.cc --exclude=*.h -r searchstring /home/saju