<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3727741456680968796</id><updated>2024-09-06T12:37:50.247-07:00</updated><category term="Linux/Unix"/><category term="Windows"/><category term="To be done...."/><category term="Media"/><title type='text'>Knowledge Base</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>95</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-3931785180900016928</id><published>2014-10-30T16:29:00.003-07:00</published><updated>2014-10-30T16:29:32.237-07:00</updated><title type='text'>enable X11 forwarding using Cygwin</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;br /&gt;
http://ora-soa.blogspot.com/2013/08/step-by-step-guide-to-enable-x11.html&lt;br /&gt;
&lt;br /&gt;
&lt;h3 class=&quot;post-title entry-title&quot; itemprop=&quot;name&quot; style=&quot;background-color: #fefdfa; color: #d52a33; font-family: Georgia, Utopia, &#39;Palatino Linotype&#39;, Palatino, serif; font-size: 22px; font-stretch: normal; font-weight: normal; margin: 0px; position: relative;&quot;&gt;
Step by Step guide to enable X11 forwarding using Cygwin&lt;/h3&gt;
&lt;div class=&quot;post-header&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.6; margin: 0px 0px 1em;&quot;&gt;
&lt;div class=&quot;post-header-line-1&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-5176925663607441844&quot; itemprop=&quot;description articleBody&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.2000007629395px; position: relative; width: 506px;&quot;&gt;
&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;
I always found a need of X11 forwarding and so writing this step by step guide for reference:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1:&amp;nbsp;&lt;/b&gt;Install Cygwin/X: I would like to take you through the minimum required packages for Cygwin/X and here are the detailed steps:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Download the cygwin setup file from&amp;nbsp;&lt;a href=&quot;http://cygwin.com/install.html&quot; style=&quot;color: #7d181e; text-decoration: none;&quot;&gt;http://cygwin.com/install.html&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Run the Cygwin setup program and you will see the welcome screen.Click&amp;nbsp;&lt;span class=&quot;guibutton&quot;&gt;Next&lt;/span&gt;&amp;nbsp;to proceed to the next screen.&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Choose,&amp;nbsp;&lt;span class=&quot;guilabel&quot;&gt;Install from Internet&lt;/span&gt;, this will still save the package files to your download directory so that you can install Cygwin on any number of machines. Click&amp;nbsp;&lt;span class=&quot;guibutton&quot;&gt;Next&lt;/span&gt;&amp;nbsp;to proceed to the next screen.&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;The default&amp;nbsp;&lt;span class=&quot;guilabel&quot;&gt;Install Root&lt;/span&gt;&amp;nbsp;is&amp;nbsp;&lt;tt class=&quot;filename&quot;&gt;c:\cygwin&lt;/tt&gt;&amp;nbsp;which should be fine for most installations. Leave&amp;nbsp;&lt;span class=&quot;guilabel&quot;&gt;Default Text File Type&lt;/span&gt;&amp;nbsp;as&amp;nbsp;&lt;acronym class=&quot;acronym&quot;&gt;UNIX&lt;/acronym&gt;. Leave&amp;nbsp;&lt;span class=&quot;guilabel&quot;&gt;Install For&lt;/span&gt;&amp;nbsp;set to&amp;nbsp;&lt;span class=&quot;guilabel&quot;&gt;All&amp;nbsp;&lt;/span&gt;unless you lack local administrative privileges.&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Click&amp;nbsp;&lt;span class=&quot;guibutton&quot;&gt;Next&lt;/span&gt;&amp;nbsp;to proceed to the next screen.&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span class=&quot;guilabel&quot;&gt;Local Package Directory&lt;/span&gt;&amp;nbsp;should default to the directory that you ran&amp;nbsp;&lt;tt class=&quot;filename&quot;&gt;setup.exe&lt;/tt&gt;&amp;nbsp;from.Click&amp;nbsp;&lt;span class=&quot;guibutton&quot;&gt;Next&lt;/span&gt;&amp;nbsp;to proceed to the next screen.&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Choose your proxy setup, or, just choose&amp;nbsp;&lt;span class=&quot;guilabel&quot;&gt;Direct Connection&lt;/span&gt;&amp;nbsp;if no proxy is needed.Click&amp;nbsp;&lt;span class=&quot;guibutton&quot;&gt;Next&lt;/span&gt;&amp;nbsp;to proceed to the next screen.&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Select the first mirror for downloading. Click&amp;nbsp;&lt;span class=&quot;guibutton&quot;&gt;Next&lt;/span&gt;&amp;nbsp;to proceed to the next screen; setup will download a list of available packages as it moves to the next screen.&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;On the next screen you will select the packages that will be downloaded and installed. A listing of the Cygwin/X packages is given below; a listing of the general Cygwin packages would be beyond the scope of this document.&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Cygwin/X packages are located in the&amp;nbsp;&lt;tt class=&quot;literal&quot;&gt;X11&lt;/tt&gt;&amp;nbsp;category:&lt;/li&gt;
&lt;ul style=&quot;line-height: 1.4; list-style: disc; margin: 0.5em 0px; padding: 0px 2.5em;&quot;&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;&lt;tt class=&quot;filename&quot;&gt;xorg-server&lt;/tt&gt;&amp;nbsp;(required, the Cygwin/X X Server)&lt;/li&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;&lt;tt class=&quot;filename&quot;&gt;xinit&lt;/tt&gt;&amp;nbsp;(required, scripts for starting the X server:&amp;nbsp;&lt;b class=&quot;command&quot;&gt;xinit&lt;/b&gt;,&amp;nbsp;&lt;b class=&quot;command&quot;&gt;startx&lt;/b&gt;,&amp;nbsp;&lt;b class=&quot;command&quot;&gt;startwin&lt;/b&gt;&amp;nbsp;(and a shortcut on the Start Menu to run it),&lt;b class=&quot;command&quot;&gt;startxdmcp.bat&lt;/b&gt;&amp;nbsp;)&lt;/li&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;&lt;tt class=&quot;filename&quot;&gt;xorg-docs&lt;/tt&gt;&amp;nbsp;(optional,&amp;nbsp;&lt;b class=&quot;command&quot;&gt;man&lt;/b&gt;&amp;nbsp;pages)&lt;/li&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;You may also select any X client programs you want to use, and any fonts you would like to have available.&lt;/li&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;You may also want to ensure that the&amp;nbsp;&lt;tt class=&quot;literal&quot;&gt;openssh&lt;/tt&gt;&amp;nbsp;package is selected if you wish to use&amp;nbsp;&lt;b class=&quot;command&quot;&gt;ssh&lt;/b&gt;&amp;nbsp;connections to run remote X clients.&lt;/li&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;You may also want to ensure that the&amp;nbsp;&lt;tt class=&quot;literal&quot;&gt;inetutils&lt;/tt&gt;&amp;nbsp;or&amp;nbsp;&lt;tt class=&quot;literal&quot;&gt;rsh&lt;/tt&gt;&amp;nbsp;packages are selected if you wish to use&amp;nbsp;&lt;b class=&quot;command&quot;&gt;telnet&lt;/b&gt;&amp;nbsp;or&amp;nbsp;&lt;b class=&quot;command&quot;&gt;rsh&lt;/b&gt;&amp;nbsp;connections to run remote X clients. (not recommended)&lt;/li&gt;
&lt;/ul&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Click&amp;nbsp;&lt;span class=&quot;guibutton&quot;&gt;Next&lt;/span&gt;&amp;nbsp;to begin the download process, you may want to try another mirror if you see a&amp;nbsp;&lt;span class=&quot;QUOTE&quot;&gt;&quot;Connecting&quot;&lt;/span&gt;&amp;nbsp;message on this screen for a long period of time.&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;You have now successfully installed Cygwin/X.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;b&gt;Step 2:&amp;nbsp;&lt;/b&gt;On your desktop, start the XWin Server from Start &amp;gt; All Programs &amp;gt; Cygwin-X &amp;gt; XWin Server&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 3:&amp;nbsp;&lt;/b&gt;On the XWin Server window, type the following:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;ssh -X -C user@hostname&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;type xclock and it should throw the xclock display&lt;/li&gt;
&lt;/ol&gt;
&lt;b&gt;Step 4:&amp;nbsp;&lt;/b&gt;If you need to sudo to a different user and still make the X11 work, you need to do the following (before running the sudo command):&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;line-height: 1.4; list-style-image: initial; list-style-position: initial; margin: 0.5em 0px; padding: 0px 2.5em;&quot;&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;xauth list&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hostname/unix:13 &amp;nbsp;MIT-MAGIC-COOKIE-1 &amp;nbsp;ada9344e4a990d3b05d3bf66a9948758&lt;/div&gt;
&lt;br /&gt;&lt;div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hostname/unix:10 &amp;nbsp;MIT-MAGIC-COOKIE-1 &amp;nbsp;11b30b1d65d90e64d15d811a97b9fb20&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hostname/unix:&lt;b&gt;11&lt;/b&gt;&amp;nbsp;&amp;nbsp;MIT-MAGIC-COOKIE-1 &amp;nbsp;ddaa0d9fc7da0ee5228aa459ccdf427c&lt;/div&gt;
&lt;ul style=&quot;line-height: 1.4; list-style-image: initial; list-style-position: initial; margin: 0.5em 0px; padding: 0px 2.5em;&quot;&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;sudo su - &amp;lt;&lt;appuser&gt;&amp;gt;&lt;/appuser&gt;&lt;/li&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;echo $DISPLAY&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; localhost:&lt;b&gt;11&lt;/b&gt;.0&lt;/div&gt;
&lt;ul style=&quot;line-height: 1.4; list-style-image: initial; list-style-position: initial; margin: 0.5em 0px; padding: 0px 2.5em;&quot;&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;xauth add&amp;nbsp;&amp;nbsp;hostname/unix:&lt;b&gt;11&lt;/b&gt;&amp;nbsp;&amp;nbsp;MIT-MAGIC-COOKIE-1 &amp;nbsp;ddaa0d9fc7da0ee5228aa459ccdf427c&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11 in the $DISPLAY matches the 11 in the list of the xauth.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;Now you should be able to throw the display from the remote machine to your local machine&lt;/span&gt;&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/3931785180900016928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2014/10/enable-x11-forwarding-using-cygwin.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3931785180900016928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3931785180900016928'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2014/10/enable-x11-forwarding-using-cygwin.html' title='enable X11 forwarding using Cygwin'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-6810477295707340078</id><published>2013-12-05T11:41:00.000-08:00</published><updated>2013-12-20T11:26:09.558-08:00</updated><title type='text'>Eclipse</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;b&gt;Uninstall completely from MAC:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- Delete the eclipse folder and also following files:&lt;br /&gt;
rm -rf ~/Library/Saved\ Application\ State/org.eclipse.eclipse.savedState&lt;br /&gt;
rm -rf ~/Library/Preferences/org.eclipse.eclipse.plist&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Set spaces for tabs&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;- For the Java editor:&lt;br /&gt;
Eclipse-&amp;gt;Preferences-&amp;gt;Java-&amp;gt;Code Style-&amp;gt;Formatter-&amp;gt;Edit-&amp;gt;Indentation = &quot;Spaces Only&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;- for the default text editor:&lt;br /&gt;
Eclipse-&amp;gt;Preferences-&amp;gt;General-&amp;gt;Editors-&amp;gt;Text Editors-&amp;gt;Insert spaces for tabs&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Set Java Compiler Version&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;- Preferences &amp;gt; Java &amp;gt; Compiler &amp;gt; JDK Compiler&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/6810477295707340078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/eclipse.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/6810477295707340078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/6810477295707340078'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/eclipse.html' title='Eclipse'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-1764124997529552158</id><published>2013-12-04T14:52:00.000-08:00</published><updated>2013-12-04T14:52:48.110-08:00</updated><title type='text'>Setup Selenium python webdriver</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Setup PIP&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- on mac:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # sudo easy_install pip&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; password: &lt;user_password&gt;&lt;/user_password&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- on windows&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - use the python script available below as easy_install&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;http://python-distribute.org/distribute_setup.py&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - install as&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;easy_install pip&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Install Selenium&amp;nbsp;web driver&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- Make sure you are root user&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;su -&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;password: &lt;root_password&gt;&lt;/root_password&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- NOTE: To enable root user on MAC do following&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Apple &amp;gt; System Preferences &amp;gt; Users &amp;amp; Groups &amp;gt; Login Options…&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; &quot;Edit…&quot; or &quot;Join…&quot; &amp;gt; &quot;Open Directory Utility…&quot; &amp;gt; Unlock&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; Edit Menu &amp;gt; Enable root user...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- using pip install selenium&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;pip install -U selenium&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;root# pip install -U selenium&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Downloading/unpacking selenium&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; Downloading selenium-2.33.0.tar.gz (2.5MB): 2.5MB downloaded&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; Running &lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;setup.py&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt; egg_info for package selenium&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Installing collected packages: selenium&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; Running &lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;setup.py&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt; install for selenium&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Successfully installed selenium&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Cleaning up...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Selenium Standalone server&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- download from&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;https://code.google.com/p/selenium/downloads/list&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;selenium-server-standalone-2.33.0.jar&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Start standalone server:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;cd /Users/vmittal/hwx/Users&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;java -jar selenium-server-standalone-2.33.0.jar&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Ex. Python script&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;from selenium import webdriver&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;from selenium.common.exceptions import NoSuchElementException&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;from selenium.webdriver.common.keys import Keys&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;import time&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;browser = webdriver.Firefox() # Get local session of firefox&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;browser.get(&quot;&lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;http://www.yahoo.com&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&quot;) # Load page&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;assert &quot;Yahoo!&quot; in browser.title&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;elem = browser.find_element_by_name(&quot;p&quot;) # Find the query box&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;elem.send_keys(&quot;seleniumhq&quot; + Keys.RETURN)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;time.sleep(0.2) # Let the page load, will be added to the API&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;try:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; browser.find_element_by_xpath(&quot;//a[contains(@href,&#39;&lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;http://seleniumhq.org&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&#39;)]&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;except NoSuchElementException:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; assert 0, &quot;can&#39;t find seleniumhq&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;browser.close()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Run Python script&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;python script_name.py&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/1764124997529552158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/setup-selenium-python-webdriver.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/1764124997529552158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/1764124997529552158'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/setup-selenium-python-webdriver.html' title='Setup Selenium python webdriver'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-7017564777956574912</id><published>2013-12-04T14:50:00.000-08:00</published><updated>2013-12-04T14:50:35.940-08:00</updated><title type='text'>Selenium Grid</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Selenium Grid Components:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;- &amp;nbsp;Selenium hub :&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;the hub is the Selenium server which handles communication to all the webdrivers. Each of the webdrivers registers itself with the hub so the hub knows which browser configurations are available for testing.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;- &amp;nbsp;Start Hub&lt;br /&gt;
java -jar selenium-server-standalone-2.33.0.jar -role hub -port 4445&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;- &amp;nbsp;Stop Hub&lt;br /&gt;
ps ax | grep -e &quot;selenium.*\s\-role\shub&quot; | grep -v grep | awk &#39;{print $1}&#39;| xargs kill -9&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp; - &amp;nbsp;Selenium Node (Webdriver):&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;a webdriver instance of Selenium that runs the tests for a particular browser configuration. For example, you can run tests for Firefox or for a particular version of Internet Explorer.&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; - &amp;nbsp;Start Node&lt;br /&gt;
java -jar selenium-server-standalone-2.37.0.jar -role webdriver -port 4446 -hubHost &lt;hub_ip&gt; -hubPort 4445-browser browserName=&#39;firefox&#39;,version=ANY,platform=MAC,maxInstances=2 -browser browserName=&#39;chrome&#39;,version=ANY,platform=MAC,maxInstances=2 -Dwebdriver.chrome.driver=/Users/vmittal/tools/chromedriver -browser browserName=&#39;safari&#39;,version=ANY,platform=MAC,maxInstances=2 &amp;nbsp;&amp;gt; sel_node.out &amp;amp;&lt;/hub_ip&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; - &amp;nbsp;Stop Node&lt;br /&gt;
ps ax | grep -e &quot;selenium.*\s\-role\swebdriver&quot; | grep -v grep | awk &#39;{print $1}&#39;| xargs kill -9&lt;br /&gt;
&lt;br /&gt;
Selenium URLs:&lt;br /&gt;
&amp;nbsp;- https://code.google.com/p/selenium/&lt;br /&gt;
&amp;nbsp;-&amp;nbsp;https://code.google.com/p/selenium/downloads/list&lt;br /&gt;
&amp;nbsp;- Chromedriver download&lt;br /&gt;
http://chromedriver.storage.googleapis.com/index.html&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;______________________________________&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/7017564777956574912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/selenium-grid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/7017564777956574912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/7017564777956574912'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/selenium-grid.html' title='Selenium Grid'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-965865893633297734</id><published>2013-12-03T15:33:00.003-08:00</published><updated>2014-01-21T11:18:51.557-08:00</updated><title type='text'>Installers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;b&gt;CentOS&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; - &amp;nbsp;yum&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
# yum -y install postgresql.x86_64&lt;br /&gt;
# yum remove &amp;nbsp;postgresql.x86_64&lt;br /&gt;
# yum update postgresql.x86_64&lt;br /&gt;
# yum search firefox&lt;br /&gt;
# yum info samba-common.i686&lt;br /&gt;
# yum list | less&lt;br /&gt;
&lt;br /&gt;
List installed packages&lt;br /&gt;
# yum list installed | less&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Which package does a file belong to?&lt;br /&gt;
# yum provides /etc/sysconfig/nfs&lt;br /&gt;
&lt;br /&gt;
List available software groups using yum grouplist&lt;br /&gt;
# yum grouplist&lt;br /&gt;
&lt;div&gt;
Install a specific software group using yum groupinstall&lt;/div&gt;
&lt;div&gt;
# yum groupinstall &#39;DNS Name Server&#39;&lt;/div&gt;
&lt;div&gt;
Upgrade an existing software group using groupupdate&lt;/div&gt;
&lt;div&gt;
# yum groupupdate &#39;Graphical Internet&#39;&lt;/div&gt;
&lt;div&gt;
Uninstall a software group using yum groupremove&lt;/div&gt;
&lt;div&gt;
# yum groupremove &#39;DNS Name Server&#39;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Display your current yum repositories&lt;/div&gt;
&lt;div&gt;
# yum repolist&lt;/div&gt;
&lt;div&gt;
# yum repolist all&lt;/div&gt;
&lt;div&gt;
______________________________________&lt;/div&gt;
&lt;b&gt;SUSE&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;- zypper&lt;/b&gt;&lt;br /&gt;
zypper -n --no-gpg-checks install packages&lt;br /&gt;
zypper --non-interactive remove --force-resolution packages&lt;br /&gt;
zypper clean --all&lt;br /&gt;
______________________________________&lt;br /&gt;
&lt;b&gt;Debian / Ubuntu&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;- apt-get&lt;/b&gt;&lt;br /&gt;
sudo apt-get install nmap&lt;br /&gt;
sudo apt-get --allow-unauthenticated -q -y install package&lt;br /&gt;
&lt;br /&gt;
sudo apt-get remove nmap&lt;br /&gt;
sudo apt-get --purge -q -y remove&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
sudo apt-get clean&lt;br /&gt;
&lt;br /&gt;
apt-get help&lt;br /&gt;
______________________________________&lt;br /&gt;
&lt;b&gt;MAC&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
______________________________________
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/965865893633297734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/installers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/965865893633297734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/965865893633297734'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/installers.html' title='Installers'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-3980077821566594974</id><published>2013-12-03T15:05:00.003-08:00</published><updated>2013-12-03T15:05:51.755-08:00</updated><title type='text'>Tools</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Version Control&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;SVN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Git&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Github (website)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Microsoft Visual SourceSafe&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Build Tools&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Jenkins&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Electric Commander&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Python&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;PIP : Tool to install/uninstall and manage python package&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;unittest: Python framework for unit test automation&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Pytest&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Command line file download&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;curl&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;wget&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Virtual Machine Clouds&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Eucalyptus (EC2)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Cloud Stack&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;Open Stack&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;OpenStack v. CloudStack v. Eucalyptus&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;OpenStack has the buzz, CloudStack has the bucks, Eucalyptus has the bonds with Amazon&lt;/span&gt;&lt;br /&gt;
______________________________________&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/3980077821566594974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/tools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3980077821566594974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3980077821566594974'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/tools.html' title='Tools'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-2150590630066261073</id><published>2013-12-03T14:23:00.005-08:00</published><updated>2013-12-03T14:23:55.685-08:00</updated><title type='text'>SQLite</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;# sqlite3 file_name.db&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;SQLite version 3.6.20&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Enter &quot;.help&quot; for instructions&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Enter SQL statements terminated with a &quot;;&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt; .help&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt; .databases&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt; .schema&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt; .tables&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt; select * from pig_pigscript&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;﻿&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt; .quit&lt;/span&gt;&lt;br /&gt;______________________________________&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;View the create statements of table&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt; .schema&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt; .schema auth_group&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;CREATE TABLE &quot;auth_group&quot; (&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;id&quot; integer NOT NULL PRIMARY KEY,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;name&quot; varchar(80) NOT NULL UNIQUE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;______________________________________&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Export sqlite DB to CSV file (temp_hue_db)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt; .mode csv&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt; .header on&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt; .output temp_hue_db&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt; select * from table1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;sqlite&amp;gt; select * from table2;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;.........&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/2150590630066261073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/sqlite.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/2150590630066261073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/2150590630066261073'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/sqlite.html' title='SQLite'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-6831882561528106285</id><published>2013-12-03T14:20:00.004-08:00</published><updated>2013-12-03T14:20:45.539-08:00</updated><title type='text'>Root user on mac</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;To enable root user on MAC do following&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Apple &amp;gt; System Preferences &amp;gt; Users &amp;amp; Groups &amp;gt; Login Options…&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; &quot;Edit…&quot; or &quot;Join…&quot; &amp;gt; &quot;Open Directory Utility…&quot; &amp;gt; Unlock&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; Edit Menu &amp;gt; Enable root user...&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/6831882561528106285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/root-user-on-mac.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/6831882561528106285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/6831882561528106285'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/root-user-on-mac.html' title='Root user on mac'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-3431897282072512478</id><published>2013-12-03T14:18:00.001-08:00</published><updated>2013-12-03T14:18:19.007-08:00</updated><title type='text'>Vagrant cheat sheet</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;USAGE&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Usage: vagrant [-v] [-h] command [&lt;args&gt;]&lt;/args&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -v, --version &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Print the version and exit.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -h, --help&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Print this help.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Available subcommands:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; box&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; destroy &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# remove all traces and kills the current state of the machine. Starts a new one next time from base box.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; halt &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Gracefully shut down the guest OS. this preserve the content of disk, and allows it to be cleanly started again.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; help&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;init &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# setup a new working directory, creates a Vagrantfile in there&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; package&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugin&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; provision &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# runs any configured provisioners against the running Vagrant managed machine. Used to test provisions&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reload&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; resume &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # resume the vagrant machine after it was suspended&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ssh&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ssh-config&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; suspend &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# saves the current state of the machine and stop it. Next time it starts from here&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; up&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;For help on any individual command run `vagrant COMMAND -h`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Uninstalling Vagrant&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- On Windows, uninstall using the add/remove programs section of the control panel.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- On Mac OS X, remove the /Applications/Vagrant directory and the /usr/bin/vagrant file.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- On Linux, remove the /opt/vagrant directory and the /usr/bin/vagrant file.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-&amp;nbsp;On every platform, remove the ~/.vagrant.d directory to delete the user data.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Commands:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-----------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant box add NAME URL&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$&amp;nbsp;vagrant box list&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$&amp;nbsp;vagrant box remove NAME PROVIDER&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$&amp;nbsp;vagrant box repackage NAME PROVIDER&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant box add precise32&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;http://files.vagrantup.com/precise32.box&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-----------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant up&amp;nbsp;--provider=virtualbox&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant up&amp;nbsp;--provider=vmware_fusion&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant up&amp;nbsp;--provider=vmware_workstation&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant up&amp;nbsp;--provider=aws&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-----------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant destroy&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant destroy -f&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant destroy --force&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-f or --force is for : Don&#39;t ask for confirmation before destroying.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-----------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant halt&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant halt -f&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant halt --force&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-f or --force is for : Don&#39;t attempt to gracefully shut down the machine. Pull out the power cord.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-----------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$&amp;nbsp;vagrant init [box-name] [box-url]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;If a first argument is given, it will prepopulate the config.vm.box setting in the created Vagrantfile.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;If a second argument is given, it will prepopulate the config.vm.box_url setting in the created Vagrantfile.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-----------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant package&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--base NAME - Instead of packaging a VirtualBox machine that Vagrant manages, this will package a VirtualBox machine that VirtualBox manages. NAME should be the name or UUID of the machine from the VirtualBox GUI.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--output NAME - The resulting package will be saved as NAME. By default, it will be saved as package.box.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--include x,y,z - Additional files will be packaged with the box. These can be used by a packaged Vagrantfile (documented below) to perform additional tasks.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--vagrantfile FILE - Packages a Vagrantfile with the box, that is loaded as part of the Vagrantfile load order when the resulting box is used.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-----------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$&amp;nbsp;vagrant plugin&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$&amp;nbsp;vagrant plugin install &lt;name&gt;&lt;/name&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$&amp;nbsp;vagrant plugin license &lt;name&gt; &lt;license-file&gt;&lt;/license-file&gt;&lt;/name&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$&amp;nbsp;vagrant plugin list&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$&amp;nbsp;vagrant plugin uninstall &lt;name&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/name&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-----------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant provision --provision-with x,y,z&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;This will only run the given provisioners. For example, if you have a :shell and :chef_solo provisioner and run vagrant provision --provision-with shell, only the shell provisioner will be run.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-----------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$&amp;nbsp;vagrant reload&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--no-provision - The provisioners will not run.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--provision-with x,y,z - This will only run the given provisioners. For example, if you have a :shell and :chef_solo provisioner and run vagrant provision --provision-with shell, only the shell provisioner will be run.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-----------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant ssh&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-c COMMAND or --command COMMAND - This executes a single SSH command, prints out the stdout and stderr, and exits.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-p or --plain - This does an SSH without authentication, leaving authentication up to the user.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-----------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant ssh-config&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;This will output valid configuration for an SSH config file to SSH into the running Vagrant machine from ssh directly (instead of using vagrant ssh).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--host NAME - Name of the host for the outputted configuration.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-----------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;VagrantFile Configs&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Vagrant.configure(&quot;2&quot;) do |config|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; config.vm.box = &quot;precise32&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;i&gt;Path:&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;if vagrant is run in /home/mitchellh/projects/foo, it will search the following paths in order for a Vagrantfile, until it finds one:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;/home/mitchellh/projects/foo/Vagrantfile&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;/home/mitchellh/projects/Vagrantfile&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;/home/mitchellh/Vagrantfile&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;/home/Vagrantfile&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;/Vagrantfile&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;VAGRANT_CWD&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;environment variable to set the starting directory where Vagrant looks for a Vagrantfile&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;i&gt;Load order of Vagrantfile &lt;/i&gt;&lt;/b&gt;&lt;i&gt;(newest overrides the older ones)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;1. Built-in default Vagrantfile that ships with Vagrant. This has default settings&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;2. Vagrantfile packaged with the box that is to be used for a given machine.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;3. Vagrantfile in your Vagrant home directory (defaults to ~/.vagrant.d). This lets you specify some defaults for your system user&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;4. Vagrantfile from the project directory. This is the Vagrantfile that you&#39;ll be modifying most of the time.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;i&gt;Machine Settings&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.vm.box - This configures what box the machine will be brought up against. The value here should match one of the installed boxes on the system.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.vm.box_url - The URL that the configured box can be found at. If the box is not installed on the system, it will be retrieved from this URL when vagrant up is run.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.vm.graceful_halt_retry_count - The number of times to retry gracefully shutting down the system when vagrant halt is called. Defaults to 3.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.vm.graceful_halt_retry_interval - The amount of time in between each retry of attempting to shut down, in seconds. Defaults to 1 second.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.vm.guest - The guest OS that will be running within this machine. This defaults to :linux, and Vagrant will auto-detect the proper distro. Vagrant needs to know this information to perform some guest OS-specific things such as mounting folders and configuring networks.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.vm.hostname - The hostname the machine should have. Defaults to nil. If nil, Vagrant won&#39;t manage the hostname. If set to a string, the hostname will be set on boot.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.vm.network - Configures networks on the machine.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.vm.provider - Configures provider-specific configuration, which is used to modify settings which are specific to a certain provider. If the provider you&#39;re configuring doesn&#39;t exist or is not setup on the system of the person who runs vagrant up, Vagrant will ignore this configuration block. This allows a Vagrantfile that is configured for many providers to be shared among a group of people who may not have all the same providers installed.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.vm.provision - Configures provisioners on the machine, so that software can be automatically installed and configured when the machine is created.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.vm.synced_folder - Configures synced folders on the machine, so that folders on your host machine can be synced to and from the guest machine.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.vm.usable_port_range - A range of ports Vagrant can use for handling port collisions and such. Defaults to 2200..2250.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;SSH Settings&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.default.host - This sets the default host that Vagrant will use for SSH. This is not set by default because the providers usually detect the proper host. Provider-detected hosts will override this. To force a certain host, use config.ssh.host.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.default.port - This sets the default port that Vagrant will use to connect to the machine via SSH. This is not set by default because the providers usually detect the proper port. Provider-detected ports will override this. To force a certain port, use config.ssh.port.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.default.private_key_path - This sets the default private key to use for authenticating with SSH. By default this is set to the insecure private key that ships with Vagrant, since that is what most public boxes use. A provider-detected private key will override this setting. To force a certain private key, use config.ssh.private_key_path. The private key format should be an OpenSSH private key format (as opposed to PuTTY keys and such).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.default.username - This sets the default username that Vagrant will SSH as, if no other username can be detected. This is set to &quot;vagrant&quot; by default, since that is what most public boxes use. Alternate providers may detect alternate usernames though, in which case this will be overriden. To force a certain username, use config.ssh.username.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.host - The same as config.ssh.default.host, except this will override any detected host and will always be used.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.port - The same as config.ssh.default.port, except this will override any detected port and will always be used.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.private_key_path - The same as config.ssh.default.private_key_path, except this will override any detected private key and will always be used.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.username - The same as config.ssh.default.username, except this will override any detected username and will always be used.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.guest_port - The port on the guest that SSH is running on. This is used by some providers to detect forwarded ports for SSH. For example, if this is set to 22 (the default), and Vagrant detects a forwarded port to port 22 on the guest from port 4567 on the host, Vagrant will attempt to use port 4567 to talk to the guest if there is no other option.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.keep_alive - If true, a &quot;keep-alive&quot; packet will be sent every 5 seconds on the SSH connection. This avoids the connection closing on long-running tasks. This defaults to true.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.max_tries - Maximum attempts to SSH while waiting for the machine to boot. Default is 100.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.timeout - Maximum time to wait while attempting to make a single connection via SSH before timing out. Default is 30 seconds.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.forward_agent - If true, agent forwarding over SSH connections is enabled. Defaults to false.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.forward_x11 - If true, X11 forwarding over SSH connections is enabled. Defaults to false.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- config.ssh.shell - The shell to use when executing SSH commands from Vagrant. By default this is bash -l. Note that this has no effect on the shell you get when you run vagrant ssh. This configuration option only affects the shell to use when executing commands internally in Vagrant.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Vagrant Settings&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;config.vagrant.host - This sets the type of host machine that is running Vagrant. By default this is :detect, which causes Vagrant to auto-detect the host. Vagrant needs to know this information in order to perform some host-specific things, such as preparing NFS folders if they&#39;re enabled. You should only manually set this if auto-detection fails.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;i&gt;Provider Settings&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;-&amp;nbsp;Multiple config.vm.provider blocks can exist to configure multiple providers.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Vagrant.configure(&quot;2&quot;) do |config|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; # ... (other config)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; config.vm.provider :virtualbox do |vb|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vb.customize [&quot;modifyvm&quot;, :id, &quot;--cpuexecutioncap&quot;, &quot;50&quot;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;VirtualBox configuration&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Enable GUI&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;config.vm.provider &quot;virtualbox&quot; do |v|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; v.gui = true&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Virtual Machine Name&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;config.vm.provider &quot;virtualbox&quot; do |v|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;v.name&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt; = &quot;my_vm&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Customization&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;The following settings are in compliance with VBOXMANAGE (&lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;http://www.virtualbox.org/manual/ch08.html&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;config.vm.provider &quot;virtualbox&quot; do |v|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; v.customize [&quot;modifyvm&quot;, :id, &quot;--cpuexecutioncap&quot;, &quot;50&quot;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;VMWare Fusion/workstation configuration&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Installation&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant plugin install vagrant-vmware-fusion&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant plugin license vagrant-vmware-fusion license.lic&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Custom VMware install location (VAGRANT_VMWARE_FUSION_APP environment variable)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ export VAGRANT_VMWARE_FUSION_APP=&quot;/Apps/VMware Fusion.app&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$ vagrant up --provider=vmware_fusion&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Enable GUI&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;config.vm.provider &quot;vmware_fusion&quot; do |v|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; v.gui = true&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;VMX customization&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;config.vm.provider &quot;vmware_fusion&quot; do |v|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; v.vmx[&quot;custom-key&quot;]&amp;nbsp; = &quot;value&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; v.vmx[&quot;another-key&quot;] = nil&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Synced Folders&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- By default Vagrant shares the project directory (the one with VagrantFile) to the /vagrant directory on guest machine.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- Any file created in /vagrant on the guest machine is automatically copied to the project directory&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;i&gt;Configuring&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Vagrant.configure(&quot;2&quot;) do |config|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; # other config here&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; config.vm.synced_folder &quot;src/&quot;, &quot;/srv/website&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;i&gt;Disabling&lt;/i&gt;&lt;/b&gt; synced folders&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Vagrant.configure(&quot;2&quot;) do |config|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; config.vm.synced_folder &quot;src/&quot;, &quot;/srv/website&quot;, disabled: true&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;i&gt;NFS Sharing&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- must have nfsd installed on the host machine&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- during vagrant up sequence user may be prompted for administrative privileges to host machine (via sudo program)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Vagrant.configure(&quot;2&quot;) do |config|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; # ...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; config.vm.synced_folder &quot;.&quot;, &quot;/vagrant&quot;, :nfs =&amp;gt; true&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Automated Provisioning&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- run a by default shell script bootstrap.sh&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;i&gt;External Scripts&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Vagrant.configure(&quot;2&quot;) do |config|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; config.vm.box = &quot;precise32&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; config.vm.provision :shell, :path =&amp;gt; &quot;&lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;bootstrap.sh&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;i&gt;Inline Scripts&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;Vagrant.configure(&quot;2&quot;) do |config|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; config.vm.provision :shell,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; :inline =&amp;gt; &quot;echo Hello, World&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;--------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;$script = &amp;lt;&lt;script span=&quot;&quot;&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;echo I am provisioning...&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;date &gt; /etc/vagrant_provisioned_at&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;SCRIPT&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;Vagrant.configure(&quot;2&quot;) do |config|&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp; config.vm.provision :shell, :inline =&gt; $script&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;end&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;--------------&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;b&gt;Networking&lt;/b&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;b&gt;&lt;i&gt;Port Forwarding&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;- allows you to access a port on your own machine, but actually have all the network traffic forwarded to a specific port on the guest machine.&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;--------------&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;Vagrant.configure(&quot;2&quot;) do |config|&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp; config.vm.box = &quot;precise32&quot;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp; config.vm.network :forwarded_port, host: 4567, guest: 80&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;end&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;--------------&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;b&gt;&lt;i&gt;Port Collisions and corrections&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;When multiple boxes are started with similar port forwarding, collision is detected and action is taken to prevent it. The output is shown on the console&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;--------------&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;Vagrant.configure(&quot;2&quot;) do |config|&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp; config.vm.network :forwarded_port, guest: 80, host: 8080,&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; auto_correct: true&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;end&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;--------------&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;b&gt;&lt;i&gt;Private Network or Static IP&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;This is not accessible outside our host machine.&amp;nbsp;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;--------------&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;Vagrant.configure(&quot;2&quot;) do |config|&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp; config.vm.network :private_network, ip: &quot;192.168.50.4&quot;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;end&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;--------------&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;b&gt;&lt;i&gt;Public Network of DHCP&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;This is accessible outside the host machine too.&amp;nbsp;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;--------------&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;Vagrant.configure(&quot;2&quot;) do |config|&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp; config.vm.network :public_network&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;end&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;--------------&lt;/span&gt;&lt;br&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;b&gt;&lt;i&gt;Multi-Machine&lt;/i&gt;&lt;/b&gt; (per Vagrantfile)&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;--------------&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;Vagrant.configure(&quot;2&quot;) do |config|&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp; config.vm.provision :shell, :inline =&gt; &quot;echo Hello&quot;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp; config.vm.define :web do |web|&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; web.vm.box = &quot;apache&quot;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp; end&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp; config.vm.define :db do |db|&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; db.vm.box = &quot;mysql&quot;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&amp;nbsp; end&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;end&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;--------------&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;- Bring up all the 10 slave machines configured as slave0, slave1, ...etc. using regex&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;vagrant up /slave[0-9]/&amp;nbsp;&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;font-size: 13px; font-family: Arial;&quot;&gt;&lt;/span&gt;&amp;nbsp;______________________________________&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/3431897282072512478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/vagrant-cheat-sheet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3431897282072512478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3431897282072512478'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/vagrant-cheat-sheet.html' title='Vagrant cheat sheet'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-2947592296340626198</id><published>2013-12-03T14:17:00.003-08:00</published><updated>2013-12-18T18:29:12.061-08:00</updated><title type='text'>GIT Commands</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Setup a new github account&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;git config --global &lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;user.name&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt; &quot;user&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;git config --global user.email &quot;email&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Password less setup&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- Make sure the following program is there in you computer&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;git credential-osxkeychain&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- get the password key chain&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;git config --global credential.helper osxkeychain&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;First time grabbing the source (Clone)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- Get the master&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;git clone &lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;https://github.com/hortonworks/sandbox-qe&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt; ./sandbox-qe/master&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- Get the branch&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;git clone -b Caterpillar &lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;https://github.com/hortonworks/sandbox-qe&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt; ./caterpillar&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Update local repo from server&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;git pull&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Add a file to repo&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;git add file1 file2 file3&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;git commit -m &quot;commit message with the checkin&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;git push&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Checkin Modifications&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;git commit file1 file2 file3 -m &quot;my message&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;git push&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Discard local changes in a file&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;git checkout file1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Remove a file from the repo&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;git rm file1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;git commit -m &quot;My message&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;git push&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/2947592296340626198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/git-commands.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/2947592296340626198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/2947592296340626198'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/git-commands.html' title='GIT Commands'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-852450357545394363</id><published>2013-12-03T14:14:00.002-08:00</published><updated>2014-01-02T14:26:23.152-08:00</updated><title type='text'>wget/curl (command line web download)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;b&gt;- WGET&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;wget &lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;http://pypi.python.org/packages/source/p/pip/pip-0.7.2.tar.gz&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;- CURL&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;curl [options...] &lt;url&gt;&amp;nbsp;&lt;/url&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;curl &lt;url&gt; -o my_file &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# downloads with the my_file as local file name&lt;/url&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;curl &lt;url&gt; -O &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Use remote file name as local file name too&lt;/url&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;curl &lt;uri&gt; -Os#&lt;/uri&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;-O, --remote-name&amp;nbsp;&amp;nbsp; Write output to a file named as the remote file&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;--remote-name-all Use the remote file name for all URLs&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;-#, --progress-bar&amp;nbsp; Display transfer progress as a progress bar&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --proto PROTOCOLS&amp;nbsp; Enable/disable specified protocols&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;--proto-redir PROTOCOLS&amp;nbsp; Enable/disable specified protocols on redirect&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;-o, --output FILE&amp;nbsp;&amp;nbsp; Write output to &lt;file&gt; instead of stdout&lt;/file&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;-S, --show-error&amp;nbsp;&amp;nbsp;&amp;nbsp; Show error. With -s, make curl show errors when they occur&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;-s, --silent&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Silent mode. Don&#39;t output anything&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;-v, --verbose&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Make the operation more talkative&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;-V, --version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Show version number and quit&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;-w, --write-out FORMAT&amp;nbsp; What to output after completion&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;--xattr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Store metadata in extended file attributes&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; Follow the moved link&lt;br /&gt;
if the page is moved (HTTP 301, MOVED) to another location this will follow the new location and get the URL content from there&lt;br /&gt;
curl -l http://google.com:80&lt;br /&gt;
curl —location google.com&lt;br /&gt;
&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; download with same name (same as wget)&lt;br /&gt;
curl -O google.com/index.html&lt;br /&gt;
&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; Give custom name&lt;br /&gt;
curl -o my_google.html google.com/index.html&lt;br /&gt;
&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; Get request&lt;br /&gt;
curl “www.google.com/search?q=foo”&lt;br /&gt;
curl “www.google.com/search?q=foo&amp;amp;q1=bar&quot;&lt;br /&gt;
&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; POST request (-d is for data)&lt;br /&gt;
curl http://mywebsite.com/cgi-bin/myscript.pl -d formelementname=value&lt;br /&gt;
curl http://mywebsite.com/cgi-bin/myscript.pl -d formelementname=value &amp;nbsp;-d formelementname2=value2&lt;br /&gt;
&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; POST request with additional header&lt;br /&gt;
curl http://mywebsite.com/cgi-bin/myscript.pl -d “foo=bar” -d “bar=baz” -H “hname: hvalue&quot;&lt;br /&gt;
&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; POST request with an existing header removed&lt;br /&gt;
curl http://www.google.com/search?q=vishal -d &quot;foo=bar&quot; -v -H &quot;Content-Length:&quot;&lt;br /&gt;
&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; File attachment (can not be mixed with -d)&lt;br /&gt;
curl http://mywebsite.com/cgi-bin/myscript.pl -F picformvarname=/myhome/myfile.jpg&lt;br /&gt;
&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; Get header only (use -I)&lt;br /&gt;
curl http://mywebsite.com/mydir -I&lt;br /&gt;
Returns: Response code, Date, server details and content type&lt;br /&gt;
&lt;br /&gt;
-i shows both the headers and the body of the reply&lt;br /&gt;
&lt;br /&gt;
-v, --verbose shows more information, including info about the request that was sent&lt;br /&gt;
Request:&lt;br /&gt;
------------------------------------------------&lt;br /&gt;
HW10397:hwx vmittal$ curl http://www.google.com/search?q=vishal -v&lt;br /&gt;
* Adding handle: conn: 0x7f9bd8804000&lt;br /&gt;
* Adding handle: send: 0&lt;br /&gt;
* Adding handle: recv: 0&lt;br /&gt;
* Curl_addHandleToPipeline: length: 1&lt;br /&gt;
* - Conn 0 (0x7f9bd8804000) send_pipe: 1, recv_pipe: 0&lt;br /&gt;
* About to connect() to www.google.com port 80 (#0)&lt;br /&gt;
* &amp;nbsp; Trying 74.125.239.49...&lt;br /&gt;
* Connected to www.google.com (74.125.239.49) port 80 (#0)&lt;br /&gt;
&amp;gt; GET /search?q=vishal HTTP/1.1&lt;br /&gt;
&amp;gt; User-Agent: curl/7.30.0&lt;br /&gt;
&amp;gt; Host: www.google.com&lt;br /&gt;
&amp;gt; Accept: */*&lt;br /&gt;
&amp;gt;&lt;br /&gt;
Response:&lt;br /&gt;
------------------------------------------------&lt;br /&gt;
&amp;lt; HTTP/1.1 403 Forbidden&lt;br /&gt;
&amp;lt; Content-Type: text/html; charset=UTF-8&lt;br /&gt;
&amp;lt; Date: Tue, 31 Dec 2013 09:00:20 GMT&lt;br /&gt;
* Server gws is not blacklisted&lt;br /&gt;
&amp;lt; Server: gws&lt;br /&gt;
&amp;lt; Cache-Control: private&lt;br /&gt;
&amp;lt; X-XSS-Protection: 1; mode=block&lt;br /&gt;
&amp;lt; X-Frame-Options: SAMEORIGIN&lt;br /&gt;
&amp;lt; Alternate-Protocol: 80:quic&lt;br /&gt;
&amp;lt; Transfer-Encoding: chunked&lt;br /&gt;
&amp;lt;&lt;br /&gt;
&lt;br /&gt;
—&lt;br /&gt;
—&lt;br /&gt;
—&lt;br /&gt;
------------------------------------------------&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; &amp;gt; : request data&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; &amp;lt; : response data&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; Accept : what we will accept as response data, */* is everything&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; User-Agent is what we are using for request like firefox, chrome, curl, etc. Change it as follows:&lt;br /&gt;
curl whatismyipaddress.com -A “Mozilla/4.05&quot;&lt;br /&gt;
&lt;br /&gt;
- &amp;nbsp; &amp;nbsp; PUT or other methods&lt;br /&gt;
curl http://www.google.com/search?q=vishal -d &quot;foo=bar&quot; -v -X PUT&lt;br /&gt;
&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/852450357545394363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/wgetcurl-command-line-web-download.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/852450357545394363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/852450357545394363'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/wgetcurl-command-line-web-download.html' title='wget/curl (command line web download)'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-3031646068556830500</id><published>2013-12-03T14:06:00.004-08:00</published><updated>2013-12-03T14:06:22.488-08:00</updated><title type='text'>VMWare fusion OVF Tool setup </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- &amp;nbsp; install ovftool from&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #042eee; font-family: Arial; font-size: 13px;&quot;&gt;&lt;u&gt;http://www.vmware.com/support/developer/ovf/&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- &amp;nbsp; Copy the following into a file called &quot;ovftool.txt&quot; in the home directory and then follow the instructions in the original post:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;#!/bin/bash&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;# ------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;# Start Script for ovftool&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;# ------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;# resolve links - $0 may be a softlink&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;PRG=&quot;$0&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;if [ -L &quot;$PRG&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp; PRG=`readlink &quot;$PRG&quot;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;PRGDIR=`dirname &quot;$PRG&quot;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;OVFTOOL_BIN=&quot;$PRGDIR&quot;/ovftool.bin&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;export LD_LIBRARY_PATH=&quot;$PRGDIR&quot;:&quot;$LD_LIBRARY_PATH&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;if [ ! -e &quot;$OVFTOOL_BIN&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp; echo &quot;Cannot find $OVFTOOL_BIN&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp; exit 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&quot;$OVFTOOL_BIN&quot; &quot;$@&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;nbsp;- &amp;nbsp; After completing the task above, execute the following commands in the terminal, where &quot;~/ovftool.txt&quot; is the location of the above file you saved:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;gt;cd /Applications/VMware\ OVF\ Tool/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;gt;sudo mv ovftool ovftool.bin&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;gt;sudo cp ~/ovftool.txt ovftool&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&amp;gt;sudo chmod a+x ovftool&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;- &amp;nbsp;Set the PATH environment variable&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;export PATH=/Applications/VMware\ OVF\ Tool:$PATH&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&amp;nbsp;______________________________________&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;&lt;b&gt;Preinstalled OVF with VMware Fusion&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;This also has a bug that needs to be corrected as the same way stated above.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 13px;&quot;&gt;export PATH=$PATH:&quot;/Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;______________________________________&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/3031646068556830500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/vmware-fusion-ovf-tool-setup.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3031646068556830500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3031646068556830500'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2013/12/vmware-fusion-ovf-tool-setup.html' title='VMWare fusion OVF Tool setup '/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-3160452688041774143</id><published>2012-01-18T14:59:00.000-08:00</published><updated>2012-01-18T14:59:07.521-08:00</updated><title type='text'>linux backspace and control C not working</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;br /&gt;
mention &#39;stty intr ^C&#39; in ~/.cshrc, then u may be able to do ctrl-c on optimus.&lt;br /&gt;
if the /home/&lt;user&gt;/.cshrc file is not present, add a new one.&lt;/user&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/3160452688041774143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2012/01/linux-backspace-and-control-c-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3160452688041774143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3160452688041774143'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2012/01/linux-backspace-and-control-c-not.html' title='linux backspace and control C not working'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-3430596205616383215</id><published>2011-11-15T23:59:00.001-08:00</published><updated>2011-11-16T00:11:18.753-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux/Unix"/><title type='text'>Linux Monitoring tools</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;- &amp;nbsp;/Proc file system - Various Kernel Statistics&lt;/b&gt;&lt;br /&gt;
/proc file system provides detailed information about various hardware devices and other Linux kernel information. See Linux kernel /proc documentations for further details. Common /proc examples:&lt;br /&gt;
# cat /proc/cpuinfo&lt;br /&gt;
# cat /proc/meminfo&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;- &amp;nbsp;Nagios - Server And Network Monitoring&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;- &amp;nbsp;Cacti - Web-based Monitoring Tool&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;- &amp;nbsp;KDE System Guard - Real-time Systems Reporting and Graphing&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;- &amp;nbsp;Gnome System Monitor - Real-time Systems Reporting and Graphing&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;background-color: white; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 1.571em; margin-left: 1.571em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;&quot;&gt;
&lt;li style=&quot;color: #111111; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.cyberciti.biz/tips/linux-scanning-network-for-open-ports.html&quot; style=&quot;color: #2361a1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;nmap&lt;/a&gt;&amp;nbsp;- scan your server for open ports.&lt;/li&gt;
&lt;li style=&quot;color: #111111; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.cyberciti.biz/tips/tag/lsof-command&quot; style=&quot;color: #2361a1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;lsof&lt;/a&gt;&amp;nbsp;- list open files, network connections and much more.&lt;/li&gt;
&lt;li style=&quot;color: #111111; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.cyberciti.biz/faq/debian-ubuntu-install-ntop-network-traffic-monitoring-software/&quot; style=&quot;color: #2361a1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Debian / Ubuntu Linux Install ntop To See Network Usage / Network Status&quot;&gt;ntop&lt;/a&gt;&amp;nbsp;web based tool - ntop is the best tool to see network usage in a way similar to what top command does for processes i.e. it is network traffic monitoring software. You can see network status, protocol wise distribution of traffic for UDP, TCP, DNS, HTTP and other protocols.&lt;/li&gt;
&lt;li style=&quot;color: #111111; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://conky.sourceforge.net/&quot; style=&quot;color: #2361a1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; target=&quot;_blank&quot;&gt;Conky&lt;/a&gt;&amp;nbsp;- Another good monitoring tool for the X Window System. It is highly configurable and is able to monitor many system variables including the status of the CPU, memory, swap space, disk storage, temperatures, processes, network interfaces, battery power, system messages, e-mail inboxes etc.&lt;/li&gt;
&lt;li style=&quot;color: #111111; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://members.dslextreme.com/users/billw/gkrellm/gkrellm.html&quot; style=&quot;color: #2361a1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; target=&quot;_blank&quot;&gt;GKrellM&lt;/a&gt;&amp;nbsp;- It can be used to monitor the status of CPUs, main memory, hard disks, network interfaces, local and remote mailboxes, and many other things.&lt;/li&gt;
&lt;li style=&quot;color: #111111; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.cyberciti.biz/tips/keeping-a-log-of-daily-network-traffic-for-adsl-or-dedicated-remote-linux-box.html&quot; style=&quot;color: #2361a1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;vnstat&lt;/a&gt;&amp;nbsp;- vnStat is a console-based network traffic monitor. It keeps a log of hourly, daily and monthly network traffic for the selected interface(s).&lt;/li&gt;
&lt;li style=&quot;color: #111111; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://htop.sourceforge.net/&quot; style=&quot;color: #2361a1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; target=&quot;_blank&quot;&gt;htop&lt;/a&gt;&amp;nbsp;- htop is an enhanced version of top, the interactive process viewer, which can display the list of processes in a tree form.&lt;/li&gt;
&lt;li style=&quot;color: #111111; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.cyberciti.biz/tips/finding-out-a-bad-or-simply-overloaded-network-link-with-linuxunix-oses.html&quot; style=&quot;color: #2361a1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;mtr&lt;/a&gt;&amp;nbsp;- mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;______________________________________&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/3430596205616383215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/linux-monitoring-tools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3430596205616383215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3430596205616383215'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/linux-monitoring-tools.html' title='Linux Monitoring tools'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-8078781566600437408</id><published>2011-11-15T23:53:00.001-08:00</published><updated>2011-11-16T00:11:18.758-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux/Unix"/><title type='text'>Detailed Network Traffic Analysis (tcpdump)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;br /&gt;
The tcpdump is simple command that dump traffic on a network.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;to display traffic info about DNS, enter:&lt;/b&gt;&lt;br /&gt;
# tcpdump -i eth1 &#39;udp port 53&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To display all IPv4 HTTP packets to and from port 80,&lt;/b&gt; i.e. print only packets that contain data, not, for example, SYN and FIN packets and ACK-only packets, enter:&lt;br /&gt;
# tcpdump &#39;tcp port 80 and (((ip[2:2] - ((ip[0]&amp;amp;0xf)&amp;lt;&amp;lt;2)) - ((tcp[12]&amp;amp;0xf0)&amp;gt;&amp;gt;2)) != 0)&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To display all FTP session to 202.54.1.5,&lt;/b&gt; enter:&lt;br /&gt;
# tcpdump -i eth1 &#39;dst 202.54.1.5 and (port 21 or 20&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To display all HTTP session to 192.168.1.5:&lt;/b&gt;&lt;br /&gt;
# tcpdump -ni eth0 &#39;dst 192.168.1.5 and tcp and port http&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Use wireshark to view detailed information about files, &lt;/b&gt;enter&lt;b&gt;:&lt;/b&gt;&lt;br /&gt;
# tcpdump -n -i eth1 -s 0 -w output.txt src or dst port 80&lt;br /&gt;
______________________________________&lt;br /&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/8078781566600437408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/detailed-network-traffic-analysis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/8078781566600437408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/8078781566600437408'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/detailed-network-traffic-analysis.html' title='Detailed Network Traffic Analysis (tcpdump)'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-7816962644759300747</id><published>2011-11-15T23:44:00.001-08:00</published><updated>2011-11-15T23:46:08.617-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux/Unix"/><title type='text'>Real Time Network Statistics (iptraf)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;br /&gt;
The iptraf command is interactive colorful IP LAN monitor. It is an ncurses-based IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others. It can provide the following info in easy to read format:&lt;br /&gt;
&lt;br /&gt;
Network traffic statistics by TCP connection&lt;br /&gt;
IP traffic statistics by network interface&lt;br /&gt;
Network traffic statistics by protocol&lt;br /&gt;
Network traffic statistics by TCP/UDP port and by packet size&lt;br /&gt;
Network traffic statistics by Layer2 address&lt;br /&gt;
&lt;div&gt;
&lt;img alt=&quot;Fig.02: General interface statistics: IP traffic statistics by network interface &quot; class=&quot;size-full wp-image-5196&quot; height=&quot;347&quot; src=&quot;http://files.cyberciti.biz/uploads/tips/2009/06/iptraf3.png&quot; title=&quot;Fig.02: General interface statistics: IP traffic statistics by network interface &quot; width=&quot;600&quot; /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;img alt=&quot;Fig.03 Network traffic statistics by TCP connection&quot; class=&quot;size-full wp-image-5195&quot; height=&quot;416&quot; src=&quot;http://files.cyberciti.biz/uploads/tips/2009/06/iptraf2.png&quot; title=&quot;Fig.03 Network traffic statistics by TCP connection&quot; width=&quot;600&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/7816962644759300747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/real-time-network-statistics-iptraf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/7816962644759300747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/7816962644759300747'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/real-time-network-statistics-iptraf.html' title='Real Time Network Statistics (iptraf)'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-7451040401469512686</id><published>2011-11-15T23:38:00.001-08:00</published><updated>2011-11-15T23:40:07.850-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux/Unix"/><title type='text'>Display socket information (ss)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
The ss command is used to dump socket statistics. It allows showing information similar to netstat command. It can display more TCP and state information than other tools. It is a new, incredibly useful and faster (as compare to netstat) tool for tracking TCP connections and sockets. SS can provide information about:&lt;br /&gt;
&amp;nbsp;- &amp;nbsp;All TCP sockets.&lt;br /&gt;
&amp;nbsp;- &amp;nbsp;All UDP sockets.&lt;br /&gt;
&amp;nbsp;- &amp;nbsp;All established ssh / ftp / http / https connections.&lt;br /&gt;
&amp;nbsp;- &amp;nbsp;All local processes connected to X server.&lt;br /&gt;
&amp;nbsp;- &amp;nbsp;All the tcp sockets in state FIN-WAIT-1 and much more.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Display Sockets Summary&lt;/b&gt;&lt;br /&gt;
List currently established, closed, orphaned and waiting TCP sockets, enter:&lt;br /&gt;
# ss -s&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Display All Open Network Ports&lt;/b&gt;&lt;br /&gt;
# ss -l&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Type the following to see process named using open socket:&lt;/b&gt;&lt;br /&gt;
# ss -pl&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Find out who is responsible for opening socket / port # 4949:&lt;/b&gt;&lt;br /&gt;
# ss -lp | grep 4949&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Display All TCP Sockets&lt;/b&gt;&lt;br /&gt;
# ss -t -a&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Display All UDP Sockets&lt;/b&gt;&lt;br /&gt;
# ss -u -a&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Display All Established SMTP Connections&lt;/b&gt;&lt;br /&gt;
# ss -o state established &#39;( dport = :smtp or sport = :smtp )&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Display All Established HTTP Connections&lt;/b&gt;&lt;br /&gt;
# ss -o state established &#39;( dport = :http or sport = :http )&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Find All Local Processes Connected To X Server&lt;/b&gt;&lt;br /&gt;
# ss -x src /tmp/.X11-unix/*&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;List All The Tcp Sockets in State FIN-WAIT-1&lt;/b&gt;&lt;br /&gt;
List all the TCP sockets in state -FIN-WAIT-1 for our httpd to network 202.54.1/24 and look at their timers:&lt;br /&gt;
# ss -o state fin-wait-1 &#39;( sport = :http or sport = :https )&#39; dst 202.54.1/24&lt;br /&gt;
&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/7451040401469512686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/display-socket-information-ss.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/7451040401469512686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/7451040401469512686'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/display-socket-information-ss.html' title='Display socket information (ss)'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-7446495745052483199</id><published>2011-11-15T23:30:00.001-08:00</published><updated>2011-11-15T23:31:28.573-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux/Unix"/><title type='text'>Find total mem used by a program/process (pmap)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
You can find the memory used by a program (process) by looking into /proc directory or using standard command such as ps or top. However, you must calculate all memory usage by hand i.e. add Shared Memory + mapped file + total virtual memory size of the process + Resident Set Size + non-swapped physical memory used by process.&lt;br /&gt;
&lt;br /&gt;
To display process mappings, type&lt;br /&gt;
&lt;b&gt;$ pmap pid&lt;/b&gt;&lt;br /&gt;
$ pmap 3724&lt;br /&gt;
&lt;br /&gt;
The -x option can be used to provide information about the memory allocation and mapping types per mapping. The amount of resident, non-shared anonymous, and locked memory is shown for each mapping:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ pmap -x 3526&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
______________________________________
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/7446495745052483199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/find-total-mem-used-by-programprocess.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/7446495745052483199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/7446495745052483199'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/find-total-mem-used-by-programprocess.html' title='Find total mem used by a program/process (pmap)'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-554218232749747688</id><published>2011-11-15T23:21:00.001-08:00</published><updated>2011-11-15T23:31:36.840-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux/Unix"/><title type='text'>Linux Multiple Processor stats (mpstat)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;br /&gt;
The mpstat command displays output activities for each available processor, processor 0 being the first one. Global average activities among all processors are also reported. The mpstat command can be used both on SMP and UP machines, but in the latter, only global average activities will be printed.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;# mpstat -P ALL.&lt;/b&gt;&lt;br /&gt;
Where, -P cpu | ALL option indicate the processor number for which statistics are to be reported. cpu is the processor number. Note that processor 0 is the first processor. The ALL keyword indicates that statistics are to be reported for all processors.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&lt;br /&gt;
Linux 2.6.9-55.ELsmp (server.xyz.com) &amp;nbsp; &amp;nbsp; 06/11/2007&lt;br /&gt;
04:13:29 PM &amp;nbsp;CPU &amp;nbsp; %user &amp;nbsp; %nice %system %iowait &amp;nbsp; &amp;nbsp;%irq &amp;nbsp; %soft &amp;nbsp; %idle &amp;nbsp; &amp;nbsp;intr/s&lt;br /&gt;
04:13:29 PM &amp;nbsp;all &amp;nbsp; &amp;nbsp;5.63 &amp;nbsp; &amp;nbsp;0.01 &amp;nbsp; &amp;nbsp;2.33 &amp;nbsp; &amp;nbsp;0.85 &amp;nbsp; &amp;nbsp;0.01 &amp;nbsp; &amp;nbsp;0.10 &amp;nbsp; 91.06 &amp;nbsp; 2255.03&lt;br /&gt;
04:13:29 PM &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;5.74 &amp;nbsp; &amp;nbsp;0.00 &amp;nbsp; &amp;nbsp;2.17 &amp;nbsp; &amp;nbsp;0.88 &amp;nbsp; &amp;nbsp;0.01 &amp;nbsp; &amp;nbsp;0.15 &amp;nbsp; 91.05 &amp;nbsp; 1170.16&lt;br /&gt;
04:13:29 PM &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp;5.53 &amp;nbsp; &amp;nbsp;0.01 &amp;nbsp; &amp;nbsp;2.49 &amp;nbsp; &amp;nbsp;0.83 &amp;nbsp; &amp;nbsp;0.01 &amp;nbsp; &amp;nbsp;0.06 &amp;nbsp; 91.07 &amp;nbsp; 1084.87&lt;br /&gt;
&lt;br /&gt;
The report generated by the mpstat command has the following format:&lt;br /&gt;
&lt;b&gt;CPU&lt;/b&gt;: Processor number. The keyword all indicates that statistics are calculated as averages among all processors.&lt;br /&gt;
&lt;b&gt;%user&lt;/b&gt;: Show the percentage of CPU utilization that occurred while executing at the user level (application).&lt;br /&gt;
&lt;b&gt;%nice&lt;/b&gt;: Show the percentage of CPU utilization that occurred while executing at the user level with nice priority.&lt;br /&gt;
&lt;b&gt;%system&lt;/b&gt;: Show the percentage of CPU utilization that occurred while executing at the system level (kernel). Note that this does not include the time spent servicing&lt;br /&gt;
interrupts or softirqs.&lt;br /&gt;
&lt;b&gt;%iowait&lt;/b&gt;: Show the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.&lt;br /&gt;
&lt;b&gt;%irq&lt;/b&gt;: Show the percentage of time spent by the CPU or CPUs to service interrupts.&lt;br /&gt;
&lt;b&gt;%soft&lt;/b&gt;: Show the percentage of time spent by the CPU or CPUs to service softirqs. A softirq (software interrupt) is one of up to 32 enumerated software interrupts&lt;br /&gt;
which can run on multiple CPUs at once.&lt;br /&gt;
&lt;b&gt;%idle&lt;/b&gt;: Show the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.&lt;br /&gt;
&lt;b&gt;intr/s&lt;/b&gt;: Show the total number of interrupts received per second by the CPU or CPUs.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Display five reports of global statistics among all processors at two second intervals&lt;/b&gt;, enter:&lt;br /&gt;
# mpstat 2 5&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Display five reports of statistics for all processors at two second intervals&lt;/b&gt;, enter:&lt;br /&gt;
# mpstat -P ALL 2 5&lt;br /&gt;
&lt;br /&gt;
______________________________________
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/554218232749747688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/linux-multiple-processor-stats-mpstat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/554218232749747688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/554218232749747688'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/linux-multiple-processor-stats-mpstat.html' title='Linux Multiple Processor stats (mpstat)'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-1553962061295104625</id><published>2011-11-15T23:12:00.001-08:00</published><updated>2011-11-15T23:20:47.428-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux/Unix"/><title type='text'>Collect and Report System Activity (sar)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
you don’t have to do anything data is collected and stored in /var/log/sa location using sa1 and sa2 scripts. It is part of sadc - &lt;b&gt;System activity data collector tools&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
The &lt;b&gt;sadc command&lt;/b&gt; samples system data a specified number of times ( count ) at a specified interval measured in seconds ( interval ). It writes in binary format to the specified output file.&lt;br /&gt;
&lt;br /&gt;
The &lt;b&gt;sa1 command&lt;/b&gt; is a shell procedure variant of the sadc command and handles all of the flags and parameters of that command. The sa1 command collects and store binary data in the /var/log/sa/sadd file, where the dd parameter indicates the current day. The interval and count parameters specify that the record should be written count times at interval seconds.&lt;br /&gt;
&lt;br /&gt;
The sa1 command is designed to be started automatically by the cron command. Type the following command to list files:&lt;br /&gt;
&lt;br /&gt;
# ls /var/log/sa&lt;br /&gt;
Output:&lt;br /&gt;
sa13 &amp;nbsp;sa14 &amp;nbsp;sa15 &amp;nbsp;sa16 &amp;nbsp;sa17 &amp;nbsp;sa18 &amp;nbsp;sa19 &amp;nbsp;sa20 &amp;nbsp;sa21 &amp;nbsp;sar12 &amp;nbsp;sar13 &amp;nbsp;sar14 &amp;nbsp;sar15 &amp;nbsp;sar16 &amp;nbsp;sar17 &amp;nbsp;sar18 &amp;nbsp;sar19 &amp;nbsp;sar20&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How do I copy log files?&lt;/b&gt;&lt;br /&gt;
You can copy all these logs files using ssh/scp or ftp to another computer. You can run use sar command to read binary raw data files, enter&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # sar -f sa13&lt;br /&gt;
Output:&lt;br /&gt;
Linux 2.6.9-55.ELsmp (monster.labs.nixcraft.in) &amp;nbsp; &amp;nbsp; 05/13/2007&lt;br /&gt;
12:00:02 AM &amp;nbsp; &amp;nbsp; &amp;nbsp; CPU &amp;nbsp; &amp;nbsp; %user &amp;nbsp; &amp;nbsp; %nice &amp;nbsp; %system &amp;nbsp; %iowait &amp;nbsp; &amp;nbsp; %idle&lt;br /&gt;
12:10:01 AM &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; 19.75 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp;2.29 &amp;nbsp; &amp;nbsp; &amp;nbsp;7.49 &amp;nbsp; &amp;nbsp; 70.48&lt;br /&gt;
12:20:01 AM &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; &amp;nbsp;2.28 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.27 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.06 &amp;nbsp; &amp;nbsp; 97.39&lt;br /&gt;
12:30:01 AM &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; &amp;nbsp;2.58 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.32 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.07 &amp;nbsp; &amp;nbsp; 97.02&lt;br /&gt;
12:40:02 AM &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; 16.05 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp;3.12 &amp;nbsp; &amp;nbsp; 13.48 &amp;nbsp; &amp;nbsp; 67.36&lt;br /&gt;
12:50:01 AM &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; 10.78 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp;1.20 &amp;nbsp; &amp;nbsp; &amp;nbsp;3.61 &amp;nbsp; &amp;nbsp; 84.41&lt;br /&gt;
01:00:01 AM &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; &amp;nbsp;2.42 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.29 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.30 &amp;nbsp; &amp;nbsp; 96.99&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To see network counter, enter:&lt;/b&gt;&lt;br /&gt;
# sar -n DEV | more&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To display the network counters from the 24th:&lt;/b&gt;&lt;br /&gt;
# sar -n DEV -f /var/log/sa/sa24 | more&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;You can also display real time usage using sar:&lt;/b&gt;&lt;br /&gt;
# sar 4 5&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Sample Outputs:&lt;/b&gt;&lt;br /&gt;
Linux 2.6.18-128.1.14.el5 (www03.nixcraft.in) &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;06/26/2009&lt;br /&gt;
06:45:12 PM &amp;nbsp; &amp;nbsp; &amp;nbsp; CPU &amp;nbsp; &amp;nbsp; %user &amp;nbsp; &amp;nbsp; %nice &amp;nbsp; %system &amp;nbsp; %iowait &amp;nbsp; &amp;nbsp;%steal &amp;nbsp; &amp;nbsp; %idle&lt;br /&gt;
06:45:16 PM &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.22 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;97.78&lt;br /&gt;
06:45:20 PM &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.07 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.38 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.03 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;97.52&lt;br /&gt;
06:45:24 PM &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.94 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.28 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;98.78&lt;br /&gt;
06:45:28 PM &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.56 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.22 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;98.22&lt;br /&gt;
06:45:32 PM &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3.53 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.25 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.03 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;96.19&lt;br /&gt;
Average: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.02 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp;0.27 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.01 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;97.70&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/1553962061295104625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/collect-and-report-system-activity-sar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/1553962061295104625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/1553962061295104625'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/collect-and-report-system-activity-sar.html' title='Collect and Report System Activity (sar)'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-584141812688347545</id><published>2011-11-15T22:11:00.001-08:00</published><updated>2011-11-15T22:14:24.586-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux/Unix"/><title type='text'>Linux Virtual Memory PAGESIZE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;br /&gt;
Most modern operating systems have their main memory divided into pages. It allows better utilization of memory. A page is a fixed length block of main memory, that is contiguous in both physical memory addressing and virtual memory addressing. Kernel swap and allocates memory using pages&lt;br /&gt;
&lt;br /&gt;
To display size of a page in bytes, enter:&lt;br /&gt;
&lt;b&gt;$ getconf PAGESIZE&lt;/b&gt;&lt;br /&gt;
OR&lt;br /&gt;
&lt;b&gt;$ getconf PAGE_SIZE&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&lt;br /&gt;
4096&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;______________________________________&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/584141812688347545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/linux-virtual-memory-pagesize.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/584141812688347545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/584141812688347545'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/linux-virtual-memory-pagesize.html' title='Linux Virtual Memory PAGESIZE'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-2800984144631792930</id><published>2011-11-15T22:06:00.001-08:00</published><updated>2011-11-15T22:14:24.576-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux/Unix"/><title type='text'>Linux Memory Usage (free)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;br /&gt;
The best way to find out RAM information is open a terminal and type the following command:&lt;br /&gt;
&lt;b&gt;$ free -m&lt;/b&gt;&lt;br /&gt;
OR&lt;br /&gt;
&lt;b&gt;$ free -mt&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; total &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;used &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;free &amp;nbsp; &amp;nbsp; &amp;nbsp;shared &amp;nbsp; &amp;nbsp;buffers &amp;nbsp; cached&lt;br /&gt;
Mem: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2008 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1837 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;170 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;50 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;963&lt;br /&gt;
-/+ buffers/cache: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;822 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1185&lt;br /&gt;
Swap: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1027 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1027&lt;br /&gt;
&lt;br /&gt;
free command print the total amount of free and used physical and swap memory in the system, as well as the buffers used by the Linux kernel. You can pass following options&lt;br /&gt;
&lt;br /&gt;
-b switch displays the amount of memory in bytes&lt;br /&gt;
-k switch (set by default) displays it in kilobytes&lt;br /&gt;
-m switch displays it in megabytes.&lt;br /&gt;
-t switch displays a line containing the totals.&lt;br /&gt;
-o switch disables the display of a &quot;buffer adjusted&quot; line. If the -o option is not specified, free subtracts buffer memory from the used memory and adds it to the free memory reported.&lt;br /&gt;
-s switch activates continuous polling delay seconds apart. You may actually specify any floating point number for delay, usleep(3) is used for microsecond resolution delay times.&lt;br /&gt;
&lt;br /&gt;
______________________________________&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/2800984144631792930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/linux-memory-usage-free.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/2800984144631792930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/2800984144631792930'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/linux-memory-usage-free.html' title='Linux Memory Usage (free)'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-3635877245769104312</id><published>2011-11-15T18:30:00.001-08:00</published><updated>2011-11-15T18:56:30.503-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux/Unix"/><title type='text'>processes in Linux (ps)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
ps command will report a snapshot of the current processes.&lt;br /&gt;
&lt;br /&gt;
To select all processes use the -A or -e option:&lt;br /&gt;
# ps -A&lt;br /&gt;
&lt;br /&gt;
ps is just like top but provides more information.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Show Long Format Output&lt;/b&gt;&lt;br /&gt;
# ps -Al&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To turn on extra full mode (&lt;/b&gt;it will show command line arguments passed to process):&lt;br /&gt;
# ps -AlF&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To See Threads ( LWP and NLWP)&lt;/b&gt;&lt;br /&gt;
# ps -AlFH&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To See Threads After Processes&lt;/b&gt;&lt;br /&gt;
# ps -AlLm&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Print All Process On The Server&lt;/b&gt;&lt;br /&gt;
# ps ax&lt;br /&gt;
# ps axu&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Print A Process Tree&lt;/b&gt;&lt;br /&gt;
# ps -ejH&lt;br /&gt;
# ps axjf&lt;br /&gt;
# pstree&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Print Security Information&lt;/b&gt;&lt;br /&gt;
# ps -eo euser,ruser,suser,fuser,f,comm,label&lt;br /&gt;
# ps axZ&lt;br /&gt;
# ps -eM&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;See Every Process Running As User &lt;username&gt;&lt;/username&gt;&lt;/b&gt;&lt;br /&gt;
# ps -U &lt;username&gt; -u &lt;username&gt; u&lt;/username&gt;&lt;/username&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Set Output In a User-Defined Format&lt;/b&gt;&lt;br /&gt;
# ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm&lt;br /&gt;
# ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm&lt;br /&gt;
# ps -eopid,tt,user,fname,tmout,f,wchan&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Display Only The Process IDs of Lighttpd&lt;/b&gt;&lt;br /&gt;
# ps -C lighttpd -o pid=&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
# pgrep lighttpd&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
# pgrep -u vivek php-cgi&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Display The Name of PID 55977&lt;/b&gt;&lt;br /&gt;
# ps -p 55977 -o comm=&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Find Out The Top 10 Memory Consuming Process&lt;/b&gt;&lt;br /&gt;
# ps -auxf | sort -nr -k 4 | head -10&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Find Out top 10 CPU Consuming Process&lt;/b&gt;&lt;br /&gt;
# ps -auxf | sort -nr -k 3 | head -10&lt;br /&gt;
&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/3635877245769104312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/processes-in-linux-ps.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3635877245769104312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3635877245769104312'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/processes-in-linux-ps.html' title='processes in Linux (ps)'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-3490182770067162640</id><published>2011-11-15T18:26:00.001-08:00</published><updated>2011-11-15T18:28:18.182-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux/Unix"/><title type='text'>Linux logged in user ( w )</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;br /&gt;
w command displays information about the users currently on the machine, and their processes.&lt;br /&gt;
# w&lt;br /&gt;
# w username&lt;br /&gt;
&lt;br /&gt;
Sample Outputs:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;17:58:47 up 5 days, 20:28, &amp;nbsp;2 users, &amp;nbsp;load average: 0.36, 0.26, 0.24&lt;br /&gt;
USER &amp;nbsp; &amp;nbsp; TTY &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LOGIN@ &amp;nbsp; IDLE &amp;nbsp; JCPU &amp;nbsp; PCPU WHAT&lt;br /&gt;
root &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pts/0 &amp;nbsp; &amp;nbsp;10.1.3.145 &amp;nbsp; &amp;nbsp; &amp;nbsp; 14:55 &amp;nbsp; &amp;nbsp;5.00s &amp;nbsp;0.04s &amp;nbsp;0.02s vim /etc/resolv.conf&lt;br /&gt;
root &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pts/1 &amp;nbsp; &amp;nbsp;10.1.3.145 &amp;nbsp; &amp;nbsp; &amp;nbsp; 17:43 &amp;nbsp; &amp;nbsp;0.00s &amp;nbsp;0.03s &amp;nbsp;0.00s w&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/3490182770067162640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/linux-logged-in-user-w.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3490182770067162640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/3490182770067162640'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/linux-logged-in-user-w.html' title='Linux logged in user ( w )'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3727741456680968796.post-7693351564556519796</id><published>2011-11-15T18:05:00.001-08:00</published><updated>2011-11-15T18:17:52.003-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux/Unix"/><title type='text'>Memory, Paging, System Activity, Hardware and System Information (vmstat)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: #eeeeee;&quot;&gt;
______________________________________&lt;br /&gt;
&lt;br /&gt;
vmstat command reports information about processes, memory, paging, block IO, traps, and cpu activity. However, a real advantage of vmstat command output - is to the point and (concise) easy to read/understand. The output of vmstat command use to help identify system bottlenecks. Please note that Linux vmstat does not count itself as a running process.&lt;br /&gt;
&lt;br /&gt;
Here is an output of vmstat command from my enterprise grade system:&lt;br /&gt;
&lt;br /&gt;
$ vmstat -S M&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----&lt;br /&gt;
r &amp;nbsp;b &amp;nbsp; swpd &amp;nbsp; free &amp;nbsp; buff &amp;nbsp;cache &amp;nbsp; si &amp;nbsp; so &amp;nbsp; &amp;nbsp;bi &amp;nbsp; &amp;nbsp;bo &amp;nbsp; in &amp;nbsp; &amp;nbsp;cs us sy id wa&lt;br /&gt;
3 &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 1963 &amp;nbsp; &amp;nbsp;607 &amp;nbsp; 2359 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 1 32 &amp;nbsp;0 68 &amp;nbsp;0&lt;br /&gt;
&lt;br /&gt;
Where,&lt;br /&gt;
The fist line is nothing but six different categories. The second line gives more information about each category. This second line gives all data you need.&lt;br /&gt;
-S M: vmstat lets you choose units (k, K, m, M) default is K (1024 bytes) in the default mode. I am using M since this system has over 4 GB memory. Without -M option it will use K as unit&lt;br /&gt;
&lt;br /&gt;
$ vmstat&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----&lt;br /&gt;
r &amp;nbsp;b &amp;nbsp; swpd &amp;nbsp; free &amp;nbsp; buff &amp;nbsp;cache &amp;nbsp; si &amp;nbsp; so &amp;nbsp; &amp;nbsp;bi &amp;nbsp; &amp;nbsp;bo &amp;nbsp; in &amp;nbsp; &amp;nbsp;cs us sy id wa&lt;br /&gt;
3 &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;0 2485120 621952 2415368 &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 1 32 &amp;nbsp;0 68 &amp;nbsp;0&lt;br /&gt;
&lt;br /&gt;
Field Description For Vm Mode&lt;br /&gt;
(a) procs is the process-related fields are:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;r: The number of processes waiting for run time.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b: The number of processes in uninterruptible sleep.&lt;br /&gt;
(b) memory is the memory-related fields are:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;swpd: the amount of virtual memory used.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;free: the amount of idle memory.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;buff: the amount of memory used as buffers.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cache: the amount of memory used as cache.&lt;br /&gt;
(c) swap is swap-related fields are:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;si: Amount of memory swapped in from disk (/s).&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;so: Amount of memory swapped to disk (/s).&lt;br /&gt;
(d) io is the I/O-related fields are:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bi: Blocks received from a block device (blocks/s).&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bo: Blocks sent to a block device (blocks/s).&lt;br /&gt;
(e) system is the system-related fields are:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;in: The number of interrupts per second, including the clock.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cs: The number of context switches per second.&lt;br /&gt;
(f) cpu is the CPU-related fields are:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;These are percentages of total CPU time.&lt;br /&gt;
&lt;br /&gt;
us: Time spent running non-kernel code. (user time, including nice time)&lt;br /&gt;
sy: Time spent running kernel code. (system time)&lt;br /&gt;
id: Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time.&lt;br /&gt;
wa: Time spent waiting for IO. Prior to Linux 2.5.41, shown as zero.&lt;br /&gt;
&lt;br /&gt;
As you see the first output produced gives averages data since the last reboot. Additional reports give information on a sampling period of length delay. You need to sample data using delays i.e. collect data by setting intervals. For example collect data every 2 seconds (or collect data every 2 second 5 times only):&lt;br /&gt;
&lt;br /&gt;
$ vmstat -S M 2&lt;br /&gt;
&amp;nbsp; &amp;nbsp;OR&lt;br /&gt;
$ vmstat -S M 2 5&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----&lt;br /&gt;
r &amp;nbsp;b &amp;nbsp; swpd &amp;nbsp; free &amp;nbsp; buff &amp;nbsp;cache &amp;nbsp; si &amp;nbsp; so &amp;nbsp; &amp;nbsp;bi &amp;nbsp; &amp;nbsp;bo &amp;nbsp; in &amp;nbsp; &amp;nbsp;cs us sy id wa&lt;br /&gt;
3 &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 1756 &amp;nbsp; &amp;nbsp;607 &amp;nbsp; 2359 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 1 32 &amp;nbsp;0 68 &amp;nbsp;0&lt;br /&gt;
3 &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 1756 &amp;nbsp; &amp;nbsp;607 &amp;nbsp; 2359 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; 0 1018 &amp;nbsp; &amp;nbsp;65 38 &amp;nbsp;0 62 &amp;nbsp;0&lt;br /&gt;
3 &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 1756 &amp;nbsp; &amp;nbsp;607 &amp;nbsp; 2359 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; 0 1011 &amp;nbsp; &amp;nbsp;64 37 &amp;nbsp;0 63 &amp;nbsp;0&lt;br /&gt;
3 &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 1756 &amp;nbsp; &amp;nbsp;607 &amp;nbsp; 2359 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp;20 1018 &amp;nbsp; &amp;nbsp;72 37 &amp;nbsp;0 63 &amp;nbsp;0&lt;br /&gt;
3 &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 1756 &amp;nbsp; &amp;nbsp;607 &amp;nbsp; 2359 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; 0 1012 &amp;nbsp; &amp;nbsp;64 37 &amp;nbsp;0 62 &amp;nbsp;0&lt;br /&gt;
3 &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 1756 &amp;nbsp; &amp;nbsp;607 &amp;nbsp; 2359 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; 0 1011 &amp;nbsp; &amp;nbsp;65 38 &amp;nbsp;0 63 &amp;nbsp;0&lt;br /&gt;
3 &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 1995 &amp;nbsp; &amp;nbsp;607 &amp;nbsp; 2359 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; 0 1012 &amp;nbsp; &amp;nbsp;62 35 &amp;nbsp;2 63 &amp;nbsp;0&lt;br /&gt;
3 &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 1731 &amp;nbsp; &amp;nbsp;607 &amp;nbsp; 2359 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; 0 1012 &amp;nbsp; &amp;nbsp;64 34 &amp;nbsp;3 62 &amp;nbsp;0&lt;br /&gt;
3 &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 1731 &amp;nbsp; &amp;nbsp;607 &amp;nbsp; 2359 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; 0 1013 &amp;nbsp; &amp;nbsp;72 38 &amp;nbsp;0 62 &amp;nbsp;0&lt;br /&gt;
3 &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 1731 &amp;nbsp; &amp;nbsp;607 &amp;nbsp; 2359 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; 0 1013 &amp;nbsp; &amp;nbsp;63 37 &amp;nbsp;0 63 &amp;nbsp;0&lt;br /&gt;
This is what most system administrators do to identify system bottlenecks. I hope all of you find vmstat data is concise and easy to read.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;______________________________________
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vishalp-kb.blogspot.com/feeds/7693351564556519796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/memory-paging-system-activity-hardware.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/7693351564556519796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3727741456680968796/posts/default/7693351564556519796'/><link rel='alternate' type='text/html' href='http://vishalp-kb.blogspot.com/2011/11/memory-paging-system-activity-hardware.html' title='Memory, Paging, System Activity, Hardware and System Information (vmstat)'/><author><name>Vishal Mittal</name><uri>http://www.blogger.com/profile/00984645210916051938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_j-GtjzSvpDs/Sx3cbymGKOI/AAAAAAAAAsQ/uotB8kmGkr8/S220/DSC04591.JPG'/></author><thr:total>0</thr:total></entry></feed>