<?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-570628863367981549</id><updated>2024-09-11T17:24:20.353-07:00</updated><category term="linux"/><category term="ubuntu"/><category term="os"/><category term="network"/><category term="programming"/><category term="protocol"/><category term="HA"/><category term="java"/><category term="performance"/><category term="ruby"/><category term="security"/><category term="fedora"/><category term="ipv4"/><category term="ipv6"/><category term="database"/><category term="derby"/><category term="filesystem"/><category term="jmeter"/><category term="kvm"/><category term="solaris"/><category term="virtualization"/><category term="3gpp"/><category term="bios"/><category term="ftp"/><category term="gems"/><category term="ip"/><category term="iscsi"/><category term="jee"/><category term="kernel"/><category term="libreoffice"/><category term="log"/><category term="lvm"/><category term="music"/><category term="mysql"/><category term="oss"/><category term="recovery"/><category term="rpm"/><category term="uml"/><category term="vpn"/><title type='text'>Krystianek&#39;s blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>64</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-5042436404571391372</id><published>2013-01-15T12:51:00.001-08:00</published><updated>2013-01-16T14:04:09.522-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ipv4"/><category scheme="http://www.blogger.com/atom/ns#" term="ipv6"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="network"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="protocol"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Linux: UDP buffer monitoring utility (udpstat)</title><content type='html'>&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Udp statistics tool&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The goals&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The goal for this utility was to:&lt;br /&gt;
&lt;br /&gt;
1. Present /proc/net/udp in human readable form:&lt;br /&gt;
- timestamp&lt;br /&gt;
- local address - from hex to dot notated (in case of IPv6 in hex) + port&lt;br /&gt;
- remote address - from hex to dot notated (in case of IPv6 in hex) + port&lt;br /&gt;
- rx, tx queue - in bytes, kbytes, mbytes (constrolled by parameter)&lt;br /&gt;
- drops&lt;br /&gt;
&lt;br /&gt;
2. Constant monitoring with configurable interval polling:&lt;br /&gt;
- statistics presented every n seconds&lt;br /&gt;
- monitor interval controlled by command line parameter&lt;br /&gt;
- number of polls controlled by command line interface&lt;br /&gt;
&lt;br /&gt;
3. Print Per pid statistics - present udp statistics per pid (/proc/&lt;pid&gt;&lt;pid&gt;&lt;pid&gt;/net/udp)&lt;/pid&gt;&lt;/pid&gt;&lt;/pid&gt;&lt;br /&gt;
&lt;br /&gt;
4. Print kernel configuration parameters: max size + utilization of the buffer (rx queue / rx max size &amp;amp; tx queue / tx max size)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Where it can be downloaded from?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
It has become a part of the yapcg project. The latest version available here: &lt;a href=&quot;http://code.google.com/p/yapcg/source/browse/measurements/perftools/udpstat&quot;&gt;http://code.google.com/p/yapcg/source/browse/measurements/perftools/udpstat&lt;/a&gt;&amp;nbsp;should meet all the goals . You can give it a try - what you will need is ruby 1.9.3 with&amp;nbsp;optparse, ostruct gems (should be available in standard installation, at least these was the case on my Ubuntu 12.10 box)&lt;br /&gt;
&lt;br /&gt;
The syntax of the utility is:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;$ udpstat&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Usage: udpstat [options] &lt;interval&gt; &lt;count&gt;&lt;/count&gt;&lt;/interval&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Specific options:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; -6, --ipv6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Enable IPv6 stat parsing&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; -K, --kilobytes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Present values in kilobytes&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; -M, --megabytes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Present values in megabytes&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; -p, --ppid pid &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PID of the process to be monitored&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Common options:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&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; Show this message&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; -v, --version &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Show version&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&lt;interval&gt; - interval in which statistics are to be reported&lt;/interval&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&lt;count&gt; &amp;nbsp; &amp;nbsp;- the number of statistics to be shown&lt;/count&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;@2013 Krystian Brachmanski, Wroclaw&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
As previously mentioned it has been verified on Ubuntu 12.10 64-bit OS, running&amp;nbsp;3.5.0-21-generic kernel and&amp;nbsp;ruby 1.9.3p194&amp;nbsp;(2012-04-20 revision 35410) [x86_64-linux].&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How to use it?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I always say that I learn the most on examples therefore I recommend to check &lt;a href=&quot;http://krystianekb.blogspot.com/2013/01/ubuntu-1210-udp-buffer-monitoring.html&quot;&gt;another article&lt;/a&gt; on my blog to see how you can truoubleshoot a simulated udp buffer problem in the application.</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/5042436404571391372/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2013/01/linux-udp-buffer-monitoring-utility.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/5042436404571391372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/5042436404571391372'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2013/01/linux-udp-buffer-monitoring-utility.html' title='Linux: UDP buffer monitoring utility (udpstat)'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-857181821145930383</id><published>2013-01-14T13:34:00.003-08:00</published><updated>2013-01-15T12:38:18.447-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ipv4"/><category scheme="http://www.blogger.com/atom/ns#" term="ipv6"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="network"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="protocol"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Ubuntu 12.10: UDP buffer monitoring (kernel 3.5.0-21)</title><content type='html'>Some time ago I was involved in analysis of a networking problem, the symptom of which were client-side timeouts (no answer received). The protocol was standardized, based on UDP.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s first analyze the flow of information from network adapter towards
 the application. There is an excellent document provided by RedHat as 
part of their OS documentation - it can be found &lt;a href=&quot;https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6-Beta/pdf/Performance_Tuning_Guide/Red_Hat_Enterprise_Linux-6-Beta-Performance_Tuning_Guide-en-US.pdf&quot;&gt;here&lt;/a&gt;. I recommend reading chapter 8 about networking. In general the flow looks as presented on the pic below:&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6kb9WCBQ8O6oXqi4CPSXFDZ-SE9w7LbFCh7741ZY0ekud5Ent5fljwqQfnLeSe7ZA5CkP-MKnk9oLoDMC-Ni_blMROoPn5X6kxKweTQMXtS2DRcIXOkJd8wK8YctWi0h0EWWMd6-X0Ak/s1600/packet_reception.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;58&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6kb9WCBQ8O6oXqi4CPSXFDZ-SE9w7LbFCh7741ZY0ekud5Ent5fljwqQfnLeSe7ZA5CkP-MKnk9oLoDMC-Ni_blMROoPn5X6kxKweTQMXtS2DRcIXOkJd8wK8YctWi0h0EWWMd6-X0Ak/s320/packet_reception.jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 1 Packet reception diagram (from &lt;a href=&quot;https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6-Beta/pdf/Performance_Tuning_Guide/Red_Hat_Enterprise_Linux-6-Beta-Performance_Tuning_Guide-en-US.pdf&quot;&gt;RedHat Performance Tuning Guide&lt;/a&gt;)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Hardware/interrupt buffers&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
These are internal HW buffers inside the network interface card (NIC). If you see hw buffer overruns on your system the only thing that you will know is that the transfer rate is too high for this interface. The document previously mentioned gives indication how to monitor it using ethtool and what you could do to minimize the impact.&lt;br /&gt;
&lt;br /&gt;
You can monitor this using tools getting stats from the NIC like ifconfig. Below you can find an example from my Ubuntu box (overruns indicate the number of times the HW buffer overrun happened):&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;$ ifconfig eth0&lt;br /&gt;eth0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Link encap:Ethernet&amp;nbsp; HWaddr b4:99:ba:e8:d3:6c&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UP BROADCAST MULTICAST&amp;nbsp; MTU:1500&amp;nbsp; Metric:1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX packets:0 errors:0 dropped:0&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;overruns:0&lt;/span&gt; &lt;span style=&quot;color: #6fa8dc;&quot;&gt;frame:0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TX packets:0 errors:0 dropped:0 &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;overruns:0&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt; carrier:0&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collisions:0 txqueuelen:1000 &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX bytes:0 (0.0 B)&amp;nbsp; TX bytes:0 (0.0 B)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Interrupt:20 Memory:d7500000-d7520000 &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;cite&gt;&lt;/cite&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;UDP socket buffers&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
There is a lot explained what can be tuned in the document mentioned above. I will only try to explain how it can happen that the buffer queue will grow. In order to do that I will prepare a sample Java application (a modification of UDP echo client/server app). It consists of the server application and client one.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Test application&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The client will be sending every 10 milliseconds an UDP datagram containing 64 bytes long string (16 times the word &quot;test&quot;).&lt;br /&gt;
&lt;br /&gt;
The server on the other hand will be one-thread application reading from socket. The reading thread after retrieving information from the socket will be sleeping for 1 second - 1s is set to show the effect in shorter timeframe but please notice any value above 10 ms (sleep on the client side) will cause this behaviour. In general such problem might happen in real life scenario if the same thread that is reading from socket is doing some processing.&lt;br /&gt;
&lt;br /&gt;
Code for udp echo client: &lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;package org.krystianek.udp.test.echo;&lt;br /&gt;&lt;br /&gt;import java.io.BufferedReader;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.io.InputStreamReader;&lt;br /&gt;import java.net.DatagramPacket;&lt;br /&gt;import java.net.DatagramSocket;&lt;br /&gt;import java.net.InetAddress;&lt;br /&gt;import java.net.SocketException;&lt;br /&gt;import java.util.logging.Logger;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;public class EchoClient {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void main(String[] args) throws Exception {&lt;br /&gt;&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; String hostname = &quot;localhost&quot;;&lt;br /&gt;&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; InetAddress ia = InetAddress.getByName(hostname);&lt;br /&gt;&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; SenderThread sender = new SenderThread(ia, 9999);&lt;br /&gt;&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; sender.start();&lt;br /&gt;&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; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class SenderThread extends Thread {&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private InetAddress server;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private DatagramSocket socket;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private boolean stopped = false;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private int port;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public SenderThread(InetAddress address, int port) throws SocketException {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.server = address;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.port = port;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.socket = new DatagramSocket();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.socket.connect(server, port);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void halt() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.stopped = true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public DatagramSocket getSocket() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return this.socket;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void run() {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;&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; String theLine =&quot;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&quot;;&lt;br /&gt;&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; while (true) {&lt;br /&gt;&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; byte[] data = theLine.getBytes();&lt;br /&gt;&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; DatagramPacket output = new DatagramPacket(data, data.length, server, port);&lt;br /&gt;&lt;br /&gt;&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; System.out.println(&quot;Sending : &quot; + output.getData().length + &quot; bytes &quot;);&lt;br /&gt;&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; socket.send(output);&lt;br /&gt;&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; Thread.yield();&lt;br /&gt;&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; Thread.sleep(100);&lt;br /&gt;&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; }&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception ex) {&lt;br /&gt;&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; System.err.println(ex);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Code for udp echo server:&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;package org.krystianek.udp.test.echo;&lt;br /&gt;&lt;br /&gt;import java.net.DatagramSocket;&lt;br /&gt;import java.net.InetSocketAddress;&lt;br /&gt;import java.net.SocketAddress;&lt;br /&gt;import java.nio.ByteBuffer;&lt;br /&gt;import java.nio.channels.DatagramChannel;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;&amp;nbsp;* @author krychu&lt;br /&gt;&amp;nbsp;* &lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;public class EchoServer {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void main(String[] args) throws Exception {&lt;br /&gt;&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; DatagramChannel channel = DatagramChannel.open();&lt;br /&gt;&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; DatagramSocket socket = channel.socket();&lt;br /&gt;&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; SocketAddress address = new InetSocketAddress(9999);&lt;br /&gt;&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; socket.bind(address);&lt;br /&gt;&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; ByteBuffer buffer = ByteBuffer.allocateDirect(65507);&lt;br /&gt;&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; while (true) {&lt;br /&gt;&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;&amp;nbsp; SocketAddress client = channel.receive(buffer);&lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;&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;&amp;nbsp; try {&lt;br /&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread.sleep(1000);&lt;br /&gt;&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;&amp;nbsp; } catch (Exception ex) {&lt;br /&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ex.printStackTrace();&lt;br /&gt;&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;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&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;&amp;nbsp; buffer.flip();&lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;//&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; System.out.println(&quot;Server received : &quot; + buffer);&lt;br /&gt;//&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; channel.send(buffer, client);&lt;br /&gt;//&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; buffer.clear();&lt;/span&gt;&lt;br /&gt;&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; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
For the test the classes have been packaged into echo-0.0.1-SNAPSHOT.jar using maven build system.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Monitoring the system&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The next step was to identify how to monitor the buffer utilization. There are different ways - in my article I will use the statistics available in the proc filesystem - quite good description can be found in the man page:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ man proc&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;dt style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;i&gt;/proc/net/udp&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;dd style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Holds a dump of the UDP socket table. Much of the information is not of use apart from debugging. The &quot;sl&quot; value is the kernel hash slot for the socket, the &quot;local_address&quot; is the local address and port number pair. The &quot;rem_address&quot; is the remote address and port number pair (if connected). &quot;St&quot; is the internal status of the socket. The &quot;tx_queue&quot; and &quot;rx_queue&quot; are the outgoing and incoming data queue in terms of kernel memory usage. The &quot;tr&quot;, &quot;tm-&amp;gt;when&quot;, and &quot;rexmits&quot; fields are not used by UDP. The &quot;uid&quot; field holds the effective UID of the creator of the socket. The format is:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;code&quot; style=&quot;padding: 0px 2em 0px 0px;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;sl  local_address rem_address   st tx_queue rx_queue tr rexmits  tm-&amp;gt;when uid
1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
There are two files available one for IPv4 (/proc/net/udp) and IPv6 (/proc/net/udp6) - the example output can be found below&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ cat /proc/net/udp&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; sl &amp;nbsp;local_address rem_address &amp;nbsp; st tx_queue rx_queue tr tm-&amp;gt;when retrnsmt &amp;nbsp; uid &amp;nbsp;timeout inode ref pointer drops &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; 564: 00000000:0801 00000000:0000 07 00000000:00000000 00:00000000 00000000 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 13276 2 0000000000000000 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; 601: 00000000:E026 00000000:0000 07 00000000:00000000 00:00000000 00000000 &amp;nbsp; 118 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 12564 2 0000000000000000 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;1833: 00000000:9CF6 00000000:0000 07 00000000:00000000 00:00000000 00000000 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 13808 2 0000000000000000 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;1884: 00000000:ED29 00000000:0000 07 00000000:00000000 00:00000000 00000000 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 1145241 2 0000000000000000 0 &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ cat /proc/net/udp6&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; sl &amp;nbsp;local_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; remote_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;st tx_queue rx_queue tr tm-&amp;gt;when retrnsmt &amp;nbsp; uid &amp;nbsp;timeout inode ref pointer drops&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; 2: 00000000000000000000000000000000:ADCF 00000000000000000000000000000000:0000 07 00000000:00000000 00:00000000 00000000 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 13287 2 0000000000000000 0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;37: 00000000000000000000000000000000:9DF2 00000000000000000000000000000000:0000 07 00000000:00000000 00:00000000 00000000 &amp;nbsp; 104 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 10786 2 0000000000000000 0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;... &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;1820: 00000000000000000000000000000000:14E9 00000000000000000000000000000000:0000 07 00000000:00000000 00:00000000 00000000 &amp;nbsp; 104 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 10784 2 0000000000000000 0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;2024: 00000000000000000000000000000000:B5B5 00000000000000000000000000000000:0000 07 00000000:00000000 00:00000000 00000000 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 13796 2 0000000000000000 0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
In addition I developed a simple ruby script for parsing the udp stats. &lt;br /&gt;
The full parameter set for the utility:&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;$ udpstat&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Usage: udpstat [options] &lt;interval&gt; &lt;count&gt;&lt;/count&gt;&lt;/interval&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Specific options:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; -6, --ipv6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Enable IPv6 stat parsing&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; -K, --kilobytes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Present values in kilobytes&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; -M, --megabytes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Present values in megabytes&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; -p, --ppid pid &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PID of the process to be monitored&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Common options:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&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; Show this message&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; -v, --version &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Show version&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&lt;interval&gt; - interval in which statistics are to be reported&lt;/interval&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&lt;count&gt; &amp;nbsp; &amp;nbsp;- the number of statistics to be shown&lt;/count&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;@2013 Krystian Brachmanski, Wroclaw&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The example dump can be found below:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;$ ./measurements/perftools/udpstat -6 1 2&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;Timestamp &amp;nbsp; &amp;nbsp; &amp;nbsp; Local IP:port &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Remote IP:port &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;rx[B] &amp;nbsp; rbuf[B] &amp;nbsp; &amp;nbsp; tx[B] &amp;nbsp; tbuf[B] &amp;nbsp; drops&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 00000000000000000000000000000000:44495 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 00000000000000000000000000000000:40434 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 00000000000000000000000000000000:24105 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 00000000000000000000000000000000:36499 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 00000000000000000000000000000000:51186 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 00000000000000000000000000000000:2049 &amp;nbsp;00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 00000000000000000000000000000000:111 &amp;nbsp; 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 00000000000000000000000001000000:123 &amp;nbsp; 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 000080FE00000000FFD724029C55BDFE:123 &amp;nbsp; 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 00000000000000000000000000000000:123 &amp;nbsp; 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 00000000000000000000000000000000:45593 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 00000000000000000000000000000000:612 &amp;nbsp; 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 00000000000000000000000000000000:5353 &amp;nbsp;00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956875 00000000000000000000000000000000:46517 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 00000000000000000000000000000000:44495 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 00000000000000000000000000000000:40434 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 00000000000000000000000000000000:24105 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 00000000000000000000000000000000:36499 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 00000000000000000000000000000000:51186 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 00000000000000000000000000000000:2049 &amp;nbsp;00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 00000000000000000000000000000000:111 &amp;nbsp; 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 00000000000000000000000001000000:123 &amp;nbsp; 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 000080FE00000000FFD724029C55BDFE:123 &amp;nbsp; 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 00000000000000000000000000000000:123 &amp;nbsp; 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 00000000000000000000000000000000:45593 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 00000000000000000000000000000000:612 &amp;nbsp; 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 00000000000000000000000000000000:5353 &amp;nbsp;00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; 1353956876 00000000000000000000000000000000:46517 00000000000000000000000000000000:0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;1048576 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
You can find the utility in google code as part of the yapcg tool:&amp;nbsp;&lt;a href=&quot;http://code.google.com/p/yapcg/source/browse/measurements/perftools/udpstat&quot;&gt;http://code.google.com/p/yapcg/source/browse/measurements/perftools/udpstat&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Testing the UDP buffers&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Configuration of the test application (actually it is in the code):&lt;br /&gt;
- udp port: 9999&lt;br /&gt;
- IPv6 socket listening&lt;br /&gt;
- system settings:&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; net.core.rmem_default = 1048576&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; net.core.rmem_max = 1048576&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
1. Starting the Echo UDP server in the background: &lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;$ java -cp ./target/echo-0.0.1-SNAPSHOT.jar org.krystianek.udp.test.echo.EchoServer &amp;amp; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
2. Start the udp6 monitor the ipv6 udp sockets in the background and present the statistics in kilobytes:&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;$ ./udpstat -6 -KB 1 100000 &amp;gt; udpstat.out 2&amp;gt;&amp;amp;1 &amp;amp; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
3. Starting the client:&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ java -cp ./target/echo-0.0.1-SNAPSHOT.jar org.krystianek.udp.test.echo.EchoClient&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
4. Analysis of the results:&lt;br /&gt;
&lt;br /&gt;
- if we take a look at the generated output:&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ cat udpstat.out&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; Timestamp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Local IP:port&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Remote IP:port&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rx[KB]&amp;nbsp; rbuf[KB]&amp;nbsp;&amp;nbsp;&amp;nbsp; tx[KB]&amp;nbsp; tbuf[KB]&amp;nbsp;&amp;nbsp; drops &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; 1358196897 00000000000000000000000000000000:9999&amp;nbsp; 00000000000000000000000000000000:0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;...&lt;br /&gt;&amp;nbsp; 1358196898 00000000000000000000000000000000:9999&amp;nbsp; 00000000000000000000000000000000:0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;...&lt;br /&gt;&amp;nbsp; 1358196902 00000000000000000000000000000000:9999&amp;nbsp; 00000000000000000000000000000000:0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 38&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;...&lt;br /&gt;&amp;nbsp; 1358196906 00000000000000000000000000000000:9999&amp;nbsp; 00000000000000000000000000000000:0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 68&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;...&lt;br /&gt;&amp;nbsp; 1358196909 00000000000000000000000000000000:9999&amp;nbsp; 00000000000000000000000000000000:0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 90&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;...&lt;br /&gt;&amp;nbsp; 1358196910 00000000000000000000000000000000:9999&amp;nbsp; 00000000000000000000000000000000:0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 97&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;...&lt;br /&gt;&amp;nbsp; 1358196917 00000000000000000000000000000000:9999&amp;nbsp; 00000000000000000000000000000000:0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 149&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;...&lt;br /&gt;&amp;nbsp; 1358196928 00000000000000000000000000000000:9999&amp;nbsp; 00000000000000000000000000000000:0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 230&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;br /&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; 1358197036 00000000000000000000000000000000:9999&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;00000000000000000000000000000000:0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp; 1358197037 00000000000000000000000000000000:9999&amp;nbsp; 00000000000000000000000000000000:0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp; 1358197038 00000000000000000000000000000000:9999&amp;nbsp; 00000000000000000000000000000000:0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp; 1358197039 00000000000000000000000000000000:9999&amp;nbsp; 00000000000000000000000000000000:0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
As expected the receive socket buffer starts to increase as soon as the UDP echo client starts since the transmission rate of the client is much higher than the reception rate of the server (Server receiver once per second, while client transmitting 100 times 64 bytes per second). As soon as the receive socket buffer utilization level reaches the maximum defined in system kernel parameters one can see packets drops happening (marked with red colour).&lt;br /&gt;
&lt;br /&gt;
Everything seems to be working as expected...&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Conclusions&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
When designing an application that is processing high volumes of data always ensure that the thread reading from the socket is not doing any additional, unnecessary processing since it may cause your socket buffers utilization go high and eventually would cause packet drop. If the additional processing/decoding is necessary then still an option with a thread pool might solve the buffer issue.&lt;br /&gt;
&lt;br /&gt;
Anyway in my opinion the general rule of thumb should be that it is always beneficial to make the socket reading layer as lightweight as possible. With a single threaded approach one could think of creating a queue to which the reader thread would put the payload and a pool of worker threads would read from the queue and continue with the processing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/857181821145930383/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2013/01/ubuntu-1210-udp-buffer-monitoring.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/857181821145930383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/857181821145930383'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2013/01/ubuntu-1210-udp-buffer-monitoring.html' title='Ubuntu 12.10: UDP buffer monitoring (kernel 3.5.0-21)'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6kb9WCBQ8O6oXqi4CPSXFDZ-SE9w7LbFCh7741ZY0ekud5Ent5fljwqQfnLeSe7ZA5CkP-MKnk9oLoDMC-Ni_blMROoPn5X6kxKweTQMXtS2DRcIXOkJd8wK8YctWi0h0EWWMd6-X0Ak/s72-c/packet_reception.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-8209535038270168323</id><published>2013-01-12T04:54:00.002-08:00</published><updated>2013-01-12T10:18:17.050-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="network"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><title type='text'>Ubuntu: port-scan detection tools (psad, snort)</title><content type='html'>Do you know any port scan detection tools under Linux?&lt;br /&gt;
&lt;br /&gt;
Today I needed one but did not have much experience or should I rather say overview on what is available. After some googling I found some tools and have chosen two of them to verify more in depth: psad and snort.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Psad&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Installation&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The psad utility is present in standard ubuntu repository and can be installed via apt-get utility:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;#apt-get install psad&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;2. Configuration&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;2.1 Psad configuration&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The details about parameters can be found here:&amp;nbsp;&lt;a href=&quot;http://cipherdyne.org/psad/docs/config.html&quot;&gt;http://cipherdyne.org/psad/docs/config.html&lt;/a&gt;&lt;br /&gt;
Generally in my case the email was pointing to root@localhost; HOME_NET and EXTERNAL_NET were pointing to any.&lt;br /&gt;
&lt;br /&gt;
Iptables log file location:&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;IPT_SYSLOG_FILE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /var/log/kern.log;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;2.2 Iptables configuration&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Turn on iptables logging:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #f9f9f9; font-size: 12px; line-height: 17.683332443237305px;&quot;&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;# iptables -A INPUT -j LOG&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #f9f9f9; font-size: 12px; line-height: 17.683332443237305px;&quot;&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;# iptables -A FORWARD -j LOG&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3. Startup&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Ensure that the service is restarted after changing the configuration (of course from root account):&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;# service psad restart&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;* Stopping the psadwatchd process&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;* Stopping the kmsgsd process&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;* Stopping the psad process&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;* Stopping Port Scan Attack Detector psad &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; [ OK ]&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;* Starting Port Scan Attack Detector psad &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; [ OK ]&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;4. Test&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
For doing the test the nmap utility has been used by me (from localhost - my local IP address is 192.168.1.106).&lt;br /&gt;
&lt;br /&gt;
NMap scan:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;#&amp;nbsp;nmap -v -p1-65535 &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;192.168.1.106&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Starting Nmap 6.00 ( http://nmap.org ) at 2013-01-11 07:52 CET&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Initiating Parallel DNS resolution of 1 host. at 07:52&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Completed Parallel DNS resolution of 1 host. at 07:52, 0.33s elapsed&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Initiating SYN Stealth Scan at 07:52&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Scanning 192.168.1.106 [65535 ports]&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
After few minutes the information about the scan appeared in the psad statistics (before that nothing was shown):&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# psad -S&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[+] psadwatchd (pid: 12733) &amp;nbsp;%CPU: 0.0 &amp;nbsp;%MEM: 0.0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; Running since: Fri Jan 11 07:29:55 2013&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[+] psad (pid: 12731) &amp;nbsp;%CPU: 3.0 &amp;nbsp;%MEM: 1.2&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; Running since: Fri Jan 11 07:29:55 2013&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; Command line arguments: [none specified]&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; Alert email address(es): root@localhost&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[+] Version: psad v2.2&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[+] Top 50 signature matches:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR DoomJuice file upload attempt&quot; (tcp), &amp;nbsp;Count: 60, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 2375&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;P2P BitTorrent communication attempt&quot; (tcp), &amp;nbsp;Count: 9, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 2181&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR NetSphere Connection attempt&quot; (tcp), &amp;nbsp;Count: 3, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100044&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;POLICY HP JetDirect LCD communication attempt&quot; (tcp), &amp;nbsp;Count: 3, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 510&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;DOS DB2 dos communication attempt&quot; (tcp), &amp;nbsp;Count: 2, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 1641&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;POLICY vncviewer Java applet communication attempt&quot; (tcp), &amp;nbsp;Count: 2, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 1846&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;MISC Ghostsurf communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100203&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;MISC HP Web JetAdmin communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100084&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;MISC Microsoft PPTP communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100082&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;P2P Napster Server Login communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 565&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;MISC Xtramail communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 1636&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR Subseven connection attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100207&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR Doly 2.0 Connection attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 119&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;MISC VNC communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100202&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;MISC MS Terminal Server communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100077&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR RUX the Tick connection attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100063&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR HackAttack 1.20 Connection attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 141&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;RPC portmap listing TCP 32771&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 599&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;MISC Microsoft SQL Server communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100205&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR NetBus Pro 2.0 Connection Cttempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100029&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;MISC Radmin Default install options attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100204&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;DDOS Trin00 Attacker to Master connection attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100007&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR QAZ Worm Client Login access&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 108&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;DDOS mstream client to handler&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 249&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR WinCrash 1.0 communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 163&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR GirlFriend Connection attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 145&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;PSAD-CUSTOM Kuang2 virus communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100206&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR netbus Connection Cttempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100028&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;MISC PCAnywhere communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100073&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;MISC Alcatel PABX 4400 connection attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 1819&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR Remote PC Access connection attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 2124&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR BackConstruction 2.1 connection attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 152&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;MISC xfs communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 1987&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;DOS arkiea backup communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 282&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR PhaseZero Server Active on Network&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 208&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;SNMP AgentX/tcp request&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 1421&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;MISC Insecure TIMBUKTU communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 505&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;FTP Yak! FTP server communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100100&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;P2P eDonkey transfer attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 2586&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR Infector.1.x Connection attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100040&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR Asylum 0.1 connection request&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100064&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;P2P napster communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100090&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR NetMetro File List connection attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 159&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;P2P Napster Client Data communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 564&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;P2P Napster Client Data communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 562&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;P2P Napster Client Data communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 563&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;DOS Real Audio Server communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 100112&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;P2P Fastrack kazaa/morpheus communication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 1383&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;BACKDOOR DonaldDick 1.53 connection attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 153&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;POLICY HP JetDirect LCD commnication attempt&quot; (tcp), &amp;nbsp;Count: 1, &amp;nbsp;Unique sources: 1, &amp;nbsp;Sid: 568&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[+] Top 25 attackers:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 192.168.1.106 &amp;nbsp; DL: 5, Packets: 56653, Sig count: 126, (local IP)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 127.0.0.1 &amp;nbsp; &amp;nbsp; &amp;nbsp; DL: 1, Packets: 13, Sig count: 0, (local IP)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 193.41.112.18 &amp;nbsp; DL: 1, Packets: 6, Sig count: 0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[+] Top 20 scanned ports:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 51708 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 58684 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 57573 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 19544 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 44919 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 8563 &amp;nbsp;1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 58017 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 9323 &amp;nbsp;1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 28336 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 5006 &amp;nbsp;1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 28801 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 63406 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 55548 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 38756 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 31922 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 62374 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 55430 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 3509 &amp;nbsp;1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 10713 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tcp 36235 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 111 &amp;nbsp; 12 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 53 &amp;nbsp; &amp;nbsp;7 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 17500 5 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 5353 &amp;nbsp;5 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 50685 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 30969 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 22220 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 63507 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 44743 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 50374 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 41192 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 22675 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 123 &amp;nbsp; 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 60162 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 26877 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 33571 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 52566 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 60029 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; udp 37490 1 packets&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[+] iptables log prefix counters:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;[UFW BLOCK]&quot;: 11&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; Total packet counters: tcp: 56646 udp: 44&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[+] IP Status Detail:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;SRC: &amp;nbsp;192.168.1.106, DL: 5, Dsts: 4, Pkts: 56653, Unique sigs: 26, Email alerts: 2, Local IP&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; DST: 255.255.255.255&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Scanned ports: UDP 17500, Pkts: 1, Chain: INPUT, Intf: wlan0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; DST: 192.168.1.106, Local IP&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Scanned ports: TCP 1-65535, Pkts: 56646, Chain: INPUT, Intf: lo&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;BACKDOOR Remote PC Access connection attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 34012, SYN, Sid: 2124&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;MISC Ghostsurf communication attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 7212, SYN, Sid: 100203&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;MISC xfs communication attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 7100, SYN, Sid: 1987&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;BACKDOOR NetSphere Connection attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 2, DP: 30101, SYN, Sid: 100044&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;DOS arkiea backup communication attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 617, SYN, Sid: 282&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;SNMP AgentX/tcp request&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 705, SYN, Sid: 1421&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;P2P BitTorrent communication attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 6889, SYN, Sid: 2181&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;BACKDOOR Subseven connection attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 27374, SYN, Sid: 100207&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;P2P eDonkey transfer attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 4242, SYN, Sid: 2586&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;BACKDOOR Infector.1.x Connection attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 146, SYN, Sid: 100040&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;POLICY vncviewer Java applet communication attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 2, DP: 5801, SYN, Sid: 1846&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;BACKDOOR HackAttack 1.20 Connection attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 31785, SYN, Sid: 141&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;DOS DB2 dos communication attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 6790, SYN, Sid: 1641&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;MISC Microsoft SQL Server communication attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 1433, SYN, Sid: 100205&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;P2P Napster Client Data communication attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 7777, SYN, Sid: 562&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;P2P Napster Client Data communication attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 6666, SYN, Sid: 563&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;DDOS Trin00 Attacker to Master connection attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 27665, SYN, Sid: 100007&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;DDOS mstream client to handler&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 15104, SYN, Sid: 249&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;BACKDOOR DonaldDick 1.53 connection attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 23476, SYN, Sid: 153&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;BACKDOOR WinCrash 1.0 communication attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 5714, SYN, Sid: 163&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;POLICY HP JetDirect LCD communication attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 9001, SYN, Sid: 510&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;BACKDOOR Doly 1.5 Connection attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 1015, SYN, Sid: 1985&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;BACKDOOR DoomJuice file upload attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 25, DP: 3198, SYN, Sid: 2375&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;MISC Alcatel PABX 4400 connection attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 2533, SYN, Sid: 1819&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;BACKDOOR - Dagger_1.4.0 Connection attempt&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 2589, SYN, Sid: 100038&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Signature match: &quot;DDOS mstream client to handler&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP, Chain: INPUT, Count: 1, DP: 12754, SYN, Sid: 247&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; DST: 192.168.1.255, Local IP&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Scanned ports: UDP 111-17500, Pkts: 4, Chain: INPUT, Intf: wlan0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; DST: 224.0.0.251&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Scanned ports: UDP 5353, Pkts: 2, Chain: INPUT, Intf: wlan0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; ...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; Total scan sources: 4&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; Total scan destinations: 6&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[+] These results are available in: /var/log/psad/status.out&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
And in the syslog you should have the following&amp;nbsp;lines (rsyslog in backward compatibility mode):&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Jan 11 07:53:54 krystianek psad: scan detected: 192.168.1.106 -&amp;gt; 192.168.1.255 udp: [111-17500] udp pkts: 3 DL: 5&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Jan 11 07:53:54 krystianek psad: src: 192.168.1.106 signature match: &quot;BACKDOOR Remote PC Access connection attempt&quot; (sid: 2124) tcp port: 34012&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Jan 11 07:53:54 krystianek psad: src: 192.168.1.106 signature match: &quot;MISC xfs communication attempt&quot; (sid: 1987) tcp port: 7100&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Jan 11 07:53:54 krystianek psad: src: 192.168.1.106 signature match: &quot;MISC Ghostsurf communication attempt&quot; (sid: 100203) tcp port: 7212&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Jan 11 07:53:54 krystianek psad: src: 192.168.1.106 signature match: &quot;BACKDOOR NetSphere Connection attempt&quot; (sid: 100044) tcp port: 30101&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Jan 11 07:53:54 krystianek psad: src: 192.168.1.106 signature match: &quot;DOS arkiea backup communication attempt&quot; (sid: 282) tcp port: 617&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Jan 11 07:53:54 krystianek psad: src: 192.168.1.106 signature match: &quot;SNMP AgentX/tcp request&quot; (sid: 1421) tcp port: 705&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Jan 11 07:53:54 krystianek psad: src: 192.168.1.106 signature match: &quot;P2P BitTorrent communication attempt&quot; (sid: 2181) tcp port: 6889&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Jan 11 07:53:54 krystianek psad: src: 192.168.1.106 signature match: &quot;BACKDOOR Subseven connection attempt&quot; (sid: 100207) tcp port: 27374&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Jan 11 07:53:54 krystianek psad: src: 192.168.1.106 signature match: &quot;P2P eDonkey transfer attempt&quot; (sid: 2586) tcp port: 4242&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Jan 11 07:53:54 krystianek psad: src: 192.168.1.106 signature match: &quot;POLICY vncviewer Java applet communication attempt&quot; (sid: 1846) tcp port: 5801&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Jan 11 07:53:54 krystianek psad: scan detected: 192.168.1.106 -&amp;gt; 192.168.1.106 tcp: [6-65532] flags: SYN tcp pkts: 16889 DL: 5&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Snort&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Snort is much more than port scanner detection tool. It is an Network Intrusion Detection System (NIDS) allowing to . Actually the port scan detector (sfportscan) &amp;nbsp;is only a module in it&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Installation&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The package is available in the standard repo (installation can be done via apt-get as below):&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# apt-get install snort&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2. Configuration&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2.1 Main configuration file: snort.conf&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
What you need to do is to uncomment the sfportscan preprocessor in the main configuration file (snort.conf) as below:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# cat /etc/snort/snort.conf&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# Portscan detection. &amp;nbsp;For more information, see README.sfportscan&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;preprocessor sfportscan: proto &amp;nbsp;{ all } memcap { 10000000 } sense_level { low } &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;logfile { /var/log/snort/portscan.log }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In my case I added the location of the log file (marked with red) to /var/log/snort/portscan.log. The sense_level is set to low, it is possible to set higher level. However you can expect plenty of messages concerning for example access to your samba shares (this happened in my case).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2.2 Additional configurations: snort.debian.conf&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You can configure it after installation of the snort package or also afterwards:&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# dpkg-reconfigure snort&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In my case I wanted snort to monitor two interfaces, send stats via email once per day - the content of the configuration file can be found below:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# cat /etc/snort/snort.debian.conf&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;DEBIAN_SNORT_STARTUP=&quot;boot&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;DEBIAN_SNORT_HOME_NET=&quot;192.168.0.0/16 10.0.0.0/8&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;DEBIAN_SNORT_OPTIONS=&quot;&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;DEBIAN_SNORT_INTERFACE=&quot;eth0 wlan0&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;DEBIAN_SNORT_SEND_STATS=&quot;true&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;DEBIAN_SNORT_STATS_RCPT=&quot;root@localhost&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;DEBIAN_SNORT_STATS_THRESHOLD=&quot;1&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3. Startup&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The startup of snort is controlled via init start scripts - ensure that after changing the configuration the service is restarted:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# service snort restart&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;* Stopping Network Intrusion Detection System &amp;nbsp;snort &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[ OK ]&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;* Starting Network Intrusion Detection System &amp;nbsp;snort &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[ OK ]&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;#&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Now the snort daemon should be up and running with the new configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;4. Test&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
In this case I executed the scanning from a remote host (WinXP) using nmap. The IP address of the remote host was 192.168.1.103 and the local one being scanned 192.168.1.106 (as in previous test run). The nmap parameters were the same as in case of psad, scanning was initiated from GUI.&lt;br /&gt;
&lt;br /&gt;
snort portscan log file (lines appeared almost real-time):&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Time: 01/12-12:26:15.168523&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;event_ref: 0&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;192.168.1.103 -&amp;gt; 192.168.1.106 (portscan) TCP Portscan&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Priority Count: 8&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Connection Count: 10&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;IP Count: 1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Scanner IP Range: 192.168.1.103:192.168.1.103&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Port/Proto Count: 10&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Port/Proto Range: 21:5900&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
syslog (auth.log):&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Jan 12 12:26:16 krystianek snort[1225]: [1:1421:11] SNMP AgentX/tcp request [Classification: Attempted Information Leak] [Priority: 2] {TCP} 192.168.1.103:49221 -&amp;gt; 192.168.1.106:705&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Jan 12 12:26:29 krystianek snort[1225]: [1:1420:11] SNMP trap tcp [Classification: Attempted Information Leak] [Priority: 2] {TCP} 192.168.1.103:49221 -&amp;gt; 192.168.1.106:162&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Jan 12 12:26:51 krystianek snort[1225]: [1:249:8] DDOS mstream client to handler [Classification: Attempted Denial of Service] [Priority: 2] {TCP} 192.168.1.103:49221 -&amp;gt; 192.168.1.106:15104&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The scan has been detected really fast.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Summary&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Both utilities (psad and snort) can be used to detect a port scanning activity. However they use different methods for achieving this goal. It seems that psad relies mostly on parsing iptables logs in a text format, while snort does that in binary form.&lt;br /&gt;
&lt;br /&gt;
In my opinion the biggest disadvantage of psad utility is that it requires iptables logging enabled, which might cause flood of messages going into the logs (if misconfigured or due to excessive ammount of traffic to be logged).&amp;nbsp;In case of snort there is no need to enable any logging it does the monitoring of the packtes by itself (in binary form). The danger of flooding the logs, leading to any service impact, is minimal.&lt;br /&gt;
&lt;br /&gt;
As far as automatic actions after discovering a scan are concerned psad can be configured to automatically block the IP address (from which the scan has been detected) using iptables and tcpwrapper. For details please refer the documentation I have not used this option. For snort I could not easily find anything, for sure there are additional utilities that could help to do this like snortsam:&amp;nbsp;&lt;a href=&quot;http://www.snortsam.net/&quot;&gt;http://www.snortsam.net/&lt;/a&gt;&amp;nbsp;or sagan log (auth.log) parser:&amp;nbsp;&lt;a href=&quot;http://sagan.quadrantsec.com/&quot;&gt;http://sagan.quadrantsec.com/&lt;/a&gt;.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/8209535038270168323/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2013/01/ubuntu-port-scan-detection-tools-psad.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/8209535038270168323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/8209535038270168323'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2013/01/ubuntu-port-scan-detection-tools-psad.html' title='Ubuntu: port-scan detection tools (psad, snort)'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-1305427064072904226</id><published>2012-12-01T11:51:00.002-08:00</published><updated>2012-12-01T11:53:42.060-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="music"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Ubuntu 12.10: Rip audio to wav/mp3 directly from bin/cue image</title><content type='html'>&lt;span style=&quot;font-family: inherit;&quot;&gt;Today I wanted to rip audio tracks from the image of a CD stored in cue format into a bunch of encoded audio files. Instead of burning the CD first and then ripping it into the desired format I decided to check if this can be done directly from the image file. Unfortunately I did not find a way to do it in one step but the described below two-step approach is not that bad at all.&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Ripping audio from bin/cue into wav files&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
In order to do that you need to install bchunk utility (available in the standard repo) as in the example below:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;$ sudo apt-get install bchunk&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[sudo] password for krychu:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Reading package lists... Done&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Building dependency tree &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Reading state information... Done&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;The following package was automatically installed and is no longer required:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; daemon&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Use &#39;apt-get autoremove&#39; to remove it.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;The following NEW packages will be installed:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; bchunk&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;0 upgraded, 1 newly installed, 0 to remove and 24 not upgraded.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Need to get 13.1 kB of archives.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;After this operation, 59.4 kB of additional disk space will be used.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Get:1 http://ubuntu.task.gda.pl/ubuntu/ quantal/universe bchunk amd64 1.2.0-12 [13.1 kB]&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Fetched 13.1 kB in 8s (1,468 B/s)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Selecting previously unselected package bchunk.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;(Reading database ... 548740 files and directories currently installed.)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Unpacking bchunk (from .../bchunk_1.2.0-12_amd64.deb) ...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Processing triggers for man-db ...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Setting up bchunk (1.2.0-12) ...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Afterwards you are ready to rip the audio files from the bin/cue. Please check the command below for reference:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;$ bchunk -w Audio\ Disc.bin Audio\ Disc.cue audio&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;binchunker for Unix, version 1.2.0 by Heikki Hannikainen &lt;hessu hes.iki.fi=&quot;hes.iki.fi&quot;&gt;&lt;/hessu&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Created with the kind help of Bob Marietta &lt;marietrg&gt;,&lt;/marietrg&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;partly based on his Pascal (Delphi) implementation.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Support for MODE2/2352 ISO tracks thanks to input from&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Godmar Back &lt;gback cs.utah.edu=&quot;cs.utah.edu&quot;&gt;, Colas Nahaboo &lt;colas ahaboo.com=&quot;ahaboo.com&quot;&gt;&lt;/colas&gt;&lt;/gback&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;and Matthew Green &lt;mrg eterna.com.au=&quot;eterna.com.au&quot;&gt;.&lt;/mrg&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Released under the GNU GPL, version 2 or later (at your option).&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Reading the CUE file:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Track &amp;nbsp;1: AUDIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01 00:00:00&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Track &amp;nbsp;2: AUDIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01 03:13:72&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Track &amp;nbsp;3: AUDIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01 07:05:72&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Track &amp;nbsp;4: AUDIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01 10:41:25&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Track &amp;nbsp;5: AUDIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01 14:47:30&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Track &amp;nbsp;6: AUDIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01 17:57:65&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Track &amp;nbsp;7: AUDIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01 20:56:54&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Track &amp;nbsp;8: AUDIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01 24:29:40&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Track &amp;nbsp;9: AUDIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01 28:07:22&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Track 10: AUDIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01 31:07:67&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Track 11: AUDIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01 33:39:47&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Track 12: AUDIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01 37:18:62&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Writing tracks:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;1: audio01.wav &amp;nbsp; 32/32 &amp;nbsp; MB &amp;nbsp;[********************] 100 %&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;2: audio02.wav &amp;nbsp; 39/39 &amp;nbsp; MB &amp;nbsp;[********************] 100 %&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;3: audio03.wav &amp;nbsp; 36/36 &amp;nbsp; MB &amp;nbsp;[********************] 100 %&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;4: audio04.wav &amp;nbsp; 41/41 &amp;nbsp; MB &amp;nbsp;[********************] 100 %&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;5: audio05.wav &amp;nbsp; 32/32 &amp;nbsp; MB &amp;nbsp;[********************] 100 %&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;6: audio06.wav &amp;nbsp; 30/30 &amp;nbsp; MB &amp;nbsp;[********************] 100 %&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;7: audio07.wav &amp;nbsp; 35/35 &amp;nbsp; MB &amp;nbsp;[********************] 100 %&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;8: audio08.wav &amp;nbsp; 36/36 &amp;nbsp; MB &amp;nbsp;[********************] 100 %&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;9: audio09.wav &amp;nbsp; 30/30 &amp;nbsp; MB &amp;nbsp;[********************] 100 %&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;10: audio10.wav &amp;nbsp; 25/25 &amp;nbsp; MB &amp;nbsp;[********************] 100 %&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;11: audio11.wav &amp;nbsp; 36/36 &amp;nbsp; MB &amp;nbsp;[********************] 100 %&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;12: audio12.wav &amp;nbsp; 18/18 &amp;nbsp; MB &amp;nbsp;[********************] 100 %&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;$&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Ok, now you have the audio tracks in the wav file format. in the next section you can find how to encode it into your preferred format (e.g. mp3).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Converting wav files to mp3&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
There are few utilities allowing to encode the wav file into mp3 available on linux. I used soundconverter, simple GUI tool, downloadable from the repo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;$ sudo apt-get install soundconverter&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Reading package lists... Done&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Building dependency tree &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Reading state information... Done&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;The following package was automatically installed and is no longer required:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; daemon&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Use &#39;apt-get autoremove&#39; to remove it.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;The following packages will be upgraded:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; soundconverter&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;1 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;1 not fully installed or removed.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Need to get 0 B/138 kB of archives.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;After this operation, 1,029 kB of additional disk space will be used.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;(Reading database ... 548746 files and directories currently installed.)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Preparing to replace soundconverter 2.0.1-1 (using .../soundconverter_2.0.1-1_all.deb) ...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Unpacking replacement soundconverter ...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Processing triggers for bamfdaemon ...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Rebuilding /usr/share/applications/bamf.index...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Processing triggers for desktop-file-utils ...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Processing triggers for gnome-menus ...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Processing triggers for hicolor-icon-theme ...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Processing triggers for man-db ...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Setting up soundconverter (2.0.1-1) ...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;$&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards you can start it from command line (soundconverter) or main menu and encode the wav files into desired format (mp3, ogg etc.) as presented on the figure below:&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXYve9PRJp0Qzw_qEBnmgtdEwypJ5H_2xS8yz0HNHSt9MOG5sFSod-H3BqGYDfW9dWbSJ9nidFBBP_e4YDROkZ4zMZWep2UW45ApKoG9zFUwED8buFCr_q2XlsAnMHL17YMsZYDh0eeZs/s1600/Screenshot-soundconverter.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXYve9PRJp0Qzw_qEBnmgtdEwypJ5H_2xS8yz0HNHSt9MOG5sFSod-H3BqGYDfW9dWbSJ9nidFBBP_e4YDROkZ4zMZWep2UW45ApKoG9zFUwED8buFCr_q2XlsAnMHL17YMsZYDh0eeZs/s320/Screenshot-soundconverter.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 1 Soundconverter GUI - converting wav files into mp3&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/1305427064072904226/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2012/12/ubuntu-1210-rip-audio-to-wavmp3.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/1305427064072904226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/1305427064072904226'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2012/12/ubuntu-1210-rip-audio-to-wavmp3.html' title='Ubuntu 12.10: Rip audio to wav/mp3 directly from bin/cue image'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXYve9PRJp0Qzw_qEBnmgtdEwypJ5H_2xS8yz0HNHSt9MOG5sFSod-H3BqGYDfW9dWbSJ9nidFBBP_e4YDROkZ4zMZWep2UW45ApKoG9zFUwED8buFCr_q2XlsAnMHL17YMsZYDh0eeZs/s72-c/Screenshot-soundconverter.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-3878747001708130434</id><published>2012-11-20T13:46:00.001-08:00</published><updated>2012-11-21T09:25:59.771-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="filesystem"/><category scheme="http://www.blogger.com/atom/ns#" term="os"/><category scheme="http://www.blogger.com/atom/ns#" term="recovery"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Ubuntu 12.10: Recovering removed files on FAT32 usb stick</title><content type='html'>Have you ever removed a file from your disk and later on regret it... I am pretty sure you did, recently it happened to one of my colleagues. The lost or should I say deleted file was a document (.docx) on a USB stick.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Unfortunately none of the free windows based utilities was able to do the job. We decided to give the linux based open source utilities a try. On the net I found two utilities (originating from one foremost) that could be used for that purpose (actually there were more but these looked the most promising):&lt;/div&gt;
&lt;div&gt;
1) scalpel&lt;/div&gt;
&lt;div&gt;
2) foremost&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Both are available in the Ubuntu repos, below one can find some guidelines on installing, configuring the utilities. Before we start - few things about my environment&lt;/div&gt;
&lt;div&gt;
1) &lt;b&gt;/dev/sdb1&lt;/b&gt; - usb stick device&lt;/div&gt;
&lt;div&gt;
2) &lt;b&gt;/tmp/recovery&lt;/b&gt; - the directory where the recovered files will be put into&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Please keep in mind if you have automount feature turned on (which mounts automatically the device from which you would like to recover files) please ensure that you unmount it (in my opinion it is safer to do so).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;Scalpel&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: inherit; font-size: small; font-weight: normal;&quot;&gt;Scalpel was the first utility that I decided to give a try. First you need to install the utility using the apt-get as follows:&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# apt-get install scalpel&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# dpkg -l | grep scalpel&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;ii &amp;nbsp;scalpel &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.60-1build1 &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; amd64 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A Frugal, High Performance File Carver&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Scalpel utility comes with a configuration file located at /etc/scalpel/scalpel.conf, the default configuration coming with the package has all file extensions commented out (not configured). Fortunately for most typical file types it has already samples so all you need is to edit and uncomment the lines for the file types you want to recover (in my case .doc):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# vim /etc/scalpel/scalpel.conf&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;doc &amp;nbsp; &amp;nbsp; y &amp;nbsp; &amp;nbsp; &amp;nbsp; 10000000 &amp;nbsp;\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1\x00\x00 \xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1\x00\x00 NEXT&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;doc &amp;nbsp; &amp;nbsp; y &amp;nbsp; &amp;nbsp; &amp;nbsp; 10000000 &amp;nbsp;\xd0\xcf\x11\xe0\xa1\xb1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Now all you need is to launch the scalpel utility as follows:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# scalpel /dev/sdb1 -o /tmp/recovery/scalpel&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Afterwards you should go to the output directory where you should be able to find the recovered files (in my case recovered files were placed in two folders doc-0-0 and doc-1-0):&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# ls -l&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;-rw-r--r-- 1 root root &amp;nbsp; &amp;nbsp; &amp;nbsp;760 Nov 20 13:03 audit.txt&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;drwxr-xr-x 2 root root &amp;nbsp; &amp;nbsp; 4096 Nov 20 13:05 doc-0-0&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;drwxr-xr-x 2 root root &amp;nbsp; &amp;nbsp; 4096 Nov 20 13:06 doc-1-0&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;#&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;Unfortunately it recovered only .doc files not even a single .docx !&lt;/u&gt;&lt;/b&gt; I tried to find a proper definition for .docx that could be placed in scalpel.conf file - I found one example on the net but it did not work in my case, I guess the definition was not correct.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Summarizing the scalpel tool recovered the document files (.doc) very fast (2 GB usb stick) but I was not able to make it working for .docx.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
That is why I checked the second tool...&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;Foremost&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
As mentioned before the foremost utility is available in the standard Ubuntu repos so all you need is to install it using apt-get as shown below:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;# apt-get install foremost&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;# dpkg -l | grep foremost&lt;/b&gt;&lt;/div&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;
&lt;/b&gt;
&lt;div&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;ii &amp;nbsp;foremost &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.5.7-2 &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;amd64 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;forensic program to recover lost files&lt;/b&gt;&lt;/div&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;
&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
The foremost utility has a set of predefined file formats (types) to be recovered but there is no configuration file like in scalpel. However it also makes the utility to be simpler for a first time user.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
Below you can find the command I tried - with file types doc, ole and zip.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# foremost -t doc,ole,zip -i /dev/sdb1 -o /tmp/recovery/foremost&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
It took a bit longer than in case of scalpel but... &amp;nbsp;After checking the output directory;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# ls -l&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;-rw-r--r-- 1 root root &amp;nbsp; &amp;nbsp; 2405 Nov 20 13:25 audit.txt&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;drwxr-xr-- 2 root root &amp;nbsp; &amp;nbsp; 4096 Nov 20 13:26 &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;docx&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;drwxr-xr-- 2 root root &amp;nbsp; &amp;nbsp; 4096 Nov 20 13:24 ole&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;drwxr-xr-- 2 root root &amp;nbsp; &amp;nbsp; 4096 Nov 20 13:24 zip&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;#&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Voila - &lt;u&gt;&lt;b&gt;in the docx directory I could find the docx files !&amp;nbsp;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;Summary&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
Summarizing - both tools are able to recover permanently deleted files from the filesystem (in my case FAT32). Scalpel seems to have more advanced configuration capabilities that might make it usable in advanced tasks (custom format files etc.), however one needs to perfectly know how to properly define the type, which i was not able to do for the .docx format. On the other hand if you are looking for something simple, easy and the data to files to be recovered fit into the list of standard formats (jpg,&amp;nbsp;&amp;nbsp; &amp;nbsp; gif,&amp;nbsp;png,&amp;nbsp;bmp,&amp;nbsp;avi,&amp;nbsp;exe,&amp;nbsp;mpg,&amp;nbsp;wav,&amp;nbsp;riff,&amp;nbsp;wmv,&amp;nbsp;mov,&amp;nbsp;pdf,&amp;nbsp;ole,&amp;nbsp;doc,&amp;nbsp;zip,&amp;nbsp;rar,&amp;nbsp;htm,&amp;nbsp;cpp) then foremost is the perfect utility for your needs.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/3878747001708130434/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2012/11/ubuntu-1210-recoving-removed-files-on.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/3878747001708130434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/3878747001708130434'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2012/11/ubuntu-1210-recoving-removed-files-on.html' title='Ubuntu 12.10: Recovering removed files on FAT32 usb stick'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-6026752930941650923</id><published>2012-11-15T08:42:00.001-08:00</published><updated>2012-11-15T09:20:24.117-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="kvm"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="virtualization"/><title type='text'>KVM windows guest on Ubuntu 12.10 - no sound</title><content type='html'>Recently I faced a problem that I could play sound from the KVM windows based guest machine (even though the virtual sound card AC&#39;97 was properly detected and installed). I went through several article recommending to change the type of the card, configure qemu.conf to grant access to the audio. Unfortunately none of these really helped. Then after doing all the previously described things I tried disabling the apparmor and... Now it works...&lt;br /&gt;
&lt;br /&gt;
Below I enclose more detailed procedure on what was needed in my case to make the audio&amp;nbsp;from the guest kvm machine&amp;nbsp;working.&lt;br /&gt;
&lt;br /&gt;
1.&lt;b&gt; Change the type of the card (might not be necessary)&lt;/b&gt;. In my case the es1370 was chosen&lt;br /&gt;
&lt;br /&gt;
2. &lt;b&gt;Configure qemu.conf&lt;/b&gt; - please ensure that the following entries are present in the qemu.conf configuration file. The username and groupname shall be adapted to your system configuration&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# &amp;nbsp;vim /etc/libvirt/qemu.conf&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;#&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;vnc_allow_host_audio = 1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# The user ID for QEMU processes run by the system instance.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;user = &quot;krychu&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# The group ID for QEMU processes run by the system instance.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;group = &quot;krychu&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
3. &lt;b&gt;Disable apparmor. &lt;/b&gt;Disabling armor really made the sound working on my box. Actually I completely removed the apparmor from my system (I think it is not necessary, you might try only disabling it).&lt;br /&gt;
&lt;br /&gt;
First I stopped the service:&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;# &amp;nbsp;service apparmor stop&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Next I removed it from the startup scripts&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# &amp;nbsp;update-rc.d -f apparmor remove&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Since I do not use apparmor at the moment I eventually decided to remove it completely (if it happens that you installed apparmor-utils as well you should remove it as well)&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# &amp;nbsp;apt-get remove apparmor apparmor-utils&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot...</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/6026752930941650923/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2012/11/kvm-windows-guest-on-ubuntu-1210-no.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/6026752930941650923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/6026752930941650923'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2012/11/kvm-windows-guest-on-ubuntu-1210-no.html' title='KVM windows guest on Ubuntu 12.10 - no sound'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-1362152621121442295</id><published>2012-05-04T23:26:00.001-07:00</published><updated>2012-05-05T13:14:36.072-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Ubuntu 12.04 LTS &quot;Precise Pangolin&quot;</title><content type='html'>After long time of inactivity I am hopefully back ;) I am not sure if all of you have noticed but the new 12.04 LTS Ubuntu version has been recently released (26-th of April 2012) - if you wantto find out what is new please check&amp;nbsp;&lt;a href=&quot;http://www.ubuntu.com/ubuntu/whats-new&quot;&gt;http://www.ubuntu.com/ubuntu/whats-new&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I have updated yesterday my HP EliteBook 8540W laptop from 64-bit Ubuntu 11.10&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 19px;&quot;&gt;(Oneiric Ocelot)&lt;/span&gt;, no major problems encountered so far - only minor related to ruby gems installed using the ruby gem engine (but some of them were resolved by reinstalling the gem).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/1362152621121442295/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2012/05/ubuntu-1204-lts-precise-pangolin.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/1362152621121442295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/1362152621121442295'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2012/05/ubuntu-1204-lts-precise-pangolin.html' title='Ubuntu 12.04 LTS &quot;Precise Pangolin&quot;'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-1107679660313798371</id><published>2012-05-04T23:14:00.003-07:00</published><updated>2012-05-05T13:14:11.214-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Forwarding all root mails to local user and receiving them using Thunderbird</title><content type='html'>Yesterday I checked my root local mailbox on my laptop running Ubuntu 12.04 LTS and found out 1500 hanging mails regarding problems with anacron daemon, That is quite a lot. It seems that I forgot to check the mailbox for quite long time so I decided to make it more visible to a standard user that I am using on my laptop and use the Thunderbird mail client (that I am daily using) to get them. You will need to replace the username with your username.&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;1. Create mailbox&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
If you want to create a new one:&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;root@localhost# touch /var/spool/mail/&lt;username&gt;&lt;/username&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
If you want to create one with root:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;root@localhost# cp /var/spool/mail/root /var/spool/mail/&lt;username&gt;&lt;/username&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Next create proper access permissions:&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;root@localhost# chown&amp;nbsp;&lt;username&gt;:mail /var/spool/mail/&lt;username&gt;&lt;/username&gt;&lt;/username&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;root@localhost# chmod 640 /var/spool/mail/&lt;username&gt;&lt;/username&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;2. Forward mails from root account to local users&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You need to add the following line to the .forward file in the root home directory (if it does not exists you need to create it e.g. using vim utility):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;root@localhost# cat&amp;nbsp;/root/.forward&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;username&gt;@localhost&lt;/username&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
Now the mails coming to root user should be forwarded to the user indicated via &lt;username&gt;&lt;/username&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: inherit; font-size: large;&quot;&gt;3. Configure Thunderbird&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: inherit; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
On my Ubuntu 12.04 LTS I am using Thunderbird version 11.0.1.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In order to manage your local mailbox account you need to configure a &#39;Unix Mailspool (Movemail)&#39; account. You will find it when creating an other account (File -&amp;gt; New -&amp;gt; Other Accounts...):&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrVo87kBM3nCEaTDteVx-Gsm4m1d0aZvovVwBv6exPqUtUzAx_tCOMpWiC9JYOBYm-SMBktgUhwHusLep3q_i16XMP95-w7BK_qCVvx_RWazel38AJ7oHCUx42ACvzLV-tph-xyQOkndQ/s1600/account_type.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;318&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrVo87kBM3nCEaTDteVx-Gsm4m1d0aZvovVwBv6exPqUtUzAx_tCOMpWiC9JYOBYm-SMBktgUhwHusLep3q_i16XMP95-w7BK_qCVvx_RWazel38AJ7oHCUx42ACvzLV-tph-xyQOkndQ/s320/account_type.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Figure 1 &lt;/i&gt;The Account wizard for creating the Movemail account&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;Then just follow next steps (acoount name, mail etc.). As soon as you finish, you should have your local mailbox visible in the Thunderbird main window.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;Now I hope to get more visibility especially with respect to anacron jobs running on my laptop.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/1107679660313798371/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2012/05/forwarding-all-root-mails-to-local-user.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/1107679660313798371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/1107679660313798371'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2012/05/forwarding-all-root-mails-to-local-user.html' title='Forwarding all root mails to local user and receiving them using Thunderbird'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrVo87kBM3nCEaTDteVx-Gsm4m1d0aZvovVwBv6exPqUtUzAx_tCOMpWiC9JYOBYm-SMBktgUhwHusLep3q_i16XMP95-w7BK_qCVvx_RWazel38AJ7oHCUx42ACvzLV-tph-xyQOkndQ/s72-c/account_type.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-7770009096101775452</id><published>2011-12-03T02:45:00.001-08:00</published><updated>2011-12-03T10:29:52.237-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="derby"/><category scheme="http://www.blogger.com/atom/ns#" term="jmeter"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>JMeter DB benchmarks: Embedded Apache Derby vs. Network Apache Derby</title><content type='html'>The Apache Derby database as you probably know from my previous posts has two modes of operation:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;embedded&lt;/b&gt; - in which the datbase itself is started and owned by the process starting it (the only way to connect to it is via the owning process, moreover there is no other process that can open the database from outside world)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;network server - &lt;/b&gt;the database itself is started as a standalone process to which one can connect via TCP/IP (JDBC, ij or any other Derby client). It allows multiconnection, multiuser mode of working. This mode is very similar to what other database are offering.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
This article will cover the description howto start and benchmark the existing Derby database in the network server mode.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Network server Derby&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
It is not that difficult actually. What you need is the binary that you can download from the &lt;a href=&quot;http://db.apache.org/derby/derby_downloads.html&quot;&gt;ApacheDerby web site&lt;/a&gt;. Next there is a great tutorial on how to startup Derby in network mode:&amp;nbsp;&lt;a href=&quot;http://db.apache.org/derby/papers/DerbyTut/ns_intro.html&quot;&gt;Apache Derby tutorial&lt;/a&gt;.&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;u&gt;&lt;b&gt; One remark - in my case (Derby 10.8.2.2) it was important to set the DERBY_HOME variable (not the DERBY_INSTALL)&lt;/b&gt;&lt;/u&gt;.&lt;/span&gt; That is mainly because the :&amp;nbsp;setNetworkServerCP script was expecting this one rather than DERBY_INSTALL.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;#!/bin/sh&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# Licensed to the Apache Software Foundation (ASF) under one&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# or more contributor license agreements. &amp;nbsp;See the NOTICE file&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# distributed with this work for additional information&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# regarding copyright ownership. &amp;nbsp;The ASF licenses this file&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# to you under the Apache License, Version 2.0 (the&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# &quot;License&quot;); you may not use this file except in compliance&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# with the License. &amp;nbsp;You may obtain a copy of the License at&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# &amp;nbsp; http://www.apache.org/licenses/LICENSE-2.0&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# Unless required by applicable law or agreed to in writing,&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# software distributed under the License is distributed on an&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# KIND, either express or implied. &amp;nbsp;See the License for the&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# specific language governing permissions and limitations&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# under the License.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;if [ -z &quot;$DERBY_HOME&quot; ]; then&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; echo &quot;Error: DERBY_HOME is not set. Please set the DERBY_HOME environment variable&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; echo &quot;to the location of your Derby installation.&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; return 1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;fi&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;export CLASSPATH=&quot;${DERBY_HOME}/lib/derbynet.jar:${DERBY_HOME}/lib/derbytools.jar:${CLASSPATH}&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;In short you need to invoke the following commands:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;$ export DERBY_HOME=`/home/krychu&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;b&gt;/mediate/experiments/derby/binaries/db-derby-10.8.2.2-bin&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;`&lt;/b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;$ cd bin&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;$ . ./setNetworkClientCP&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;$ ./startNetworkServer ∓&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;[1] 12629&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;$ Sat Dec 03 13:21:59 CET 2011 : Security manager installed using the Basic Server security policy.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Sat Dec 03 13:22:00 CET 2011 : Apache Derby Network Server - 10.8.2.2 - (1181258) started and ready to accept connections on port 1527&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Migrating existing DB&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
For a totally new installation you would usually create a completely new db, create the corresponding data model and do the provisioning but for the existing db (when you change only the mode of working or you just upgrade to a newer version) you might want to use/migrate the existing Apache Derby database to the network server mode.&lt;/div&gt;
&lt;div&gt;
In my&amp;nbsp;exercise I wanted to migrate the DB from Apache Derby version 10.3.3.0 (so far use only in embedded mode) to 10.8.2.2&amp;nbsp;. In order to do that you need only to copy the database directory to $DERBY_HOME/bin one:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;#&amp;nbsp;cp -Rf /home/krychu/mediate/experiments/derby/mzdb $DERBY_HOME/bin&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;JMeter enhancements&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Now you need to add the JDBC driver for connecting to the Derby network server. Again you only need to copy a couple of jars to the JMeter lib directory:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;#cp $DERBY_HOME/lib/* $JMETER_HOME/lib/&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit; font-size: large;&quot;&gt;Configure the JDBC connection&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Make sure that the Derby network server is running. By default it should open the 1527 port for incoming connections. Good approach is to make a simple connection test using the ij as in the example below:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;$ $DERBY_HOME/bin/ij&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;ij version 10.8&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;ij&amp;gt; connect &#39;jdbc:derby://localhost:1527/mzdb;create=false;user=mzadmin;password=mz&#39;;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;ij&amp;gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If everything is ok it is time to start the JMeter and define the proper JDBC URL. I took the testcase defined in the previous article and changed only the embedded mode into network mode by disabling the database configuration for embedded mode and adding a new one with the parameters as below:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmg-jdwWbCSNDT0JfDkS6u7yNO5b89CeuzDMvdozhfVA_1r7Blb52V9WTBOZRZoG5tV09S3VvMeMt6MwRfE97nlYe7O7UsWcBXap7rFiL5bJX0bBs5zOhNN3oKjh4xUy3QNnHEd5QgI0A/s1600/Screenshot-15.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;96&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmg-jdwWbCSNDT0JfDkS6u7yNO5b89CeuzDMvdozhfVA_1r7Blb52V9WTBOZRZoG5tV09S3VvMeMt6MwRfE97nlYe7O7UsWcBXap7rFiL5bJX0bBs5zOhNN3oKjh4xUy3QNnHEd5QgI0A/s400/Screenshot-15.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;JDBC connection configuration&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
As I mentioned the test is organized as in previous article:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;read access&lt;/b&gt; - single, simple search by indexed field&lt;/li&gt;
&lt;li&gt;&lt;b&gt;write access&lt;/b&gt; - single write operation into one table&lt;/li&gt;
&lt;li&gt;&lt;b&gt;backup&lt;/b&gt; - in the background the backup procedure is invoked (total size of db: 285 MB)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
All three groups are running in parallel.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvLuM7pRRAwmhCtgyevhjC2G2nWLrJI3MSk8bexzjO4aS8ZYOCRDrIi9G4iZnYU3_bPsVMDravPsdRl8e55rcCoqKElpXMFqRMe6P1_tOLIb51dSiuuP4UQcY7VgnoOBVbuWcKkerP7iM/s1600/Screenshot-16.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvLuM7pRRAwmhCtgyevhjC2G2nWLrJI3MSk8bexzjO4aS8ZYOCRDrIi9G4iZnYU3_bPsVMDravPsdRl8e55rcCoqKElpXMFqRMe6P1_tOLIb51dSiuuP4UQcY7VgnoOBVbuWcKkerP7iM/s400/Screenshot-16.png&quot; width=&quot;343&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Apache Derby benchmark - JMeter testcase&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now everything is ready for the first benchmark. Do not forget to start the agents if you want to also monitor the CPU, memory, network and disk activity.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Benchmark results&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Below one can find the tables that summarizes the results obtained on HP EliteBook 8540W machine running Ubuntu 11.04 Natty. As you see the results are similar, slightly better for network server but I would still say that in the range of errors. As expected the network server consumes much more &amp;nbsp;network bandwidth (also a proof that the communication goes over loopback interface), moreover it will increase with the number of transactions.&lt;br /&gt;
As described previously the test has been invoked when all types of accesses triggered by separate thread groups. The backup procedure has only effect on the number of writes (as expected) in my opinion since both are I/O consuming. During the tests when the backup was initiated the write rate was decreased by a factor of ~3 but they were still processed (not a single one suspended or rejected). As far as reads are concerned there was no difference measured.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif;&quot;&gt;Category&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif;&quot;&gt;Apache Derby embedded&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif;&quot;&gt;Apache Derby - network server&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Read - single row during backup (Tps)&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
27 000&lt;/div&gt;
&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
27 000&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Read - single row (Tps)&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
27 000&lt;/div&gt;
&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
27 000&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Write - single row during backup (Tps)&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
22&lt;/div&gt;
&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
23&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Write - single row (Tps)&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
65&lt;/div&gt;
&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
70&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Network bandwidth - lo during backup (KB/s)&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
2&lt;/div&gt;
&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
15&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Network bandwidth - lo (KB/s)&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
2&lt;/div&gt;
&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
42&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Backup time (s)&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
35&lt;/div&gt;
&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
32&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Summary&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;As far as performance is concerned it does not make that big difference if Apache Derby is running in embedded mode or in standalone (network server running on the same host - communication via localhost) - at least on my small machine (HP EliteBook 8540W). It might be that the differences will be more visible when larger&amp;nbsp;amount&amp;nbsp;of data are being transferred over the network - using queries returning multiple rows. However taking into account other aspects like: allowing&amp;nbsp;simultaneous&amp;nbsp;access by multiple clients, better&amp;nbsp;serviceability, easier administration, configuration and&amp;nbsp;flexibility&amp;nbsp;in deployment (it might run on the same server or on remote one) - I would choose the network server mode.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/7770009096101775452/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/12/jmeter-db-benchmarks-embedded-apache.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/7770009096101775452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/7770009096101775452'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/12/jmeter-db-benchmarks-embedded-apache.html' title='JMeter DB benchmarks: Embedded Apache Derby vs. Network Apache Derby'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmg-jdwWbCSNDT0JfDkS6u7yNO5b89CeuzDMvdozhfVA_1r7Blb52V9WTBOZRZoG5tV09S3VvMeMt6MwRfE97nlYe7O7UsWcBXap7rFiL5bJX0bBs5zOhNN3oKjh4xUy3QNnHEd5QgI0A/s72-c/Screenshot-15.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-862608687398058095</id><published>2011-11-19T13:48:00.001-08:00</published><updated>2011-11-24T13:18:31.537-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="derby"/><category scheme="http://www.blogger.com/atom/ns#" term="jmeter"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><title type='text'>Using JMeter for DB (Apache Derby) benchmarking</title><content type='html'>Recently I had to do check or I was for support in a case where the Apache Derby was used in embedded mode. The questions were related to performance, demiensioning and also some non-functional aspects like backup and restore. Going through documentation is one thing but being able to verify some performance figures is another. This article will describe how I used the JMeter to setup environment measuring reads, writes and doing the backup in the background (to check the impact on processed transactions) for the Apache Derby working in the embedded mode (the external one is out of scope of this article).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Obtaining JMeter&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Although the JMeter is available in the repos for most popular distribtions (e.g. Ubuntu), I recommend to download it from the webpage (newer version, more features etc.): &lt;a href=&quot;http://jmeter.apache.org/&quot;&gt;http://jmeter.apache.org/&lt;/a&gt; - the installation is about unzipping an archive (you can use e.g. unzip).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Instaling JMeter&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
After unpacking you will need to add the jdbc driver to the classpath - in my case it basically meant that I needed to copy the derby.jar into the lib subdirectory of jmeter. If you already have a derby database on which you want to do benchmark (my case) it would be better to find the Derby version matching the one which was used to create the database. As I mentioned before in this article the embedded mode for derby will be used.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Install additional chart/monitoring JMeter plugins&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
There is a set of nice, additional plugins available on google code: &lt;a href=&quot;http://code.google.com/p/jmeter-plugins/&quot;&gt;http://code.google.com/p/jmeter-plugins/&lt;/a&gt; that I would recommend to install. Not only they provide nicer charting listeners but also monitoring capabilities (each system to be monitor will need to have a special agent started). The installation procedure is described in the README and on the webpage.&lt;br /&gt;
What I did is after downloading I unpacked the archive to a subdirectory under JMETER_HOME. Next I copied the JMeterPlugins.jar to the lib/ext subdirectory. That&#39;s it, the new plugins should be available now.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Building the testcase&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Ok, now you are ready to prepare the testcase.&lt;br /&gt;
&lt;br /&gt;
1. &lt;b&gt;Start the JMeter&lt;/b&gt;:&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# $JMETER_HOME/bin/jmeter.sh&lt;/span&gt;&lt;/span&gt;&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
2. &lt;b&gt;Add the database (ApacheDerby) connection definition&lt;/b&gt; (JDBC Connection Definition) as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDI8xgFE5a22nZoFzvl6_2j88uXGakkmj9G8AvFTOE4qulrbstI0ypo2eVkht_mC1PIjgrH5UynHfI81T3PJZZZ2ANMOYGdDpynVhFJfDnMlrkWyVWDowgt_GeVHrD3JOs_-jSeKX0Vtk/s1600/Screenshot-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDI8xgFE5a22nZoFzvl6_2j88uXGakkmj9G8AvFTOE4qulrbstI0ypo2eVkht_mC1PIjgrH5UynHfI81T3PJZZZ2ANMOYGdDpynVhFJfDnMlrkWyVWDowgt_GeVHrD3JOs_-jSeKX0Vtk/s1600/Screenshot-1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The database URL in case of embedded derby shall contain the path to the database location on the filesystem.&lt;br /&gt;
The JDBC Driver class is the driver class - here a specific one for Derby.&lt;br /&gt;
In addition one needs to provide username and password for connecting to the database.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3. Add thread pools and samplers&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I added three different thread pools: one for testing the reads, one for testing the writes and one (single threaded) for backup. As you see all are using the same JDBC connection definition - defined on the global level&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfQ0I9sUGmRfeQYEoM8Ht1Xl5MVsE8Up-6DSGzKuTSCbBxxO5A067bDXpvRAQsfuiJAf0kHCBTL7tKkhJh1G50tHV0gIDFih0Eyy_Bs0waIR1fG1JmDoygNBj8LyaF42Q5-gmGCLiaF4k/s1600/Screenshot-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;340&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfQ0I9sUGmRfeQYEoM8Ht1Xl5MVsE8Up-6DSGzKuTSCbBxxO5A067bDXpvRAQsfuiJAf0kHCBTL7tKkhJh1G50tHV0gIDFih0Eyy_Bs0waIR1fG1JmDoygNBj8LyaF42Q5-gmGCLiaF4k/s400/Screenshot-2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;4. Add JDBC request samplers&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Inside each thread pool you should define the JDBC request sampler, responsible for generating the appropriate traffic type. Below you can find example used by me for read, write and starting the backup:&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqWsnvdW0mlXJ6tl5dVuyPgNf7BhuHEwWwqhMjhQb7LHzju6ssxWRu59JommHdeBnUfRoXpAy3OQZfMk5Ss5l_XsCztm4Mpf75lF7Mi2BwO5Z7xJcygBRgzkt8BbWLuakN-IiLhANIRuQ/s1600/Screenshot-8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqWsnvdW0mlXJ6tl5dVuyPgNf7BhuHEwWwqhMjhQb7LHzju6ssxWRu59JommHdeBnUfRoXpAy3OQZfMk5Ss5l_XsCztm4Mpf75lF7Mi2BwO5Z7xJcygBRgzkt8BbWLuakN-IiLhANIRuQ/s400/Screenshot-8.png&quot; width=&quot;368&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;The JDBC request sampler for read access&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQJnY3RhWDpCqGMh3JsuHGbcCoiH005Y0mJpGInd1M-dzzkztGM-gUMH9klnYflln4TP32ddSIevGDANVkc3g1603zbTLwTmGqqWVQT38IDRAhvAq94tleLoDmJ6IiBMOfML-ZyFYH-T0/s1600/Screenshot-9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;392&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQJnY3RhWDpCqGMh3JsuHGbcCoiH005Y0mJpGInd1M-dzzkztGM-gUMH9klnYflln4TP32ddSIevGDANVkc3g1603zbTLwTmGqqWVQT38IDRAhvAq94tleLoDmJ6IiBMOfML-ZyFYH-T0/s400/Screenshot-9.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;The JDBC request sampler for write access&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHBusIZqGEP4q6gtELKOx7_Nu5DcuylBTmxtwiWcfXLTr_UdrEhX90rSORG4Zd5Rpnsi9ganfE2hqpZM3nU1uE_xd44qFdOKcnSJnJ2GDafgx6-8OGeNRmi85ipB_MxjWmqsgdn65MKQ4/s1600/Screenshot-10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;390&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHBusIZqGEP4q6gtELKOx7_Nu5DcuylBTmxtwiWcfXLTr_UdrEhX90rSORG4Zd5Rpnsi9ganfE2hqpZM3nU1uE_xd44qFdOKcnSJnJ2GDafgx6-8OGeNRmi85ipB_MxjWmqsgdn65MKQ4/s400/Screenshot-10.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;The JDBC request sampler for initiating the backup&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;5. Add listeners for summary, CPU, memory, IO statistics.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
For getting the summary you should add to each thread group the so called &#39;Aggregate report&#39; listener. It will provide statistics like: number of samples, average response time, q90, median, min, max, error rate and throughput.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6ynJMgMf29VgsyTw1JC_B0-d7dCp_nhBuQIvMvw-zYMJYW93-J4EBLiFS0iEe_BegsGaF0YhNw7ajNxYUVzPQuhPFQMlNAwROt-MkV4R1kaRgYufn81Iixk2wGBd3xHRnNMvEyiLzFUs/s1600/Screenshot-11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6ynJMgMf29VgsyTw1JC_B0-d7dCp_nhBuQIvMvw-zYMJYW93-J4EBLiFS0iEe_BegsGaF0YhNw7ajNxYUVzPQuhPFQMlNAwROt-MkV4R1kaRgYufn81Iixk2wGBd3xHRnNMvEyiLzFUs/s640/Screenshot-11.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Example aggregate report listener for read access&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
In addition on the top level you should add the collectors for CPU, memory and disk, network - these are available after installing the additional google code plugin in the Listener section. The important thing is you need to start the agent on the monitored node as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;$ $JMETER_PLUGIN/serverAgent/startAgent.sh&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;JMeterPlugins Agent version 1.4&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;No port specified, the default value is used: 4444&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;------ File Systems init: ------&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;File System detected: /dev/mapper/krystianek-root&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;File System detected: /dev/sda1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;--------------------------------&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;--- Network Interfaces init: ---&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Network interface detected: lo&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Network interface detected: wlan0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Network interface detected: virbr1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Network interface detected: virbr2&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Network interface detected: virbr0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Network interface detected: tun0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Network interface detected: eth0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;--------------------------------&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Waiting for incoming connections...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Client id=0 connected!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Client id=1 connected!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Client id=2 connected!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Client id=3 connected!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Client id=3 disconnected!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Client id=0 disconnected!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Client id=1 disconnected!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Client id=2 disconnected!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
And the statistics collector shall be configured to connect to that agent:&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7s5k7upP6_KwqC7nzrDfB84zM-nHsEqstAjwTZYX0cDDo1m-Uj230XgYu_4IgLVl7Tpgmdp5KOPjcN3QsNkauo8ixEWCr-TWeYGGYVoT2DkP8M_qS9dAqTDUSNwfmvUJAqOGVGZT9JvM/s1600/Screenshot-13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;427&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7s5k7upP6_KwqC7nzrDfB84zM-nHsEqstAjwTZYX0cDDo1m-Uj230XgYu_4IgLVl7Tpgmdp5KOPjcN3QsNkauo8ixEWCr-TWeYGGYVoT2DkP8M_qS9dAqTDUSNwfmvUJAqOGVGZT9JvM/s640/Screenshot-13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Example listener for collecting disk, network statistics&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBJRXc_gILChPbS3m4AmIqQDIpzLAmSC462AbmClroN7_E_79pMm3GuGcObVF3s_nkW55-suRUPfV86Nkjb_fNUCPUvranqYD8nsqkzPMyWenHjLLgBFCtH7quraZa45rV9nhXG-4313s/s1600/Screenshot-14.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBJRXc_gILChPbS3m4AmIqQDIpzLAmSC462AbmClroN7_E_79pMm3GuGcObVF3s_nkW55-suRUPfV86Nkjb_fNUCPUvranqYD8nsqkzPMyWenHjLLgBFCtH7quraZa45rV9nhXG-4313s/s640/Screenshot-14.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Example listener for collecting CPU statistics&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
I also recommend to put the Transaction per second listener from google code to each thread pool section, which will provide nice charts for per second statistics.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw2I9Jr_-XXnHxKtXbI9_rdSIu7tbjai1pbQGNKsLmJz8RsSAarw9lgbw346g44hlZRWx20voTEwixOKmszLEeyQkMIVW9OzuYlqy7xlDRbcqbzH6s5twnUGUVxD5cng6aTqQpb3eT1B4/s1600/Screenshot-12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;425&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw2I9Jr_-XXnHxKtXbI9_rdSIu7tbjai1pbQGNKsLmJz8RsSAarw9lgbw346g44hlZRWx20voTEwixOKmszLEeyQkMIVW9OzuYlqy7xlDRbcqbzH6s5twnUGUVxD5cng6aTqQpb3eT1B4/s640/Screenshot-12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Example lstener providing graphical represenation of throughput per second&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Now you just have to start the execution of the test and do the measurements;)&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/862608687398058095/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/11/using-jmeter-for-db-apache-derby.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/862608687398058095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/862608687398058095'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/11/using-jmeter-for-db-apache-derby.html' title='Using JMeter for DB (Apache Derby) benchmarking'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDI8xgFE5a22nZoFzvl6_2j88uXGakkmj9G8AvFTOE4qulrbstI0ypo2eVkht_mC1PIjgrH5UynHfI81T3PJZZZ2ANMOYGdDpynVhFJfDnMlrkWyVWDowgt_GeVHrD3JOs_-jSeKX0Vtk/s72-c/Screenshot-1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-5813634068488006288</id><published>2011-11-12T04:32:00.001-08:00</published><updated>2011-11-12T05:23:07.605-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="filesystem"/><category scheme="http://www.blogger.com/atom/ns#" term="kvm"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="lvm"/><category scheme="http://www.blogger.com/atom/ns#" term="virtualization"/><title type='text'>Resizing root filesystem: KVM, LVM and EXT4</title><content type='html'>Ever faced a problem that you run out of the root filesystem space? I recently faced that problem on my KVM CentOS 6.0 box (a lot of experiments done on it) and wanted to solve it without reinstallation of the system. It seems to be possible without losing any data and not that difficult on all levels:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;KVM virtual disk size&lt;/li&gt;
&lt;li&gt;LVM volume group size&lt;/li&gt;
&lt;li&gt;EXT4 filesystem size&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Below you can find the instruction on how to do that:&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
1. &lt;b&gt;Resize the KVM virtio disk image&lt;/b&gt;. First one need to resize the virtual disk for the KVM. In order to do that you shoudl create a new add on raw disk and append it to the existing disk image. I recommend to first move the original disk for the backup purposes. The steps to be done are shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;root@krystianek:/var/lib/libvirt/images# qemu-img create -f raw addon.raw 4G&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Formatting &#39;addon.raw&#39;, fmt=raw size=4294967296&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;root@krystianek:/var/lib/libvirt/images# mv centos6.img centos6.img.backup&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;root@krystianek:/var/lib/libvirt/images# cat centos6.img.backup addon.raw &amp;gt; centos6&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;centos6.img.backup &amp;nbsp; &amp;nbsp;centos6-oracle-1.img &amp;nbsp;centos6-oracle-2.img &amp;nbsp;centos6-oracle.img &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;root@krystianek:/var/lib/libvirt/images# cat centos6.img.backup addon.raw &amp;gt; centos6.img&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
2. &lt;b&gt;Boot from &amp;nbsp;LiveCD.&lt;/b&gt;&amp;nbsp;It is required since you will be modyfing the root filesystem&#39;s volume group if you plan to modify another volume group/filesystem it may not be required. I used the CentOS LiveCD in order to do that.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
3. &lt;b&gt;Create a new partition.&lt;/b&gt;&amp;nbsp;Create a new partition from the free disk space (4G). In my case I created a /dev/vda3 partition using the CentOS graphical disk utility.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
4. &lt;b&gt;Extend the LVM volume group&lt;/b&gt;. Add the newly /dev/vda3 device to the volume group&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;[root@livecd ~]# vgdisplay&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; --- Volume group ---&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; VG Name&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; vg_centos6hosta&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; System ID&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;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Format&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; lvm2&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Metadata Areas&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Metadata Sequence No&amp;nbsp; 3&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; VG Access&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read/write&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; VG Status&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; resizable&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; MAX LV&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; 0&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Cur LV&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; 2&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Open LV&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; 1&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Max PV&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; 0&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Cur PV&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; 1&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Act PV&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; 1&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; VG Size&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; 7.51 GiB&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; PE Size&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; 4.00 MiB&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Total PE&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; 1922&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Alloc PE / Size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1922 / 7.51 GiB&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Free&amp;nbsp; PE / Size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 / 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; VG UUID&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; DIeDAo-5Y1O-GEC0-JCb6-keUy-&lt;/span&gt;&lt;wbr style=&quot;background-color: white;&quot;&gt;&lt;/wbr&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;8Yc1-MhRBdN&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;[root@livecd ~]# vgextend vg_centos6hosta /dev/vda3&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; No physical volume label read from /dev/vda3&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Physical volume &quot;/dev/vda3&quot; successfully created&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Volume group &quot;vg_centos6hosta&quot; successfully extended&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;[root@livecd ~]# vgdisplay&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; --- Volume group ---&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; VG Name&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; vg_centos6hosta&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; System ID&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;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Format&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; lvm2&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Metadata Areas&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Metadata Sequence No&amp;nbsp; 4&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; VG Access&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read/write&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; VG Status&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; resizable&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; MAX LV&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; 0&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Cur LV&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; 2&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Open LV&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; 1&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Max PV&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; 0&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Cur PV&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; 2&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Act PV&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; 2&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; VG Size&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; 11.50 GiB&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; PE Size&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; 4.00 MiB&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Total PE&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; 2945&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Alloc PE / Size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1922 / 7.51 GiB&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Free&amp;nbsp; PE / Size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1023 / 4.00 GiB&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; VG UUID&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; DIeDAo-5Y1O-GEC0-JCb6-keUy-&lt;/span&gt;&lt;wbr style=&quot;background-color: white;&quot;&gt;&lt;/wbr&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;8Yc1-MhRBdN&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;[root@livecd ~]# lvresize -L+3995M /dev/mapper/vg_centos6hosta-&lt;/span&gt;&lt;wbr style=&quot;background-color: white;&quot;&gt;&lt;/wbr&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;lv_root&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Rounding up size to full physical extent 3.90 GiB&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Extending logical volume lv_root to 8.50 GiB&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;&amp;nbsp; Logical volume lv_root successfully resized&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #3d85c6;&quot;&gt;[root@livecd ~]#&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
5. &lt;b&gt;Resize the filesystem residing on the LVM volume&lt;/b&gt;. Last but not least you have to resize the filesystem residing on the LVM volume group. For ext4 you can do it as follows (where vg_centos6hosta-lv_root is the root fs volume group):&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;[root@livecd ~]# e2fsck -f /dev/mapper/vg_centos6hosta-&lt;/span&gt;&lt;wbr style=&quot;background-color: white;&quot;&gt;&lt;/wbr&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;lv_root&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;e2fsck 1.41.12 (17-May-2010)&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;_CentOS-6.0-x86_: recovering journal&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;Clearing orphaned inode 131145 (uid=27, gid=27, mode=0100600, size=0)&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;Clearing orphaned inode 131144 (uid=27, gid=27, mode=0100600, size=0)&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;Clearing orphaned inode 131140 (uid=27, gid=27, mode=0100600, size=0)&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;Clearing orphaned inode 131136 (uid=27, gid=27, mode=0100600, size=0)&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;Clearing orphaned inode 131130 (uid=27, gid=27, mode=0100600, size=0)&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;Pass 1: Checking inodes, blocks, and sizes&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;Pass 2: Checking directory structure&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;Pass 3: Checking directory connectivity&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;Pass 4: Checking reference counts&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;Pass 5: Checking group summary information&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;_CentOS-6.0-x86_: ***** FILE SYSTEM WAS MODIFIED *****&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;_CentOS-6.0-x86_: 139003/303104 files (0.1% non-contiguous), 1195597/1206272 blocks&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;[root@livecd ~]# resize2fs /dev/mapper/vg_centos6hosta-&lt;/span&gt;&lt;wbr style=&quot;background-color: white;&quot;&gt;&lt;/wbr&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;lv_root&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;resize2fs 1.41.12 (17-May-2010)&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;Resizing the filesystem on /dev/mapper/vg_centos6hosta-&lt;/span&gt;&lt;wbr style=&quot;background-color: white;&quot;&gt;&lt;/wbr&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;lv_root to 2229248 (4k) blocks.&lt;/span&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;The filesystem on /dev/mapper/vg_centos6hosta-&lt;/span&gt;&lt;wbr style=&quot;background-color: white;&quot;&gt;&lt;/wbr&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;lv_root is now 2229248 blocks lo&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/5813634068488006288/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/11/resizing-root-filesystem-kvm-lvm-and.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/5813634068488006288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/5813634068488006288'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/11/resizing-root-filesystem-kvm-lvm-and.html' title='Resizing root filesystem: KVM, LVM and EXT4'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-4700041073813183866</id><published>2011-11-11T02:29:00.001-08:00</published><updated>2011-11-11T09:15:08.204-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="rpm"/><title type='text'>CentOS: Creating rpm packages (ceph-0.38)</title><content type='html'>This article describes step by step how to create own packages on the example of the ceph package (0.38)&lt;br /&gt;
&lt;br /&gt;
1. &lt;b&gt;Create the directory structure&lt;/b&gt; - the easiest way is to install the rpmdevtools and use it to create the structure:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost /]# yum install rpmdevtools&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
2. &lt;b&gt;Download the sources&lt;/b&gt; as a tar balls and put it to the SOURCES directory:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost /]#&amp;nbsp;cd ~/rpmbuild/SOURCES&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost rpmbuild]#&amp;nbsp;wget&amp;nbsp;http://ceph.newdream.net/download/ceph-0.38.tar.gz&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
3. &lt;b&gt;Prepare and customize the spec&lt;/b&gt;. If you want to pass some options to the configure utility just customize the configure options and specify the directories to be included in the rpm package (all marked with red color below). Check also if the source tar archive name matches the one placed in the SOURCES folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost rpmbuild]# vim ./SPECS/ceph.spec&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Name:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ceph&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Version:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;0.38&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Release:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;1%{?dist}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Summary:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Krystianek&#39;s package&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Group:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;HA-experiments&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;License:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GPL&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;URL:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;http://http://ceph.newdream.net/&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;Source0:&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #3d85c6; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;ceph-0.38.tar.gz&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;BuildRoot:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;%description&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;CEPH utilities&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;%prep&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;%setup -q&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;%build&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;%configure &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;--without-tcmalloc&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;make %{?_smp_mflags}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;%install&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;rm -rf $RPM_BUILD_ROOT&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;make install DESTDIR=$RPM_BUILD_ROOT&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;%clean&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;rm -rf $RPM_BUILD_ROOT&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;%files&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;%defattr(-,root,root,-)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;%doc&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;/etc/&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;/var/&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;/usr/&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;%changelog&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. &lt;b&gt;Create the rpm&lt;/b&gt;. Go to the directory structure root and invoke the rpmbuild to create the rpm&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost rpmbuild]# cd ~/rpmbuild&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost rpmbuild]# rpmbuild -ba SPECS/ceph.spec&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You might need to set the mask for RPATH to ignore the errors regarding the standard paths:&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;[root@localhost rpmbuild]#&amp;nbsp;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;QA_RPATHS=$[ 0x0001|0x0010 ]&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt; rpmbuild -ba SPECS/ceph.spec&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
5. &lt;b&gt;Install the previously create rpm&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost rpmbuild]# rpm -i ./RPMS/x86_64/ceph-0.38-1.el6.x86_64.rpm&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Remarks:&lt;/i&gt;&lt;/b&gt; For cuilding the ceph you need additional development packages for tcmalloc (part of google performance, can be downloaded from&amp;nbsp;&lt;a href=&quot;http://code.google.com/p/google-perftools/&quot;&gt;http://code.google.com/p/google-perftools/&lt;/a&gt;) and libatomic (available in the standard CentOS repo as libatomic_ops-devel)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/4700041073813183866/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/11/centos-creating-rpm-packages-ceph-038.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/4700041073813183866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/4700041073813183866'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/11/centos-creating-rpm-packages-ceph-038.html' title='CentOS: Creating rpm packages (ceph-0.38)'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-152149963531090559</id><published>2011-11-05T11:32:00.000-07:00</published><updated>2012-03-11T10:41:34.868-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="kernel"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>CentOS 6.0: Updating the kernel to 3.0.8</title><content type='html'>I wanted to continue the work on the clustered filesystems and found out that linux kernel since 2.6.37 provides additional cluster filesystem ceph (&lt;a href=&quot;http://ceph.newdream.net/&quot;&gt;http://ceph.newdream.net/&lt;/a&gt;) to the previosuly available gfs (gfs2), ocfs2. The description sounds promising so why not to give it a try.&lt;br /&gt;
However in my virtualized environment I had only CentOS&#39;es (one running the latest 6.0) with much older kernel version (2.6.32). The standard repositories does not contain any updates and the only way to run a newer version is to download it from kernel.org and compile it by yourself. The instruction below describes the steps that I did in order to have the kernel 3.0.8 on the CentOS 6.0.&lt;br /&gt;
&lt;br /&gt;
1. Prepare disk space for kernel sources, compilation output and produced rpm packages (about 5GB needed for creating the binary package, header and sources).&lt;br /&gt;
2. Download the sources from the kernel.org and unpack them. You can do it on the fly using the following command:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost tmp]# wget -O - http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.0.8.tar.bz2 | bzip2 -d - | tar -xvf -&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
3. Now copy your existing configuration file and adapt it to your needs as described in step 4 (I used the menuconfig and loaded the file):&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;[root@localhost linux-3.0.8]# cp /boot/config-2.6.32-71.29.1.el6.x86_64 .&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;[root@localhost linux-3.0.8]# make menuconfig&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; HOSTCC &amp;nbsp;scripts/basic/fixdep&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; HOSTCC &amp;nbsp;scripts/kconfig/conf.o&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; HOSTCC &amp;nbsp;scripts/kconfig/lxdialog/checklist.o&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; HOSTCC &amp;nbsp;scripts/kconfig/lxdialog/inputbox.o&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; HOSTCC &amp;nbsp;scripts/kconfig/lxdialog/menubox.o&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; HOSTCC &amp;nbsp;scripts/kconfig/lxdialog/textbox.o&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; HOSTCC &amp;nbsp;scripts/kconfig/lxdialog/util.o&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; HOSTCC &amp;nbsp;scripts/kconfig/lxdialog/yesno.o&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; HOSTCC &amp;nbsp;scripts/kconfig/mconf.o&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; SHIPPED scripts/kconfig/zconf.tab.c&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; SHIPPED scripts/kconfig/lex.zconf.c&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; SHIPPED scripts/kconfig/zconf.hash.c&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; HOSTCC &amp;nbsp;scripts/kconfig/zconf.tab.o&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; HOSTLD &amp;nbsp;scripts/kconfig/mconf&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;scripts/kconfig/mconf Kconfig&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;#&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;# configuration written to config-3.0.4&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;#&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;*** End of the configuration.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;*** Execute &#39;make&#39; to start the build or try &#39;make help&#39;.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;[root@localhost linux-3.0.8]#&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
4. Apply the changes. I have added support for ceph, ocfs2 and added the module to dump the current kernel config to the /proc filesystem.&lt;br /&gt;
&lt;br /&gt;
5. Now you are ready to compile and prepare the rpms containing the new kernel. I used the target to build only binary packages (you can also create the sources package). The rpms will be created in user&#39;s home directory: $HOME/rpmbuild/:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost linux-3.0.8]# make help | grep rpm&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; rpm-pkg &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Build both source and binary RPM kernel packages&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; binrpm-pkg &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Build only the binary kernel package&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost linux-3.0.8]# time make binrpm-pkg&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;/bin/sh /mnt/tmp/linux-3.0.8/scripts/package/mkspec prebuilt &amp;gt; /mnt/tmp/linux-3.0.8/binkernel.spec&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;make KBUILD_SRC=&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; CHK &amp;nbsp; &amp;nbsp; include/linux/version.h&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; UPD &amp;nbsp; &amp;nbsp; include/linux/version.h&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; CHK &amp;nbsp; &amp;nbsp; include/generated/utsrelease.h&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; UPD &amp;nbsp; &amp;nbsp; include/generated/utsrelease.h&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; CC &amp;nbsp; &amp;nbsp; &amp;nbsp;kernel/bounds.s&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; GEN &amp;nbsp; &amp;nbsp; include/generated/bounds.h&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; CC &amp;nbsp; &amp;nbsp; &amp;nbsp;arch/x86/kernel/asm-offsets.s&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; GEN &amp;nbsp; &amp;nbsp; include/generated/asm-offsets.h&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; CALL &amp;nbsp; &amp;nbsp;scripts/checksyscalls.sh&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; HOSTCC &amp;nbsp;scripts/genksyms/genksyms.o&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; SHIPPED scripts/genksyms/lex.c&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; SHIPPED scripts/genksyms/parse.h&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; SHIPPED scripts/genksyms/keywords.c&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; HOSTCC &amp;nbsp;scripts/genksyms/lex.o&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; ...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Requires(rpmlib): rpmlib(CompressedFileNames) &amp;lt;= 3.0.4-1 rpmlib(FileDigests) &amp;lt;= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) &amp;lt;= 4.0-1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Processing files: kernel-headers-3.0.8-1.x86_64&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Provides: kernel-headers = 3.0.8&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Requires(rpmlib): rpmlib(CompressedFileNames) &amp;lt;= 3.0.4-1 rpmlib(FileDigests) &amp;lt;= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) &amp;lt;= 4.0-1 rpmlib(VersionedDependencies) &amp;lt;= 3.0.3-1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Obsoletes: kernel-headers&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/kernel-3.0.8-1.x86_64&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Wrote: /root/rpmbuild/RPMS/x86_64/kernel-3.0.8-1.x86_64.rpm&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Wrote: /root/rpmbuild/RPMS/x86_64/kernel-headers-3.0.8-1.x86_64.rpm&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.VjVenh&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;+ umask 022&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;+ cd /mnt/tmp/linux-3.0.8&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;+ rm -rf /root/rpmbuild/BUILDROOT/kernel-3.0.8-1.x86_64&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;+ exit 0&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;real&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;85m20.491s&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;user&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;59m40.551s&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;sys&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;12m32.836s&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost linux-3.0.8]# ls -lh /root/rpmbuild/RPMS/x86_64/&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;-rw-r--r-- 1 root root 262M Nov &amp;nbsp;5 19:13 kernel-3.0.8-1.x86_64.rpm&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;-rw-r--r-- 1 root root 786K Nov &amp;nbsp;5 19:13 kernel-headers-3.0.8-1.x86_64.rpm&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
6. Install the new kernel rpm package:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost linux-3.0.8]# rpm -i /root/rpmbuild/RPMS/x86_64/kernel-3.0.8-1.x86_64.rpm&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost linux-3.0.8]#&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
7. Do the postconfiguration to boot the new kernel - the easier way is to do it using the 7.1 step and only check if the files described in manual procedure are created/configured properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7.1 Automatically using the new-kernel-pkg utility:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost linux-3.0.8]# new-kernel-pkg --mkinitrd --install --make-default --depmod 3.0.8&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7.2 Manually (when previous used it can be skipped - everything already done by the new-kernel-pkg utility)&lt;br /&gt;
&lt;br /&gt;
7.2.1 Create the initrd image:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost linux-3.0.8]# mkinitrd -f /boot/initramfs-3.0.8.x86_64.img 3.0.8&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
7.2.2 Adapt the grub menu so that the new kernel becomes an option, below an example from my system:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost boot]# vim /boot/grub/menu.lst&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;title CentOS Linux (3.0.8.x86_64)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; root (hd0,0)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; kernel /vmlinuz-3.0.8 ro root=/dev/mapper/vg_centos6hosta-lv_root rd_LVM_LV=vg_centos6hosta/lv_root rd_LVM_LV=vg_centos6hosta/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; initrd /initramfs-3.0.8.x86_64.img&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
8. Reboot the system and start the new kernel. Afterwards you should see:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[krychu@localhost ~]$ uname -a&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Linux localhost.localdomain 3.0.8 #1 SMP Sat Nov 5 18:56:32 CET 2011 x86_64 x86_64 x86_64 GNU/Linux&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[krychu@localhost ~]$&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Please notice:&lt;/b&gt; when running on a virtual system with VirtIO disks (recognized by the guest system as vda devices) please check if the virtio_blk module is enabled (otherwise you will not be able to mount the root filsystem).&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/152149963531090559/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/11/centos-60-running-kernel-308.html#comment-form' title='Komentarze (2)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/152149963531090559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/152149963531090559'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/11/centos-60-running-kernel-308.html' title='CentOS 6.0: Updating the kernel to 3.0.8'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-8275616466841939624</id><published>2011-11-04T14:36:00.000-07:00</published><updated>2011-11-04T22:31:03.161-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="protocol"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Ubuntu: SSL/TLS handshake - determine version</title><content type='html'>Recently I had to figure out what is the SSL and TLS version supported by some framework for which the only information I had was that it supports encryption. After looking into the TLS RFC (&lt;a href=&quot;http://www.ietf.org/rfc/rfc2246.txt&quot;&gt;http://www.ietf.org/rfc/rfc2246.txt&lt;/a&gt;)&amp;nbsp;and information about SSL I figured out that one might get those information by sniffing the handshake procedure.&lt;br /&gt;
Having the plan I decided to first check it locally on my host. As a first step I configured the apache2 on my Ubuntu 11.04 box as described:&amp;nbsp;&lt;a href=&quot;https://help.ubuntu.com/11.04/serverguide/C/httpd.html&quot;&gt;https://help.ubuntu.com/11.04/serverguide/C/httpd.html&lt;/a&gt;&amp;nbsp;to support encryption. Next step was to use openssl (plus wireshark to be confident;)) to get the protocol version used in the handshake procedure.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SSL 3.0&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLDHlpXUgGPEZT1g44FEwbO0aN2N9Lk_kmI9CvPE1XLKWkFJkS456lzFgXFYany8Dye_iMIiT6lTcy3823IDErze3xp8OkYzAvmychFxOHyvV0l3aKZfwCHIhQIiRi2fVXpyFClX3ZqyM/s1600/ssl3_handshake.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLDHlpXUgGPEZT1g44FEwbO0aN2N9Lk_kmI9CvPE1XLKWkFJkS456lzFgXFYany8Dye_iMIiT6lTcy3823IDErze3xp8OkYzAvmychFxOHyvV0l3aKZfwCHIhQIiRi2fVXpyFClX3ZqyM/s400/ssl3_handshake.jpg&quot; width=&quot;275&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Figure 1&lt;/i&gt; SSL 3.0 handshake&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Now let&#39;s have a test connecting using the openssl to the local apache2 server supporting SSL 3.0.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# openssl s_client -ssl3 -connect 127.0.0.1:443&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;CONNECTED(00000003)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;depth=0 /CN=krystianek&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;verify error:num=18:self signed certificate&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;verify return:1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;depth=0 /CN=krystianek&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;verify return:1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;---&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Certificate chain&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;0 s:/CN=krystianek&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; i:/CN=krystianek&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;---&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Server certificate&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;-----BEGIN CERTIFICATE-----&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;MIICpjCCAY4CCQCXhncRWkNj1DANBgkqhkiG9w0BAQUFADAVMRMwEQYDVQQDEwpr&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;cnlzdGlhbmVrMB4XDTExMTEwMjE2MzgyOVoXDTIxMTAzMDE2MzgyOVowFTETMBEG&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;A1UEAxMKa3J5c3RpYW5lazCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;ALU90KhdAKy4dBTGO8GLIpHLvO5L9DNZjLURgVoY2H8r1piYfvZzQ6sgNIrQzZjg&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;vGDTg2bUT7g4UQFJouSVGGRy8qk5afipoUFS+CxQEoWHkIQoRLdDSEtLxpYlQvk3&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;ID2qTzLGBeNm+YBSsvzg2e4sWBykKh1ePJ/TFxSdnW9+UZWbwytFlA6qNPVWA2Ks&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;lX4+N5xHIL1afd1+qGKUR85xJBcXXUbbZM7Fe+neGHmMqxuUXOmrU7uHE7igcHq7&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;UUXByIertkS33cgpV7QbWr9w+ip8ggKAUVkY/03NpaYfk40L06sef7jyWhMXFO8i&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;3TbnwDH0m/I3qxZqQZifYbECAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAJ4BIrQ/U&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;KeJWsWQJsOAfJlpQ2giUiEYLDZyP8gnmhNCYnEdCBl9ltXxPIe1RIFK/O5dnAgV/&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;GLPYREW+jZ4tyip4cwWMIgixtcpyWyESJlH4vF4lKj6dP5C0xP5cyfbfvR9rlNxk&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;eejBsUv24FK9xCPN2V8IdkS+CNneGW06yAf+EQP9mF5weNXkbE7tX+yBwKuR8BgE&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;AUZ1qohBPz5OZqSV61HikVUf3RmqapnIo4lejilj/1uVhU8QJ1FxwJu2UyAJaiPj&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;qRSVvW4H7LSkz326DaKzoFFUylhAZPImEPN0LHv1ee0yzbWAzN8iEM6bzdNYJfJ2&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;fGQu5yAue2vxHQ==&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;-----END CERTIFICATE-----&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;subject=/CN=krystianek&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;issuer=/CN=krystianek&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;---&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;No client certificate CA names sent&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;---&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;SSL handshake has read 1413 bytes and written 319 bytes&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;---&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Server public key is 2048 bit&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Secure Renegotiation IS supported&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Compression: zlib compression&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;Expansion: zlib compression&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;SSL-Session:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Protocol&amp;nbsp; : SSLv3&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cipher&amp;nbsp;&amp;nbsp;&amp;nbsp; : DHE-RSA-AES256-SHA&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Session-ID: 6C8A75631A4964A27410DF69CFD267C8C1EE6363A6FDED270BD0671B0DFAE99F&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Session-ID-ctx: &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Master-Key: FDA851ACE2E2320690D55C7766A51718FCD6B2A89ED6887A4368583D8EB2FF2D4559D2408135D60A3401711B9C5FC7A9&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Key-Arg&amp;nbsp;&amp;nbsp; : None&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Compression: 1 (zlib compression)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start Time: 1320299309&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timeout&amp;nbsp;&amp;nbsp; : 7200 (sec)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Verify return code: 18 (self signed certificate)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;---&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;GET /&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h1&gt;


&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;
It works!&lt;/span&gt;&lt;/h1&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;This is the default web page for this server.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;The web server software is running but no content has been added, yet.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;closed&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;You have new mail in /var/mail/root&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;#&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Ok, it works. In my case there was no client certificate sent towards the SSL server.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;TLS 1.0&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZDZEoUkyvUwsRbwKBOfGjZcAdVkb9gnwGl2_RiQzdspw4eDKCieCtIrCj6LoaYtSBdQEyZ0BeVFkA4OB_VFpz0hwuvQ7KChm-uhDN8nGgHRqHYB1sGoFN7ghTpAlYWvpq5CIaxvWqLm4/s1600/tls1_handshake.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZDZEoUkyvUwsRbwKBOfGjZcAdVkb9gnwGl2_RiQzdspw4eDKCieCtIrCj6LoaYtSBdQEyZ0BeVFkA4OB_VFpz0hwuvQ7KChm-uhDN8nGgHRqHYB1sGoFN7ghTpAlYWvpq5CIaxvWqLm4/s400/tls1_handshake.jpg&quot; width=&quot;276&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Figure 2&lt;/i&gt;&amp;nbsp;TLS 1.0 handshake&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
And now let&#39;s try to connect again using the openssl to the apache2 server but this time using the tls1 protocol.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;# openssl s_client -tls1 -connect 127.0.0.1:443&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;CONNECTED(00000003)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;depth=0 /CN=krystianek&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;verify error:num=18:self signed certificate&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;verify return:1&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;depth=0 /CN=krystianek&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;verify return:1&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;---&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Certificate chain&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;0 s:/CN=krystianek&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; i:/CN=krystianek&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;---&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Server certificate&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;-----BEGIN CERTIFICATE-----&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;MIICpjCCAY4CCQCXhncRWkNj1DANBgkqhkiG9w0BAQUFADAVMRMwEQYDVQQDEwpr&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;cnlzdGlhbmVrMB4XDTExMTEwMjE2MzgyOVoXDTIxMTAzMDE2MzgyOVowFTETMBEG&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;A1UEAxMKa3J5c3RpYW5lazCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;ALU90KhdAKy4dBTGO8GLIpHLvO5L9DNZjLURgVoY2H8r1piYfvZzQ6sgNIrQzZjg&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;vGDTg2bUT7g4UQFJouSVGGRy8qk5afipoUFS+CxQEoWHkIQoRLdDSEtLxpYlQvk3&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;ID2qTzLGBeNm+YBSsvzg2e4sWBykKh1ePJ/TFxSdnW9+UZWbwytFlA6qNPVWA2Ks&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;lX4+N5xHIL1afd1+qGKUR85xJBcXXUbbZM7Fe+neGHmMqxuUXOmrU7uHE7igcHq7&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;UUXByIertkS33cgpV7QbWr9w+ip8ggKAUVkY/03NpaYfk40L06sef7jyWhMXFO8i&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;3TbnwDH0m/I3qxZqQZifYbECAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAJ4BIrQ/U&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;KeJWsWQJsOAfJlpQ2giUiEYLDZyP8gnmhNCYnEdCBl9ltXxPIe1RIFK/O5dnAgV/&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;GLPYREW+jZ4tyip4cwWMIgixtcpyWyESJlH4vF4lKj6dP5C0xP5cyfbfvR9rlNxk&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;eejBsUv24FK9xCPN2V8IdkS+CNneGW06yAf+EQP9mF5weNXkbE7tX+yBwKuR8BgE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;AUZ1qohBPz5OZqSV61HikVUf3RmqapnIo4lejilj/1uVhU8QJ1FxwJu2UyAJaiPj&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;qRSVvW4H7LSkz326DaKzoFFUylhAZPImEPN0LHv1ee0yzbWAzN8iEM6bzdNYJfJ2&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;fGQu5yAue2vxHQ==&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;-----END CERTIFICATE-----&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;subject=/CN=krystianek&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;issuer=/CN=krystianek&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;---&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;No client certificate CA names sent&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;---&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;SSL handshake has read 1560 bytes and written 293 bytes&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;---&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Server public key is 2048 bit&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Secure Renegotiation IS supported&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Compression: zlib compression&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Expansion: zlib compression&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;SSL-Session:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Protocol&amp;nbsp; : TLSv1&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cipher&amp;nbsp;&amp;nbsp;&amp;nbsp; : DHE-RSA-AES256-SHA&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Session-ID: 94FA2FB475C3FA47EDE2373C610F3F3C02CB2714F7344EC433B6B8ACEDC0AC43&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Session-ID-ctx: &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Master-Key: 958861A6AC4D901FA6263C0DA92E81F9430AEB201F82032D562813309957593E9E4259F8548AFBE2CB5A7145026135F5&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Key-Arg&amp;nbsp;&amp;nbsp; : None&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TLS session ticket:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0000 - 9a c9 2b 9c e9 54 7e e4-05 de 32 40 38 0a 6d b9&amp;nbsp;&amp;nbsp; ..+..T~...2@8.m.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0010 - 6d 21 2c 2e c8 ba 6e b7-de 37 72 0f 5b 5c 69 a8&amp;nbsp;&amp;nbsp; m!,...n..7r.[\i.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0020 - da 55 4a f6 73 31 59 4c-c4 3e 37 7b 9c 87 47 97&amp;nbsp;&amp;nbsp; .UJ.s1YL.&amp;gt;7{..G.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0030 - 03 f4 c9 62 45 95 a9 ab-11 31 ab de bf c9 5d b4&amp;nbsp;&amp;nbsp; ...bE....1....].&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0040 - 50 75 ec 6b 54 c4 05 c8-bf 44 d3 14 41 d9 ea e9&amp;nbsp;&amp;nbsp; Pu.kT....D..A...&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0050 - 0a 57 c8 d1 89 4f 3b 20-c6 0b 1e f6 f4 19 af 8e&amp;nbsp;&amp;nbsp; .W...O; ........&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0060 - ca f7 18 28 1c 7b c7 9f-d4 03 c1 3f bc 47 be a0&amp;nbsp;&amp;nbsp; ...(.{.....?.G..&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0070 - e0 74 0c c5 57 d6 16 4b-b3 a4 f5 c7 b7 10 7e 11&amp;nbsp;&amp;nbsp; .t..W..K......~.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0080 - 03 6a 5b e6 06 aa d7 75-40 d1 fe b0 62 ae e9 aa&amp;nbsp;&amp;nbsp; .j[....u@...b...&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0090 - bc 0e 2d 59 06 97 99 78-ac 69 3e 8e c4 7f 34 e8&amp;nbsp;&amp;nbsp; ..-Y...x.i&amp;gt;...4.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00a0 - 84 89 c3 01 13 1b 01 b2-49 21 62 b8 4b e5 93 ea&amp;nbsp;&amp;nbsp; ........I!b.K...&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00b0 - 88 09 bb d2 27 d2 ab cd-b6 94 67 0e a5 9b 7c fc&amp;nbsp;&amp;nbsp; ....&#39;.....g...|.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Compression: 1 (zlib compression)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start Time: 1320299341&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timeout&amp;nbsp;&amp;nbsp; : 7200 (sec)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Verify return code: 18 (self signed certificate)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;---&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;GET /&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;h1&gt;


&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;
It works!&lt;/span&gt;&lt;/h1&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;This is the default web page for this server.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;The web server software is running but no content has been added, yet.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;closed&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;#&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/8275616466841939624/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/11/ubuntu-ssl-30-and-tls-10-handshake.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/8275616466841939624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/8275616466841939624'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/11/ubuntu-ssl-30-and-tls-10-handshake.html' title='Ubuntu: SSL/TLS handshake - determine version'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLDHlpXUgGPEZT1g44FEwbO0aN2N9Lk_kmI9CvPE1XLKWkFJkS456lzFgXFYany8Dye_iMIiT6lTcy3823IDErze3xp8OkYzAvmychFxOHyvV0l3aKZfwCHIhQIiRi2fVXpyFClX3ZqyM/s72-c/ssl3_handshake.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-738732403533224929</id><published>2011-10-31T13:54:00.000-07:00</published><updated>2011-10-31T13:54:11.542-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="3gpp"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="protocol"/><title type='text'>GTP prime library for Java (3GPP 32.295)</title><content type='html'>Recently I needed to have a client application for a GTP&#39; external system. I did some research on the web but unfortunately did not find anything usable for me (found one java library on kenai.com but the implementation is in very early phase, the other was open-cgf written in Erlang for which I found two obstacles the language + crash dumps when it was starting up on my Ubuntu Natty 64-bit box). Having some development background from the past and having a look on the 3GPP 32.295 specification I decided that it is not a big&amp;nbsp;amount&amp;nbsp;of effort to implement it. I think this is a good opportunity to learn the protocol and additionally check the JBoss Netty framework - which seems to be a perfect match for such a solution. Indeed writing a client/server application using JBoss Netty is pretty straightforward (I will try to provide more details in another article) - it mainly about writing proper encoder/decoder and handlers.&lt;br /&gt;
&lt;br /&gt;
The outcome can be found in the google code under the link:&amp;nbsp;&lt;a href=&quot;http://code.google.com/p/gtpprime/&quot;&gt;http://code.google.com/p/gtpprime/&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/738732403533224929/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/10/gtp-prime-library-for-java-3gpp-32295.html#comment-form' title='Komentarze (2)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/738732403533224929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/738732403533224929'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/10/gtp-prime-library-for-java-3gpp-32295.html' title='GTP prime library for Java (3GPP 32.295)'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-4629182696566033378</id><published>2011-10-16T11:38:00.000-07:00</published><updated>2011-10-16T11:38:55.531-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Linux: Creating encrypted partition using cryptsetup</title><content type='html'>In order to protect sensitive data in case your storage is lost or stolen, one usually encrypts the drive using trusted/safe encryption algorithms. Under Linux one can use e.g. cryptsetup - available in standard Ubuntu repository (I guess for other distros it should be also available in standard repos). Since it works on the block level, one can mix unencrypted partitions with encrypted ones. It also used in most of the distros (e.g. Ubuntu alternate installer) as a tooling providing disk encryption.&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;b&gt;Creating/mounting encrypted partition&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First of all I did not want to experiment with my HDD and decided to use the USB stick for this experiment. One needs to partition the disk - I created two partitions sdb1 and sdb2 using the fdisk. The partition table has been presented below:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;root@krystianek:~# fdisk -l /dev/sdb&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;&lt;b style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;Disk /dev/sdb: 4156 MB, 4156555264 bytes&lt;br /&gt;255 heads, 63 sectors/track, 505 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;Disk identifier: 0x000e56eb&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; Device Boot&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Blocks&amp;nbsp;&amp;nbsp; Id&amp;nbsp; System&lt;br /&gt;/dev/sdb1&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; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 132&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1060258+&amp;nbsp; 83&amp;nbsp; Linux&lt;br /&gt;/dev/sdb2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 133&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 505&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2996122+&amp;nbsp; 83&amp;nbsp; Linux&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Now you need to format the partition as shown below (I used the 256-bit key length for encryption). Please type the uppercase &#39;YES&#39; as prompted below. Also you will have to provide the encryption password. &lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;root@krystianek:~# cryptsetup --verbose --key-size 256 luksFormat /dev/sdb2&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;WARNING!&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;========&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;This will overwrite data on /dev/sdb2 irrevocably.&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;Are you sure? (Type uppercase yes): YES&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;Enter LUKS passphrase: &lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;Verify passphrase: &lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;Command successful.&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
That&#39;s it now you can open the encrypted partition. As a parameter you will provide the alias to which the device will be mapped as presented below: &lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;root@krystianek:~# cryptsetup --verbose luksOpen /dev/sdb2 &lt;span style=&quot;color: red;&quot;&gt;usbencrypted&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;Enter passphrase for /dev/sdb2: &lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;Key slot 0 unlocked.&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;Command successful.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;root@krystianek:~# ls -l /dev/mapper/usbencrypted &lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;lrwxrwxrwx 1 root root 7 2011-10-16 20:06 /dev/mapper/usbencrypted -&amp;gt; ../dm-3&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;root@krystianek:~# cryptsetup status &lt;span style=&quot;color: red;&quot;&gt;usbencrypted&lt;/span&gt;&lt;br /&gt;/dev/mapper/usbencrypted is active:&lt;br /&gt;&amp;nbsp; cipher:&amp;nbsp; aes-cbc-essiv:sha256&lt;br /&gt;&amp;nbsp; keysize: 256 bits&lt;br /&gt;&amp;nbsp; device:&amp;nbsp; /dev/sdb2&lt;br /&gt;&amp;nbsp; offset:&amp;nbsp; 2056 sectors&lt;br /&gt;&amp;nbsp; size:&amp;nbsp;&amp;nbsp;&amp;nbsp; 5990189 sectors&lt;br /&gt;&amp;nbsp; mode:&amp;nbsp;&amp;nbsp;&amp;nbsp; read/write &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
Next you can create the filesystem - I created the ext4 and mounted it under /mnt/hd1:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;root@krystianek:~# mkfs.ext4 /dev/mapper/usbencrypted &lt;br /&gt;mke2fs 1.41.14 (22-Dec-2010)&lt;br /&gt;Filesystem label=&lt;br /&gt;OS type: Linux&lt;br /&gt;Block size=4096 (log=2)&lt;br /&gt;Fragment size=4096 (log=2)&lt;br /&gt;Stride=0 blocks, Stripe width=0 blocks&lt;br /&gt;187312 inodes, 748773 blocks&lt;br /&gt;37438 blocks (5.00%) reserved for the super user&lt;br /&gt;First data block=0&lt;br /&gt;Maximum filesystem blocks=767557632&lt;br /&gt;23 block groups&lt;br /&gt;32768 blocks per group, 32768 fragments per group&lt;br /&gt;8144 inodes per group&lt;br /&gt;Superblock backups stored on blocks: &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 32768, 98304, 163840, 229376, 294912&lt;br /&gt;&lt;br /&gt;Writing inode tables: done&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;Creating journal (16384 blocks): done&lt;br /&gt;Writing superblocks and filesystem accounting information: done&lt;br /&gt;&lt;br /&gt;This filesystem will be automatically checked every 34 mounts or&lt;br /&gt;180 days, whichever comes first.&amp;nbsp; Use tune2fs -c or -i to override.&lt;br /&gt;root@krystianek:~# mount /dev/mapper/usbencrypted /mnt/hd1/&lt;br /&gt;root@krystianek:~# ls -l /mnt/hd1/&lt;br /&gt;total 16&lt;br /&gt;drwx------ 2 root root 16384 2011-10-16 20:12 lost+found&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can start copying files to that filesystem.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Unmounting/closing the encrypted partition&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In order unmount and close the encrypted partition one needs to: &lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;root@krystianek:~# umount /mnt/hd1/&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;root@krystianek:~# cryptsetup --verbose luksClose usbencrypted&lt;br /&gt;Command successful.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
Next time when you attach the usb stick you should be automatically prompted for password.</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/4629182696566033378/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/10/linux-creating-encrypted-partition.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/4629182696566033378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/4629182696566033378'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/10/linux-creating-encrypted-partition.html' title='Linux: Creating encrypted partition using cryptsetup'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-228043678104944269</id><published>2011-10-16T00:56:00.000-07:00</published><updated>2011-10-17T13:26:32.105-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iscsi"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="os"/><category scheme="http://www.blogger.com/atom/ns#" term="protocol"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Linux: Sharing disks via iSCSI on Ubuntu 11.04</title><content type='html'>Recently I wanted to test a clustering solution that was based on a shared storage and I was looking for a solution that could work in my virtualized environment. One requirement was that the shared disk had to be visible as device (not a mounted NFS share). The choice went to iSCSI. There is quite interesting open source solution for providing NAS functionality (&lt;a href=&quot;http://www.freenas.org/&quot;&gt;http://www.freenas.org/&lt;/a&gt;) but since it is based on FreeBSD 8.2 and my native system in Linux I would have to run in as another virtual machine - might be too much for my box (one FreeNAS virtual machine + two virtual machines hosting cluster - Figure 1). Therefore I searched for something that could be configured natively on my Ubuntu 11.04 box. What I found and decided to configure was the iscsitarget daemon - below you can the step by step instruction how to do that. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgraPWGRFA7l8SeKpM8aRtMU70tLeeYBdBi3pet7KMGk_gSN5Hc5lxXJZoUgsvVpNtOczNETvMRWlonimypRMip5aIBj8yBiueeBqiCdI93-xutUgzf-hRTAneUerPn83E7pQrWyLOKMVs/s1600/iscsi1.jpeg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgraPWGRFA7l8SeKpM8aRtMU70tLeeYBdBi3pet7KMGk_gSN5Hc5lxXJZoUgsvVpNtOczNETvMRWlonimypRMip5aIBj8yBiueeBqiCdI93-xutUgzf-hRTAneUerPn83E7pQrWyLOKMVs/s320/iscsi1.jpeg&quot; width=&quot;311&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Figure 1&lt;/i&gt; iSCSI client-server architecture&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;iSCSI Server configuration - Ubuntu&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
First of all you need to install the iscsitarget software - it is available in the standard Ubuntu repo - as below:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;# apt-get install iscsitarget&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;Reading package lists... Done&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Building dependency tree&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Reading state information... Done&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Suggested packages:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; iscsitarget-source iscsitarget-dkms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Recommended packages:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; iscsitarget-module&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;The following NEW packages will be installed:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; iscsitarget&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Need to get 78.6 kB of archives.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;After this operation, 291 kB of additional disk space will be used.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Get:1 http://us.archive.ubuntu.com/ubuntu/ natty/universe iscsitarget amd64 1.4.20.2-1ubuntu1 [78.6 kB]&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Fetched 78.6 kB in 0s (128 kB/s)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Selecting previously deselected package iscsitarget.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;(Reading database ... 315227 files and directories currently installed.)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Unpacking iscsitarget (from .../iscsitarget_1.4.20.2-1ubuntu1_amd64.deb) ...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Processing triggers for ureadahead ...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;ureadahead will be reprofiled on next reboot&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Processing triggers for man-db ...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Setting up iscsitarget (1.4.20.2-1ubuntu1) ...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;* iscsitarget not enabled in &quot;/etc/default/iscsitarget&quot;, not starting...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Define the LUNs in the configuration file as follows (red colour marks the location of the LUNs):&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;# vim /etc/iet/ietd.conf &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Target ubuntu.mediate:storage.sys1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lun 0 Path=&lt;span style=&quot;color: red;&quot;&gt;/luns/storagelun0&lt;/span&gt;,Type=fileio,ScsiId=lun0,ScsiSN=lun0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lun 1 Path=&lt;span style=&quot;color: red;&quot;&gt;/luns/storagelun1&lt;/span&gt;,Type=fileio,ScsiID=lun1,ScsiSN=lun&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Create the files that will represent the LUNs. One can also use devices (e.g. USB stick) as placeholders for LUNs but for me files were just perfect - easy to move and control.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;# cd /luns/&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;krychu@krystianek:/luns$ sudo dd if=/dev/zero of=storagelun0 count=0 obs=1 seek=10G&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0+0 records in&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0+0 records out&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0 bytes (0 B) copied, 9.01e-06 s, 0.0 kB/s&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;krychu@krystianek:/luns$ ls -latr&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;total 8&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;drwxr-xr-x 26 root root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4096 2011-10-15 10:39 ..&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;-rw-r--r--&amp;nbsp; 1 root root 10737418240 2011-10-15 10:40 storagelun0&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;drwxr-xr-x&amp;nbsp; 2 root root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4096 2011-10-15 10:40 .&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;krychu@krystianek:/luns$ ls -lh&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;total 0&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;-rw-r--r-- 1 root root 10G 2011-10-15 10:40 storagelun0&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;krychu@krystianek:/luns$ sudo dd if=/dev/zero of=storagelun1 count=0 obs=1 seek=1G&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0+0 records in&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0+0 records out&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0 bytes (0 B) copied, 1.285e-05 s, 0.0 kB/s&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
Next enable the iscsitarget in the default configuration file - modify the /etc/default/iscsitarget file&#39;s content so that it matches the one below:&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# cat /etc/default/iscsitarget &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ISCSITARGET_ENABLE=true&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Start the iscsitarget service:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;# service iscsitarget start&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;* Starting iSCSI enterprise target service&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ OK ] &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ OK ]&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Ok, that&#39;s it - the iSCSI should be configured to publish two LUNs (storagelun0 and storagelun1) from the /luns directory. Next step is to configure the client machines.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;iSCSI Client- CentOS 6.0 on kvm&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
First of all check if the required software is installed: iscsi-initiator-utils (in my case it was). If it is not then install it from the standard repository as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# yum install iscsi-initiator-utils&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;... &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
Start and enable the iscsi and multipathd service during boot of the system:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# service iscsi start&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# chkconfig --list iscsi&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;iscsi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 0:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 1:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 2:on&amp;nbsp;&amp;nbsp;&amp;nbsp; 3:on&amp;nbsp;&amp;nbsp;&amp;nbsp; 4:on&amp;nbsp;&amp;nbsp;&amp;nbsp; 5:on&amp;nbsp;&amp;nbsp;&amp;nbsp; 6:off&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# chkconfig --list multipathd&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;multipathd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 0:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 1:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 2:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 3:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 4:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 5:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 6:off&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# chkconfig --add multipathd&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# chkconfig --list multipathd&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;multipathd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 0:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 1:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 2:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 3:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 4:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 5:off&amp;nbsp;&amp;nbsp;&amp;nbsp; 6:off&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# chkconfig multipathd on&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# service multipathd start&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Starting multipathd daemon:&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&amp;nbsp; OK&amp;nbsp; ]&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Now you can perform the discovery of the available iSCSI targets:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# iscsiadm -m discovery -t st -p 192.168.122.1:3260&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;192.168.122.1:3260,1 ubuntu.mediate:storage.sys1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;192.168.1.133:3260,1 ubuntu.mediate:storage.sys1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;192.168.100.1:3260,1 ubuntu.mediate:storage.sys1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;192.168.101.1:3260,1 ubuntu.mediate:storage.sys1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Next connect to the target. There two options you either specify the target (name, IP) and in that case the tooling will login to only this target or you leave it unspecified and you will be connected to all targets. In this manual I will use the first approach.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[root@localhost ~]# iscsiadm -m node -l -T ubuntu.mediate:storage.sys1 -p 192.168.122.1:3260&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Logging in to [iface: default, target: ubuntu.mediate:storage.sys1, portal: 192.168.122.1,3260]&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Login to [iface: default, target: ubuntu.mediate:storage.sys1, portal: 192.168.122.1,3260] successful.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
Ok, now let&#39;s get to the multipath configuration. First of all copy the example configuration file to the /etc directory and restart the multipathd daemon:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.synthetic /etc/ &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# multipath -v2&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Oct 15 11:01:38 | /lib/udev/scsi_id exitted with 1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Oct 15 11:01:38 | /lib/udev/scsi_id exitted with 1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# multipath -ll&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;149455400000000006c756e31000000000000000000000000 dm-3 IET,VIRTUAL-DISK&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;size=1.0G features=&#39;0&#39; hwhandler=&#39;0&#39; wp=rw&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;`-+- policy=&#39;round-robin 0&#39; prio=1 status=active&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; `- 6:0:0:1 sdb 8:16&amp;nbsp; active ready&amp;nbsp; running&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;149455400000000006c756e30000000000000000000000000&lt;/span&gt; dm-2 IET,VIRTUAL-DISK&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;size=10G features=&#39;0&#39; hwhandler=&#39;0&#39; wp=rw&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;`-+- policy=&#39;round-robin 0&#39; prio=1 status=active&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; `- 6:0:0:0 sda 8:0&amp;nbsp;&amp;nbsp; active ready&amp;nbsp; running&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# ls -l /dev/mapper/total 0&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;lrwxrwxrwx 1 root root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7 Oct 15 11:01 &lt;span style=&quot;color: red;&quot;&gt;149455400000000006c756e30000000000000000000000000&lt;/span&gt; -&amp;gt; ../dm-2&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;lrwxrwxrwx 1 root root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7 Oct 15 11:01 149455400000000006c756e31000000000000000000000000 -&amp;gt; ../dm-3&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;crw-rw---- 1 root root 10, 58 Oct 15 09:52 control&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;lrwxrwxrwx 1 root root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7 Oct 15 09:52 vg_centos6hosta-lv_root -&amp;gt; ../dm-0&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;lrwxrwxrwx 1 root root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7 Oct 15 09:52 vg_centos6hosta-lv_swap -&amp;gt; ../dm-1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Ok, now let us configure the multipath daemon so that the device is always available as an alias (e.g. ha-mediate under /dev/mapper/ha-mediate). Add the following section to the /etc/multipath.conf file and restart the multipathd daemon:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;[root@localhost ~]# cat /etc/multipath.conf &lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;##&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;## This is a template multipath-tools configuration file&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;## Uncomment the lines relevent to your environment&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;##&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;multipaths {&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; multipath {&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; wwid&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;149455400000000006c756e30000000000000000000000000&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; alias&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ha-mediate&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; path_grouping_policy&amp;nbsp;&amp;nbsp;&amp;nbsp; multibus&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; path_selector&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;round-robin 0&quot;&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; failback&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; manual&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; rr_weight&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; priorities&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; no_path_retry&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; rr_min_io&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;color: #3d85c6;&quot; /&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;[root@localhost ~]# service multipathd restart&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Stopping multipathd daemon:&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&amp;nbsp; OK&amp;nbsp; ]&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Starting multipathd daemon:&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&amp;nbsp; OK&amp;nbsp; ]&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;[root@localhost ~]# multipath -ll&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;149455400000000006c756e31000000000000000000000000 dm-3 IET,VIRTUAL-DISK&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;size=1.0G features=&#39;0&#39; hwhandler=&#39;0&#39; wp=rw&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;`-+- policy=&#39;round-robin 0&#39; prio=1 status=active&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; `- 6:0:0:1 sdb 8:16&amp;nbsp; active ready&amp;nbsp; running&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;ha-mediate (149455400000000006c756e30000000000000000000000000)&lt;/span&gt; dm-2 IET,VIRTUAL-DISK&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;size=10G features=&#39;1 queue_if_no_path&#39; hwhandler=&#39;0&#39; wp=rw&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;`-+- policy=&#39;round-robin 0&#39; prio=1 status=active&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; `- 6:0:0:0 sda 8:0&amp;nbsp;&amp;nbsp; active ready&amp;nbsp; running&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[root@localhost ~]# ls -l /dev/mapper/&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;total 0&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;lrwxrwxrwx 1 root root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7 Oct 15 11:05 149455400000000006c756e31000000000000000000000000 -&amp;gt; ../dm-3&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;crw-rw---- 1 root root 10, 58 Oct 15 09:52 control&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;lrwxrwxrwx 1 root root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7 Oct 15 11:05 ha-mediate -&amp;gt; ../dm-&lt;/span&gt;2&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;lrwxrwxrwx 1 root root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7 Oct 15 09:52 vg_centos6hosta-lv_root -&amp;gt; ../dm-0&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;lrwxrwxrwx 1 root root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7 Oct 15 09:52 vg_centos6hosta-lv_swap -&amp;gt; ../dm-1&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
As you see now the device is available under it&#39;s alias - in my case ha-mediate. So that&#39;s it - now you can create a filesystem on a device, mount it and start using it ;)&lt;br /&gt;
&lt;br /&gt;
If you mount the iSCSI target only from one server you can create a cluster unaware filesystem like etx3, ext4 (example below). However for granting access from multiple servers a cluster-aware filesystem has to be created.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# mkfs.ext4 /dev/mapper/ha-mediate &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;mke2fs 1.41.12 (17-May-2010)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Filesystem label=&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;OS type: Linux&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Block size=4096 (log=2)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Fragment size=4096 (log=2)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Stride=0 blocks, Stripe width=0 blocks&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;655360 inodes, 2621440 blocks&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;131072 blocks (5.00%) reserved for the super user&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;First data block=0&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Maximum filesystem blocks=2684354560&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;80 block groups&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;32768 blocks per group, 32768 fragments per group&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;8192 inodes per group&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Superblock backups stored on blocks: &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Writing inode tables: done&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Creating journal (32768 blocks): done&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Writing superblocks and filesystem accounting information: done&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;This filesystem will be automatically checked every 34 mounts or&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;180 days, whichever comes first.&amp;nbsp; Use tune2fs -c or -i to override.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# mkdir /mnt/tmp&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# mount /dev/mapper/ha-mediate /mnt/tmp/&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;[root@localhost ~]# ls -l /mnt/tmp/&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;total 16&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;drwx------ 2 root root 16384 Oct 15 11:06 lost+found&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/228043678104944269/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/10/linux-sharing-disks-via-iscsi.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/228043678104944269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/228043678104944269'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/10/linux-sharing-disks-via-iscsi.html' title='Linux: Sharing disks via iSCSI on Ubuntu 11.04'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgraPWGRFA7l8SeKpM8aRtMU70tLeeYBdBi3pet7KMGk_gSN5Hc5lxXJZoUgsvVpNtOczNETvMRWlonimypRMip5aIBj8yBiueeBqiCdI93-xutUgzf-hRTAneUerPn83E7pQrWyLOKMVs/s72-c/iscsi1.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-7448675729755394761</id><published>2011-10-12T15:00:00.000-07:00</published><updated>2011-10-12T15:03:40.927-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HA"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Linux: cronjob redundancy and failover with rcron &amp; keepalived)</title><content type='html'>The solution described in this article is about introducing additional HA features like redundancy and failover to the periodic jobs executed via cron. It means that a periodic job is spread over multiple nodes but only one is executing it. In case of failure of this node another one can take over this task and execute it.&lt;br /&gt;
Actually what is interesting this kind of functionality might be provided by the by the combination of the keepalived and rcron (deployment figure presented below). How will it work? The rcron is an enhanced version of cron that first checks the state of the node in a file and only if the node is the master node the job is executed. The state of the node is on the other hand controlled by the keepalived daemon namely only the master node has the active state for the rcron job. In case of master node failure the active state is transferred to the backup node with the highest priority.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY27oDgU57VGEnh9AhLEUbEADSLOmoBYJtAvB89LENrZ-GfllcyHnUjDwVM0CkrWgLZXm10vBwmIhvwgWsWuM9Mhjun0sHJ2kMQEfD21xq2ICsJayHqd5nimdsHz4ALaA_ywXc1hFNTQU/s1600/keepalived3.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;178&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY27oDgU57VGEnh9AhLEUbEADSLOmoBYJtAvB89LENrZ-GfllcyHnUjDwVM0CkrWgLZXm10vBwmIhvwgWsWuM9Mhjun0sHJ2kMQEfD21xq2ICsJayHqd5nimdsHz4ALaA_ywXc1hFNTQU/s320/keepalived3.jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Figure 1&lt;/i&gt; Failover and reduncancy using rcronjob and keepalived&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
That was theory let&#39;s check it in practice.&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Getting the rcron binary&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The rcron is not available in the standard CentOS repo and has to be built from the source. The best way is to install subversion and checkout the latest source tree from the googlecode.&amp;nbsp;Rcron in order to compile requires two additional packages: byacc and flex. You can download the packages from the standard repository. Below one can find the commands to be used to install dependencies and build rcron from source code:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; # &amp;nbsp;yum install subversion byacc flex&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;# &amp;nbsp;svn co http://rcron.googlecode.com/svn/trunk rcron&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; # &amp;nbsp;cd rcron/&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; # &amp;nbsp;./configure&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; # &amp;nbsp;make&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; # &amp;nbsp;./install-sh&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; # &amp;nbsp;make install&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Please repeat the operation on all nodes on which you would like to have the redundant cronjob configured.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Configure keepalived for redundancy and failover&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now as we have the rcron binary available let&#39;s get to the keepalived. For the initial configuration of the keepalived please check the previous articles on my blog. For the redundant cron job an additional vrrp instance is to be configured with a special handling of the state for rcron (/var/run/rcron/state file).&lt;br /&gt;
&lt;br /&gt;
Host A&#39;s keepalived configuration file (/etc/keepalived/keepalived.conf) should be:&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;vrrp_instance CRON_1 {&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; state MASTER&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; interface eth0&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; virtual_router_id 31&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; priority 100&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; advert_int 1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; authentication {&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; auth_type PASS&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; auth_pass 1111&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; notify_backup &quot;/bin/echo passive &amp;gt; /var/run/rcron/state&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; notify_master &quot;/bin/echo active &amp;nbsp;&amp;gt; /var/run/rcron/state&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; notify_fault &amp;nbsp;&quot;/bin/echo passive &amp;gt; /var/run/rcron/state&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Host B&#39;s configuration file&amp;nbsp;(/etc/keepalived/keepalived.conf) should be:&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;vrrp_instance CRON_1 {&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; state BACKUP&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; interface eth0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; virtual_router_id 31&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; priority 99&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; advert_int 1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; authentication {&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; auth_type PASS&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; auth_pass 1111&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; notify_backup &quot;/bin/echo passive &amp;gt; /var/run/rcron/state&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; notify_master &quot;/bin/echo active &amp;nbsp;&amp;gt; /var/run/rcron/state&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; notify_fault &amp;nbsp;&quot;/bin/echo passive &amp;gt; /var/run/rcron/state&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
After startup of keepalived daemon the state on:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;HostA is active:&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@centOS-hostA ~]# cat /var/run/rcron/state&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;active&lt;/span&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;
&lt;li&gt;HostB is passive:&lt;/li&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@centOS-hostB ~]# cat /var/run/rcron/state
&lt;br /&gt;passive&lt;/b&gt;&lt;/span&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Configuring rcron daemon&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
The configuration of the rcron is based on the examples.&lt;br /&gt;
The main configuration file for HostA:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@centOS-hostA log]# cat /etc/rcron/rcron.conf&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# An arbitrary name&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;cluster_name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= rcron_redundantjobs&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# A file containing either the word &quot;active&quot; or the word &quot;passive&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;state_file &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= /var/run/rcron/state&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# The default state in case state_file can&#39;t be read&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;default_state &amp;nbsp; &amp;nbsp; &amp;nbsp; = active&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;syslog_facility &amp;nbsp; &amp;nbsp; = LOG_CRON&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;syslog_level &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= LOG_INFO&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# We can tune jobs niceness/priorities (see nice(1)).&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;nice_level &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 19&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The main configuration file for HostB:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@centOS-hostB]$ cat /etc/rcron/rcron.conf&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# An arbitrary name&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;cluster_name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= rcron_redundantjobs&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# A file containing either the word &quot;active&quot; or the word &quot;passive&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;state_file &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= /var/run/rcron/state&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# The default state in case state_file can&#39;t be read&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;default_state &amp;nbsp; &amp;nbsp; &amp;nbsp; = passive&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;syslog_facility &amp;nbsp; &amp;nbsp; = LOG_CRON&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;syslog_level &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= LOG_INFO&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;# We can tune jobs niceness/priorities (see nice(1)).&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;nice_level &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 19&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The cronjob configuration for both nodes - the rcron job shall be executed in rcron environment as follows (the job is only example, syntax as in cron, this job is configured to be executed every minute - in the output file we will check if the job has been executed or not):&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@centOS-hostA log]# crontab -l&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;* * * * * &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;/usr/local/bin/rcron --conf /etc/rcron/rcron.conf&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt; echo `date` &amp;gt;&amp;gt; /tmp/output&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;[root@centOS-hostA log]#&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
And that is it.&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Limitations&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Keepalived does not have any hook/notification that would allow to update the status file when the daemon is exiting. It means that there is an additional piece of software needed that would monitor the status of keepalived and update the rcron file if it shuts down. The perfect candidate for that purpose would be the upstart init daemon but unfortunately it is not part of CentOS 5.7 (as soon as I upgrade to CentOS 6 I will try it out)&lt;/li&gt;
&lt;li&gt;RCron is usually not part of any standard repository and have to be compiled from the source. Also there is no support for it which makes it difficult for commercial purposes.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Conlusions&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;RCron together with keepalived could provide the redundancy and failover for the periodic jobs but there are certain limitation described above that have to be taken into account.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/7448675729755394761/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/10/linux-cronjob-redundancy-and-failover.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/7448675729755394761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/7448675729755394761'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/10/linux-cronjob-redundancy-and-failover.html' title='Linux: cronjob redundancy and failover with rcron &amp; keepalived)'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY27oDgU57VGEnh9AhLEUbEADSLOmoBYJtAvB89LENrZ-GfllcyHnUjDwVM0CkrWgLZXm10vBwmIhvwgWsWuM9Mhjun0sHJ2kMQEfD21xq2ICsJayHqd5nimdsHz4ALaA_ywXc1hFNTQU/s72-c/keepalived3.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-660748373613049945</id><published>2011-10-01T14:46:00.000-07:00</published><updated>2011-10-01T14:46:35.815-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Ubuntu: encrypted private folder for user</title><content type='html'>Have you ever wanted to protect your sensitive data on your Linux workstation so that nobody (even the root user) would be able to access it without providing the proper password? Recently I had this problem but fortunately it is not that difficult to achieve on Ubuntu box.&lt;br /&gt;
I hope that you find the instructions below useful as these were the commands that I used to create/mount and use an encrypted folder. First of all you need to install the ecryptfs-utils package - it is in official repos: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;krychu@krystianek:~$ sudo apt-get install ecryptfs-utils &lt;br /&gt;[sudo] password for krychu: &lt;br /&gt;Reading package lists... Done&lt;br /&gt;Building dependency tree&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;Reading state information... Done&lt;br /&gt;...&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: black; font-family: inherit;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: black; font-family: inherit;&quot;&gt;
Next you need to setup the encrypted private folder as follows: &lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;krychu@krystianek:~$ ecryptfs-setup-private &lt;br /&gt;Enter your login passphrase: &lt;br /&gt;Enter your mount passphrase [leave blank to generate one]: &lt;br /&gt;Enter your mount passphrase (again): &lt;br /&gt;&lt;br /&gt;************************************************************************&lt;br /&gt;YOU SHOULD RECORD YOUR MOUNT PASSPHRASE AND STORE IT IN A SAFE LOCATION.&lt;br /&gt;&amp;nbsp; ecryptfs-unwrap-passphrase ~/.ecryptfs/wrapped-passphrase&lt;br /&gt;THIS WILL BE REQUIRED IF YOU NEED TO RECOVER YOUR DATA AT A LATER TIME.&lt;br /&gt;************************************************************************&lt;br /&gt;&lt;br /&gt;/sbin/restorecon&lt;br /&gt;/sbin/restorecon&lt;br /&gt;&lt;br /&gt;Done configuring.&lt;br /&gt;&lt;br /&gt;Testing mount/write/umount/read...&lt;br /&gt;Inserted auth tok with sig [cbb481a8ce68b47a] into the user session keyring&lt;br /&gt;Inserted auth tok with sig [d38d63afc3777fe9] into the user session keyring&lt;br /&gt;Inserted auth tok with sig [cbb481a8ce68b47a] into the user session keyring&lt;br /&gt;Inserted auth tok with sig [d38d63afc3777fe9] into the user session keyring&lt;br /&gt;Testing succeeded.&lt;br /&gt;&lt;br /&gt;Logout, and log back in to begin using your encrypted directory.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Now by default the encrypted private folder will be automatically mounted during next user logon (if you want to change that behavior) but there is also a possibility to explicitly mount/umount it - below you can find commands/instructions to achieve that:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;krychu@krystianek:~$ ecryptfs-mount-private &lt;br /&gt;Enter your login passphrase:&lt;br /&gt;Inserted auth tok with sig [cbb481a8ce68b47a] into the user session keyring&lt;br /&gt;krychu@krystianek:~$ mount&lt;br /&gt;...&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;/home/krychu/.Private on /home/krychu/Private type ecryptfs (ecryptfs_check_dev_ruid,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=cbb481a8ce68b47a,ecryptfs_fnek_sig=d38d63afc3777fe9)&lt;br /&gt;krychu@krystianek:~$ ecryptfs-umount-private &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Disable auto-mount for encrypted private folder&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The auto mounting of the encrypted Private folder is controlled by the presence of the empty auto-mount file in the $HOME/.ecryptfs/ directory. If you would like to remove it then just follow the instructions (remove it from this folder): &lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;krychu@krystianek:~$ cd .ecryptfs/&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;krychu@krystianek:~/.ecryptfs$ ls&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;auto-mount&amp;nbsp; auto-umount&amp;nbsp; Private.mnt&amp;nbsp; Private.sig&amp;nbsp; wrapped-passphrase&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;krychu@krystianek:~/.ecryptfs$ rm auto-mount auto-umount &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;krychu@krystianek:~/.ecryptfs$&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
After the next login the encrypted Private folder will not be automatically mounted. The user will have to explicitly call the ecryptfs-mount-private command in order to mount it.</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/660748373613049945/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/10/ubuntu-encrypted-private-folder-for.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/660748373613049945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/660748373613049945'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/10/ubuntu-encrypted-private-folder-for.html' title='Ubuntu: encrypted private folder for user'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-4550364706814356926</id><published>2011-09-11T12:15:00.000-07:00</published><updated>2011-09-11T12:15:37.197-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HA"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="network"/><title type='text'>Linux: Configuring cluster VIP (Virtual IP) with keepalived: Part 3</title><content type='html'>&lt;a href=&quot;http://krystianekb.blogspot.com/2011/09/linux-configuring-single-cluster-vip.html&quot;&gt;The first part&lt;/a&gt; of this article is focusing on the configuration of keepalived, &lt;a href=&quot;http://krystianekb.blogspot.com/2011/09/linux-configuring-cluster-vip-virtual.html&quot;&gt;the second part&lt;/a&gt; is focusing on two test scenarios - node failure and recovery. In this part I would like to discuss the option that was added recently to keepalived namely monitoring the network interface status (meaning if the VIP interface is down there should a failover happen) and show which enhancements are required in order to enable it.&lt;br /&gt;
Let me first remind you the environment configuration- &lt;i&gt;Figure 1&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2z5AnDTIebQNbn_d7vuv_eJyF-w1D5Gt_BW36gwUFneeMSf12vfQtIucTHeL2RRQ8Qe-nSpygi5EVLVRTRIwMEh9hldRPB6Njr044QF7PigwZo0ZeKty-QJD7LCjh78TheFuq85cLiPY/s1600/keepalived2.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2z5AnDTIebQNbn_d7vuv_eJyF-w1D5Gt_BW36gwUFneeMSf12vfQtIucTHeL2RRQ8Qe-nSpygi5EVLVRTRIwMEh9hldRPB6Njr044QF7PigwZo0ZeKty-QJD7LCjh78TheFuq85cLiPY/s320/keepalived2.jpeg&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Figure 1&lt;/i&gt; Network deployment of the test environment for &lt;br /&gt;
the keepalived&#39;s VIP failover&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Case C - VIP network interface status monitoring - interface down&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
What we would like to have is the failover to the BACKUP keepalived node in case something happens to the network interface to which the VIP address is assigned. This feature is supported by the keepalived 1.2.2 but required an enhancement of the configuration file:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[root@centOS-hostA ~]# cat /etc/keepalived/keepalived.conf&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;vrrp_instance VI_1 {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; state MASTER&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; interface eth0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; virtual_router_id 51&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; priority 101&lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; track_interface {&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eth1&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; virtual_ipaddress {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 192.168.122.50/24 brd 192.168.122.255 dev eth1 label eth1:0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
and the same for the BACKUP node (HostB):&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;[root@centOS-hostB ~]# cat /etc/keepalived/keepalived.conf&lt;br /&gt;vrrp_instance VI_1 {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; state BACKUP&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; interface eth0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; virtual_router_id 51&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; priority 101&lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; track_interface {&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eth1&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; virtual_ipaddress {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 192.168.122.50/24 brd 192.168.122.255 dev eth1 label eth1:0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;
Where the eth1 is the interface to which the VIP address is assigned to, eth0 stands for the interconnect.&lt;br /&gt;
Test methodology:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;We constantly ping the VIP address from the client station&lt;/li&gt;
&lt;li&gt;We simulate a network interface error (we shut it down)&lt;/li&gt;
&lt;li&gt;We check ping output if there was a smooth failover&lt;/li&gt;
&lt;li&gt;We check the ARP table which MAC is used&lt;/li&gt;
&lt;li&gt;We sniff the interface to get the information what caused the client&#39;s machine ARP table update&lt;/li&gt;
&lt;li&gt;Check the HostA&#39;s log files &lt;/li&gt;
&lt;/ol&gt;
Let&#39;s first do a snapshot of the client&#39;s station before issuing any additional steps - the entry in the ARP maps the VIP address to the HostA&#39;s MAC:&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&lt;b style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;krychu@krystianek:~$ arp -na&lt;br /&gt;... &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
? (192.168.122.50) at 52:54:00:03:ba:f2 [ether] on virbr0&lt;br /&gt;...&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;krychu@krystianek:~$&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;br /&gt;
Now the results. After issuing the first two steps (the interface failure was simulated by ifconfig eth1 down) the keepalived on hostA has changed its status to FAILED and as expected the VIP address has been failed over. However this time one can notice that some ICMP echo replies are lost:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;b style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;krychu@krystianek:~$ ping 192.168.122.50&lt;br /&gt;PING 192.168.122.50 (192.168.122.50) 56(84) bytes of data.&lt;br /&gt;... &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;64 bytes from 192.168.122.50: icmp_req=5 ttl=64 time=0.411 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=6 ttl=64 time=0.376 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=7 ttl=64 time=0.387 ms&lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;64 bytes from 192.168.122.50: icmp_req=8 ttl=64 time=0.411 ms&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;64 bytes from 192.168.122.50: icmp_req=13 ttl=64 time=0.532 ms&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;64 bytes from 192.168.122.50: icmp_req=14 ttl=64 time=0.324 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=15 ttl=64 time=0.444 ms&lt;br /&gt;... &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;^C&lt;br /&gt;--- 192.168.122.50 ping statistics ---&lt;br /&gt;22 packets transmitted, 18 received, 18% packet loss, time 20997ms&lt;br /&gt;rtt min/avg/max/mdev = 0.295/0.408/0.683/0.088 ms&lt;br /&gt;krychu@krystianek:~$ arp -na&lt;br /&gt;...&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;? (192.168.122.50) at &lt;span style=&quot;color: red;&quot;&gt;52:54:00:56:c3:f4&lt;/span&gt; [ether] on virbr0&lt;br /&gt;...&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
The information about transition can be found in the logs:&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: xx-small;&quot;&gt;Sep 11 19:09:45 centOS-hostA Keepalived: Starting VRRP child process, pid=3411&lt;br /&gt;Sep 11 19:09:45 centOS-hostA Keepalived_vrrp: Opening file &#39;/etc/keepalived/keepalived.conf&#39;. &lt;br /&gt;Sep 11 19:09:45 centOS-hostA Keepalived_vrrp: Configuration is using : 63057 Bytes&lt;br /&gt;Sep 11 19:09:45 centOS-hostA Keepalived_vrrp: Using LinkWatch kernel netlink reflector...&lt;br /&gt;Sep 11 19:09:45 centOS-hostA Keepalived_vrrp: VRRP sockpool: [ifindex(2), proto(112), fd(10,11)]&lt;br /&gt;Sep 11 19:09:46 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE&lt;br /&gt;Sep 11 19:09:47 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE&lt;br /&gt;Sep 11 19:09:47 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs.&lt;br /&gt;Sep 11 19:09:47 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;br /&gt;Sep 11 19:09:52 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;Sep 11 20:55:37 centOS-hostA Keepalived_vrrp: Kernel is reporting: interface eth1 DOWN&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;Sep 11 20:55:37 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Entering FAULT STATE&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;Sep 11 20:55:37 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) removing protocol VIPs.&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;Sep 11 20:55:37 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Now in FAULT state&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Case D - VIP network interface status monitoring - interface up&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Now let&#39;s simulate that the network interface on HostA is brought back (by executing the ifconfig eth1 up).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;As one can see there is nothing to be noticed in the ICMP echo replies, also client&#39;s station&#39;s ARP table entry remained unchanged.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;krychu@krystianek:~$ ping 192.168.122.50&lt;br /&gt;PING 192.168.122.50 (192.168.122.50) 56(84) bytes of data.&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=1 ttl=64 time=3.57 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=2 ttl=64 time=0.446 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=3 ttl=64 time=0.387 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=4 ttl=64 time=0.374 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=5 ttl=64 time=0.395 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=6 ttl=64 time=0.368 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=7 ttl=64 time=0.571 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=8 ttl=64 time=0.288 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=9 ttl=64 time=0.380 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=10 ttl=64 time=0.371 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=11 ttl=64 time=0.353 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=12 ttl=64 time=0.359 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=13 ttl=64 time=0.387 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=14 ttl=64 time=0.367 ms&lt;br /&gt;64 bytes from 192.168.122.50: icmp_req=15 ttl=64 time=0.366 ms&lt;br /&gt;^C&lt;br /&gt;--- 192.168.122.50 ping statistics ---&lt;br /&gt;15 packets transmitted, 15 received, 0% packet loss, time 14000ms&lt;br /&gt;rtt min/avg/max/mdev = 0.288/0.599/3.579/0.798 ms&lt;br /&gt;krychu@krystianek:~$ arp -na&lt;br /&gt;... &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;? (192.168.122.50) at &lt;span style=&quot;color: red;&quot;&gt;52:54:00:56:c3:f4&lt;/span&gt; [ether] on virbr0&lt;br /&gt;... &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;krychu@krystianek:~$ &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;So what has happened? The answer can be found in the logs:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: xx-small;&quot;&gt;Sep 11 19:09:46 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE&lt;br /&gt;Sep 11 19:09:47 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE&lt;br /&gt;Sep 11 19:09:47 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs.&lt;br /&gt;Sep 11 19:09:47 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;br /&gt;Sep 11 19:09:52 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;br /&gt;Sep 11 20:55:37 centOS-hostA Keepalived_vrrp: Kernel is reporting: interface eth1 DOWN&lt;br /&gt;Sep 11 20:55:37 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Entering FAULT STATE&lt;br /&gt;Sep 11 20:55:37 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) removing protocol VIPs.&lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;Sep 11 20:55:37 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Now in FAULT state&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;Sep 11 21:00:50 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Entering BACKUP STATE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;The HostA&#39;s keepalived has changed the state from FAULTY to BACKUP and HostB remained the MASTER. It loks strange and not consistent with the node failure/recovery transitions but let&#39;s try to shutdown the HostB now and see if HostA will transistion into MASTER.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: xx-small;&quot;&gt;Sep 11 19:09:46 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE&lt;br /&gt;Sep 11 19:09:47 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE&lt;br /&gt;Sep 11 19:09:47 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs.&lt;br /&gt;Sep 11 19:09:47 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;br /&gt;Sep 11 19:09:52 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;br /&gt;Sep 11 20:55:37 centOS-hostA Keepalived_vrrp: Kernel is reporting: interface eth1 DOWN&lt;br /&gt;Sep 11 20:55:37 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Entering FAULT STATE&lt;br /&gt;Sep 11 20:55:37 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) removing protocol VIPs.&lt;br /&gt;Sep 11 20:55:37 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Now in FAULT state&lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;Sep 11 21:00:50 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Entering BACKUP STATE&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;Sep 11 21:06:15 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;Sep 11 21:06:16 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;Sep 11 21:06:16 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs.&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;Sep 11 21:06:16 centOS-hostA Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;As expected - after shutdown of HostB, HostA took over the role of MASTER and send the gratuitous ARP to update client station&#39;s ARP table. So the HA is provided but it still looks a bit inconsistent compared to the other scenarios&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;Summary&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Although I did not check all scenarios related to the network problems - it seems that keepalived provides good support for monitoring the network interface&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;. In the doc/samples/(...)track_interface file one can also find examples how to monitor multiple network interfaces.&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/4550364706814356926/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/09/linux-configuring-cluster-vip-virtual_11.html#comment-form' title='Komentarze (1)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/4550364706814356926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/4550364706814356926'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/09/linux-configuring-cluster-vip-virtual_11.html' title='Linux: Configuring cluster VIP (Virtual IP) with keepalived: Part 3'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2z5AnDTIebQNbn_d7vuv_eJyF-w1D5Gt_BW36gwUFneeMSf12vfQtIucTHeL2RRQ8Qe-nSpygi5EVLVRTRIwMEh9hldRPB6Njr044QF7PigwZo0ZeKty-QJD7LCjh78TheFuq85cLiPY/s72-c/keepalived2.jpeg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-7652981531599558030</id><published>2011-09-11T03:16:00.000-07:00</published><updated>2011-09-11T03:18:22.808-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HA"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="network"/><category scheme="http://www.blogger.com/atom/ns#" term="os"/><title type='text'>Linux: Configuring cluster VIP (Virtual IP) with keepalived: Part 2</title><content type='html'>&lt;a href=&quot;http://krystianekb.blogspot.com/2011/09/linux-configuring-single-cluster-vip.html&quot;&gt;The first part of this article&lt;/a&gt;&amp;nbsp;is focusing on the instructions/guide how to setup keepalived with VIP address for a two node configuration. I have enhanced the picture from the previous article with the ARP configuration since the ARPs will be used throughout this part to describe the mechanisms for VIP failover.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2z5AnDTIebQNbn_d7vuv_eJyF-w1D5Gt_BW36gwUFneeMSf12vfQtIucTHeL2RRQ8Qe-nSpygi5EVLVRTRIwMEh9hldRPB6Njr044QF7PigwZo0ZeKty-QJD7LCjh78TheFuq85cLiPY/s1600/keepalived2.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2z5AnDTIebQNbn_d7vuv_eJyF-w1D5Gt_BW36gwUFneeMSf12vfQtIucTHeL2RRQ8Qe-nSpygi5EVLVRTRIwMEh9hldRPB6Njr044QF7PigwZo0ZeKty-QJD7LCjh78TheFuq85cLiPY/s320/keepalived2.jpeg&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Figure 1&lt;/i&gt;&amp;nbsp;Deployment diagram of the keepalived for a two node configuration&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In this part there will be two test scenarios described:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;The master goes down (Host A)&lt;/li&gt;
&lt;li&gt;The master starts up again (Host A)&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Other cases involving Backup node (Host B) are not relevant to be described in detail since in these cases there is no VIP failover done.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Case A The master goes down (Host A)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Let&#39;s first check how the envrionment looks like from the client station perspective. Both nodes (HostA and HostB) are up and running with the keepalived as described in&amp;nbsp;&lt;a href=&quot;http://krystianekb.blogspot.com/2011/09/linux-configuring-single-cluster-vip.html&quot;&gt;part 1 or this article&lt;/a&gt;. The client station is able to ping the VIP address:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;krychu@krystianek:~$ ping 192.168.122.50&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;PING 192.168.122.50 (192.168.122.50) 56(84) bytes of data.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;64 bytes from 192.168.122.50: icmp_req=1 ttl=64 time=0.394 ms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;64 bytes from 192.168.122.50: icmp_req=2 ttl=64 time=0.353 ms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;64 bytes from 192.168.122.50: icmp_req=3 ttl=64 time=0.270 ms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;64 bytes from 192.168.122.50: icmp_req=4 ttl=64 time=0.814 ms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;^C&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;--- 192.168.122.50 ping statistics ---&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;4 packets transmitted, 4 received, 0% packet loss, time 2998ms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;rtt min/avg/max/mdev = 0.270/0.457/0.814/0.212 ms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
By looking into the arp table:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;krychu@krystianek:~$ arp -an&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;? (192.168.122.50) at 52:54:00:03:ba:f2 [ether] on virbr0? (192.168.122.179) at &lt;incomplete&gt; on virbr0&lt;/incomplete&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
we see that the Host A is the one available under the VIP (192.168.122.50) address, which is as we expected it to be since this is the master.&lt;/div&gt;
&lt;div&gt;
Now let&#39;s simulate a crash of the master node as follows:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;We constantly ping the VIP address from the client station&lt;/li&gt;
&lt;li&gt;We simulate a crash of the keepalived process on the master node (Host A), e.g. kill -9&lt;/li&gt;
&lt;li&gt;We check ping output if there was a smooth failover&lt;/li&gt;
&lt;li&gt;We check the ARP table which MAC is used&lt;/li&gt;
&lt;li&gt;We sniff the interface to get the information what caused the client&#39;s machine ARP table update&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Ok, so what are the results? First of all the node crash does have effect on ICMP packets being dropped - there is a small increase in the response time to about 20.1 ms (please take a look below).&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;krychu@krystianek:~$ ping 192.168.122.50&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;PING 192.168.122.50 (192.168.122.50) 56(84) bytes of data.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;...&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;64 bytes from 192.168.122.50: icmp_req=37 ttl=64 time=0.336 ms&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;64 bytes from 192.168.122.50: icmp_req=38 ttl=64 time=0.398 ms&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;64 bytes from 192.168.122.50: icmp_req=39 ttl=64 time=0.273 ms&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;64 bytes from 192.168.122.50: icmp_req=40 ttl=64 time=0.298 ms&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;64 bytes from 192.168.122.50: icmp_req=41 ttl=64 time=20.1 ms&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;64 bytes from 192.168.122.50: icmp_req=42 ttl=64 time=0.320 ms&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;64 bytes from 192.168.122.50: icmp_req=43 ttl=64 time=0.379 ms&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;64 bytes from 192.168.122.50: icmp_req=44 ttl=64 time=0.314 ms&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;...&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;^C&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;--- 192.168.122.50 ping statistics ---&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;67 packets transmitted, 67 received, 0% packet loss, time 65997ms&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;rtt min/avg/max/mdev = 0.198/0.742/20.167/2.472 ms&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The proof that the failover has happened can be found in the ARP table - which now has the assignment for the VIP address to the HostB&#39;s MAC (previousle Backup keepalived server).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;krychu@krystianek:~$ arp -an&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;? (192.168.122.50) at 52:54:00:56:c3:f4 [ether] on virbr0&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In the wireshark we see that the backup node (HostB) has sent the Gratuitous ARP message to a broadcast MAC announcing that he is the one owning now the VIP address. Afterwards the client station has updated it&#39;s ARP cache table.&lt;/div&gt;
&lt;div&gt;
If we check the keepalived logs on the HostB one can see that after the crash of the HostA has been detected the keepalived is transitioning from the BACKUP to MASTER state:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 09:50:49 centOS-hostB Keepalived_vrrp: Using LinkWatch kernel netlink reflector...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 09:50:49 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Entering BACKUP STATE&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 09:50:49 centOS-hostB Keepalived_vrrp: VRRP sockpool: [ifindex(2), proto(112), fd(10,11)]&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 10:55:04 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 10:55:05 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 10:55:05 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 10:55:05 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 10:55:10 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 10:55:45 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Received higher prio advert&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 10:55:45 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Entering BACKUP STATE&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 10:55:45 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) removing protocol VIPs.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 10:58:35 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 10:58:36 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 10:58:36 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 10:58:36 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 10:58:41 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 11:32:40 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Received higher prio advert&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 11:32:40 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Entering BACKUP STATE&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 11:32:40 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) removing protocol VIPs.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 11:39:54 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 11:39:55 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 11:39:55 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 11:39:55 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;b&gt;Sep 11 11:40:00 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Case B The master is back (Host A)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Now let&#39;s focus on the situation when the Host A is brought back after a crash. Just as a reminder the situation is that after a crash HostB took over the Master role, owns the VIP address and the client station has an association to HostB&#39;s MAC in its ARP table.&lt;/div&gt;
&lt;div&gt;
The methodology is similar as in Case A:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;We constantly ping the VIP address from the client station&lt;/li&gt;
&lt;li&gt;We start the keepalived on the HostA&lt;/li&gt;
&lt;li&gt;We check ping output if there was a smooth failover&lt;/li&gt;
&lt;li&gt;We check the ARP table which MAC is used&lt;/li&gt;
&lt;li&gt;We sniff the interface to get the information what caused the client&#39;s machine ARP table update&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
After issuing step 1 and 2 we see again an increase in the response time in the ICMP traffic but much smaller than in case of the crash.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;krychu@krystianek:~$ ping 192.168.122.50&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;PING 192.168.122.50 (192.168.122.50) 56(84) bytes of data.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;64 bytes from 192.168.122.50: icmp_req=23 ttl=64 time=0.191 ms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;64 bytes from 192.168.122.50: icmp_req=24 ttl=64 time=0.346 ms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;64 bytes from 192.168.122.50: icmp_req=25 ttl=64 time=0.331 ms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;64 bytes from 192.168.122.50: icmp_req=26 ttl=64 time=0.291 ms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;64 bytes from 192.168.122.50: icmp_req=27 ttl=64 time=2.53 ms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;64 bytes from 192.168.122.50: icmp_req=28 ttl=64 time=0.315 ms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;64 bytes from 192.168.122.50: icmp_req=29 ttl=64 time=0.338 ms&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
However it is still not a proof that a failover actually has happened. Let&#39;s take a look at the client station&#39;s ARP table:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;krychu@krystianek:~$ arp -an&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;? (192.168.122.50) at &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;52:54:00:03:ba:f2&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt; [ether] on virbr0&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
We see that the original mapping (presented in case A), which was pointing to HostB&#39;s MAC now points to HostA&#39;s. Which indicates the VIP address is now owned by the HostA again. In the wireshark we again see&amp;nbsp;the Gratuitous ARP message to a broadcast MAC announcing sent by the HostA. On this basis the client station has updated it&#39;s ARP cache table.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In the logs on HostB one can find the information that after startup of HostA keepalived on HostB is transitioning to BACKUP state since it has received an announcement with a higher priority (review the configuration files from part 1)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 10:55:45 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Entering BACKUP STATE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 10:55:45 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) removing protocol VIPs.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 10:58:35 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 10:58:36 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 10:58:36 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 10:58:36 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 10:58:41 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 11:32:40 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Received higher prio advert&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 11:32:40 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Entering BACKUP STATE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 11:32:40 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) removing protocol VIPs.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 11:39:54 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 11:39:55 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 11:39:55 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 11:39:55 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 11:40:00 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth1 for 192.168.122.50&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 11:57:32 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Received higher prio advert&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 11:57:32 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) Entering BACKUP STATE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Sep 11 11:57:32 centOS-hostB Keepalived_vrrp: VRRP_Instance(VI_1) removing protocol VIPs.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Summary&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
I hope that this&amp;nbsp;exercise&amp;nbsp;gave you a good understaning of the mechanisms controlling the VIP address failover in the keepalived and also some practical&amp;nbsp;knowledge&amp;nbsp;about how to setup such a test environment. For me this activity has been a great experience and fun. I think also it is a good base for further research - about the failure detection mechanisms (happening on the interconnect interface) and providing the application (e.g. HAProxy) on top of keepalived.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Just to summarize the VIP address failover is controlled by a special ARP message (Gratuitous ARP) which has to be accepted and processed by the client station. By processing I mean that the client&#39;s station&#39;s ARP table mapping have to be updated accordingly.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
From the software perspective - the keepalived daemon allows to configure the VIP failover groups and &amp;nbsp;assign MASTER, BACKUP roles for hosts within such a group. There is also a failure detection available which works fast (for a genuine keepalived configuration it was not higher than 20 ms) and controls the VIP address ownership.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/7652981531599558030/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/09/linux-configuring-cluster-vip-virtual.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/7652981531599558030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/7652981531599558030'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/09/linux-configuring-cluster-vip-virtual.html' title='Linux: Configuring cluster VIP (Virtual IP) with keepalived: Part 2'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2z5AnDTIebQNbn_d7vuv_eJyF-w1D5Gt_BW36gwUFneeMSf12vfQtIucTHeL2RRQ8Qe-nSpygi5EVLVRTRIwMEh9hldRPB6Njr044QF7PigwZo0ZeKty-QJD7LCjh78TheFuq85cLiPY/s72-c/keepalived2.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-5370323941818951654</id><published>2011-09-11T01:35:00.000-07:00</published><updated>2011-09-11T03:18:35.331-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HA"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="network"/><category scheme="http://www.blogger.com/atom/ns#" term="os"/><title type='text'>Linux: Configuring cluster VIP (Virtual IP) with keepalived: Part 1</title><content type='html'>Some time ago I had a discussion about open source load balancing solutions (e.g. HAProxy) &amp;nbsp;especially with the focus on HA and VIP address failover (by VIP address failover we meant that the public IP is moved to the second node in case the first one is shutdown). It came to me that I have never in practice done that and I decided to built up such a solution - just to check the second point, namely the VIP address failover. For that I used my Ubuntu box together with two virtualized environments based on CentOS (these I had already available in kvm) - the configuration is shown on the picture below:&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;+&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK8di81yXpsSVREpZbUv4pPDvjUDo_i8zfZqHrnTrIUeKY7oYSjIJ6wmlx0FRQJo_jpyIwS6qnh3xket6NXrur-uCAP8h8ze_cuKv0jjcjJ1tLk-SG0o6_6Mo0gbaHy1AVz2e3sFCzZqo/s1600/keepalived.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK8di81yXpsSVREpZbUv4pPDvjUDo_i8zfZqHrnTrIUeKY7oYSjIJ6wmlx0FRQJo_jpyIwS6qnh3xket6NXrur-uCAP8h8ze_cuKv0jjcjJ1tLk-SG0o6_6Mo0gbaHy1AVz2e3sFCzZqo/s320/keepalived.jpeg&quot; width=&quot;317&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Figure 1&lt;/i&gt; Network deployment of the test environment for &lt;br /&gt;
the keepalived&#39;s VIP failover&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Ok, having the picture in mind let&#39;s get to work.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Test envrionment setup&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
The presented below points show how to configure it:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Define additional Interconnect network. &lt;/b&gt;For doing that I used the virt-manager GUI: Edit-&amp;gt;Connection Details and there should a window appear (just as the one presented on the Figure 2). In the Virtual Networks tab you should add a new network (a &#39;+&#39; button in the bottom of the window)&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO__5Z1k6-7a6LWwfYVyjsd-6W912MwLkPtEZe_JIDQyCZSA7EdA_enGYaDikAWGja7hk0xaqZrAcxTSv8j215YcbYA9gtguLGGIbCEx5HFm-iSqINeSmv8qu7vaXU5Fr3Fo5Dm51IUVY/s1600/InterconnectNetwork.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;140&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO__5Z1k6-7a6LWwfYVyjsd-6W912MwLkPtEZe_JIDQyCZSA7EdA_enGYaDikAWGja7hk0xaqZrAcxTSv8j215YcbYA9gtguLGGIbCEx5HFm-iSqINeSmv8qu7vaXU5Fr3Fo5Dm51IUVY/s200/InterconnectNetwork.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Figure 2&lt;/i&gt; Interconnect virtual network&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Install two machines (Host A and B) that will be hosting the keepalived&lt;/b&gt;. I already had one CentOS kvm which I cloned to have the Host B (using virt-manager it is very simple and can be done via main GUI)&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Install keepalived. &lt;/b&gt;CentOS does not have the keepalived in its repos so I had to download the latest sources from the web:&amp;nbsp;&lt;a href=&quot;http://www.keepalived.org/software/keepalived-1.2.2.tar.gz&quot;&gt;http://www.keepalived.org/software/keepalived-1.2.2.tar.gz&lt;/a&gt;. After unpacking I did not have to download any additional dependencies and I just followed the INSTALL instructions - as usual steps: configure, make, make install ;) In order to build the keepalived only once (for two hosts) you might also install it before cloning the image (after the image has been cloned it has the keepalived).&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Configure sysctl. &lt;/b&gt;In the manual I read that one should enhance the sysctl configuration in order to allow the application to bind to non local addresses - add these line to /etc/sysctl.conf:&lt;br /&gt;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;net.ipv4.ip_nonlocal_bind = 1&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; and execute:&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;sysctl -p&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Reconfigure firewall.&lt;/b&gt;&amp;nbsp;The keepalived utilizes multicast address (224.0.0.18) for exchanging information about the status of the nodes belonging to specific groups. What needs to be done is to allow the multicast traffic to go over the Interconnect network (eth0) interface. In my case for testing purposes I have just disabled the firewall (in Gnome: System-&amp;gt;Administration-&amp;gt;Security Level and Firewall)&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Configure the master host (Host A). &lt;/b&gt;One needs to adapt or create the /etc/keepalived/keepalived.conf file as follows:&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;[root@localhost ~]# cat /etc/keepalived/keepalived.conf&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;
vrrp_instance VI_1 {&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;
    state MASTER&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;
    interface eth0&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;
    virtual_router_id 51&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;
    priority 102&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;
    virtual_ipaddress {&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;
        192.168.122.50/24 brd 192.168.122.255 dev eth1 label eth1:0&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;
    }&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;
}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
where eth0 is the interface for interconnect and eth1 is the interface for communication with external world (VIP)&lt;br /&gt;
&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Configure the backup host (Host B). &lt;/b&gt;The configuration file /etc/keepalived/keepalived.conf would be mostly the same for both hosts (as for host A) - what one has to remember is to set the Host B into backup mode with lower priority&lt;br /&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;
[root@centos1-priv ~]# cat /etc/keepalived/keepalived.conf&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;
vrrp_instance VI_1 {&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;
    state BACKUP&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;
    interface eth0&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;
    virtual_router_id 51&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;
    priority 101&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;virtual_ipaddress {&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;
        192.168.122.50/24 brd 192.168.122.255 dev eth1 label eth1:0&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;
    }&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;
}&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
where eth0 is the interface for interconnect and eth1 is the interface for communication with external world (VIP)&lt;br /&gt;&lt;br /&gt;


&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Startup keepalived on both hosts. &lt;/b&gt;The best way to start the keepalived is to use the init/startup scripts provided with the source package&lt;br /&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6fa8dc; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;
# /etc/init.d/keepalived start&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
If you cannot find the script you can get it from the keepalived source package&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Proceed to the test (see Part 2)&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/5370323941818951654/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/09/linux-configuring-single-cluster-vip.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/5370323941818951654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/5370323941818951654'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/09/linux-configuring-single-cluster-vip.html' title='Linux: Configuring cluster VIP (Virtual IP) with keepalived: Part 1'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK8di81yXpsSVREpZbUv4pPDvjUDo_i8zfZqHrnTrIUeKY7oYSjIJ6wmlx0FRQJo_jpyIwS6qnh3xket6NXrur-uCAP8h8ze_cuKv0jjcjJ1tLk-SG0o6_6Mo0gbaHy1AVz2e3sFCzZqo/s72-c/keepalived.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-1853975183534631176</id><published>2011-08-30T13:09:00.000-07:00</published><updated>2011-08-30T13:09:04.616-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bios"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Linux: Bootable USB stick with FreeDOS for upgrading BIOS</title><content type='html'>Today I was to upgrade a BIOS on one of the laptops (Dell Latitude E5400) that was running Linux Mint 11 distro. I downloaded a single .exe (in fact E5400A16.EXE - E5400 standing for the model, A16 for the version) file from the manufacturer (Dell) website which was to be used together with the bootable floppy. The main problem with that approach was that I did not have a floppy drive (which is not surprising as most of the current laptops do not have a floppy drive) so I had to find an alternative solution. The best idea for me was to create a bootable USB stick with FreeDOS under Linux, which is not that difficult since there is a great wiki that one can use to do it: &lt;a href=&quot;http://en.gentoo-wiki.com/wiki/FreeDOS_Flash_Drive&quot;&gt;http://en.gentoo-wiki.com/wiki/FreeDOS_Flash_Drive&lt;/a&gt;. I followed the guidelines with one exception namely that I used gparted for partitioning and formating the USB stick (below one can find the guidelines how to do it on Linux Mint 11 distro):&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;If not already available install gparted from the repo:&lt;br /&gt;
&lt;b style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;# sudo apt-get install gparted &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Start the gparted:&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;&lt;b&gt; # gparted&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Choose the device corresponding to you USB stick in the main menu gparted-&amp;gt;devices - in my case it was /dev/sdb&lt;/li&gt;
&lt;li&gt;Remove any partitions if there are any&lt;/li&gt;
&lt;li&gt;Create a new partition table: Device-&amp;gt;Create Partition Table&lt;/li&gt;
&lt;li&gt; Create a new partition: Partition-&amp;gt;New and choose fat16 as the filesystem&lt;/li&gt;
&lt;li&gt;Format partition with fat16 filesystem: Partition-&amp;gt;Format To&lt;/li&gt;
&lt;li&gt;Commit all operations: Edit-&amp;gt;Apply all operations&lt;/li&gt;
&lt;li&gt;Exit gparted and follow guidelines from the &lt;a href=&quot;http://en.gentoo-wiki.com/wiki/FreeDOS_Flash_Drive&quot;&gt;wiki&lt;/a&gt; starting with the FreeDOS (next MBR, Last Touch etc.)&lt;/li&gt;
&lt;/ol&gt;I hope that the reader will find these information helpful</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/1853975183534631176/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/08/linux-bootable-usb-stick-with-freedos.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/1853975183534631176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/1853975183534631176'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/08/linux-bootable-usb-stick-with-freedos.html' title='Linux: Bootable USB stick with FreeDOS for upgrading BIOS'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-4870338034086969579</id><published>2011-08-29T03:54:00.000-07:00</published><updated>2011-08-29T03:54:22.600-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="vpn"/><title type='text'>Ubuntu: importing Cisco VPN Client connections to vpnc (network manager)</title><content type='html'>Today I had to connect to my company&#39;s network via VPN and all I had from my windows workstation were the definition of the Cisco VPN Client connections in the .pcf format. Below I describe the steps to import these definitions into the network manager (vpnc).&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;In the network-manager click on the VPN connections option&amp;nbsp;&lt;/li&gt;
&lt;li&gt;You should see a window with a list of configured VPN connections and there should be a button &#39;Import&#39; to import an existing definition, e.g. in .pcf format&lt;/li&gt;
&lt;li&gt;Choose the .pcf file and the new connection shall be available&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Problems&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;b&gt;vpnc plugin for network-manager&lt;/b&gt;&amp;nbsp;- Please check if you have network-manager-vpnc package installed - which brings the plugin for the vpnc into the network manager. Otherwise you will face strange looking errors during import:&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre;&quot;&gt;Error: unknown PPTP file extension.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b style=&quot;font-family: inherit; white-space: pre;&quot;&gt;Missing description&lt;/b&gt;&lt;b style=&quot;font-family: inherit; white-space: pre;&quot;&gt; &lt;/b&gt;&lt;span style=&quot;font-family: inherit; white-space: pre;&quot;&gt;- although I have not encountered this problem I found it in some articles on the internet and decided to mention it here. It concerns network-manager-vpnc versions below 0.7.1 - and it occurs when the .pcf file lacks the Description variable in the [main] section&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Routing configuration &lt;/b&gt;- please check if the routing is properly configured. In my case I had to define additional routes to company&#39;s servers which is not difficult and can be done either via script or via GUI - when you edit your VPN connection it is located in the IPv4 settings and routes (screenshot of the window can be found below)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBuNNLDh702zMWFMmRjxhkKOhC57te55ReWH73559JoSm39rUxn2fJltVaKR43VtDUrapqbTQo1z1OE6FvX55LyItULUfwDXTGW0dcYriE9HoejyQL1O0ii0uKntWh28dMsNoPczDaOeo/s1600/routing-configuration.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;123&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBuNNLDh702zMWFMmRjxhkKOhC57te55ReWH73559JoSm39rUxn2fJltVaKR43VtDUrapqbTQo1z1OE6FvX55LyItULUfwDXTGW0dcYriE9HoejyQL1O0ii0uKntWh28dMsNoPczDaOeo/s200/routing-configuration.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/4870338034086969579/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/08/ubuntu-importing-cisco-vpn-client.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/4870338034086969579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/4870338034086969579'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/08/ubuntu-importing-cisco-vpn-client.html' title='Ubuntu: importing Cisco VPN Client connections to vpnc (network manager)'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBuNNLDh702zMWFMmRjxhkKOhC57te55ReWH73559JoSm39rUxn2fJltVaKR43VtDUrapqbTQo1z1OE6FvX55LyItULUfwDXTGW0dcYriE9HoejyQL1O0ii0uKntWh28dMsNoPczDaOeo/s72-c/routing-configuration.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-570628863367981549.post-2407680166739120031</id><published>2011-08-27T01:40:00.000-07:00</published><updated>2011-09-11T03:18:07.886-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="network"/><category scheme="http://www.blogger.com/atom/ns#" term="os"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Ubuntu: Nokia E52 as 3G modem on Natty 11.04 box</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;style type=&quot;text/css&quot;&gt;
	&lt;!--
		@page { margin: 0.79in }
		P { margin-bottom: 0.08in }
		A:link { so-language: zxx }
	--&gt;
	
&lt;/style&gt;  &lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;color: black; font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Last week I had some problems with the signal strength of the default 3G modem delivered by the operator (which appeared to be Huawei Technologies Co., Ltd. E220 HSDPA Modem / E270 HSDPA/HSUPA Modem) &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;together &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; with the so called Blueconnect offer (offered by the polish T-Mobile former ERA) while the signal strength on my mobile phone Nokia E52 seemed to be perfect. That is why I decided to try to connect with the Blueconnect using my mobile. The idea was to connect the phone to the laptop using the bluetooth and toward the radio network via 3G/GSM.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: black; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;color: black; font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in; text-align: justify;&quot;&gt;
First of all I did a reference speed measurement on the using the original Huwaei modem (&lt;a href=&quot;http://www.speedtest.net/&quot;&gt;http://www.speedtest.net/&lt;/a&gt;) - the results are presented below:&lt;/div&gt;
&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-9_kbZHZYIVM5BnMJyBn-oBtgrLOg1saWqKrWitTyY97XIVwvDd6kLSuTXR-Ng3NOzBVU5n1yXWSV4nBzQDXdy6bXCFIv5Y7pU0-8CPgPTUGZu4V1yIm_XD16dDFnODUQ12Glt_emn2M/s320/pingTestHuwaei3g.png&quot; width=&quot;320&quot; /&gt;&lt;br /&gt;
&amp;nbsp;   	 	 	 	&lt;style type=&quot;text/css&quot;&gt;
	&lt;!--
		@page { margin: 0.79in }
		P { margin-bottom: 0.08in }
	--&gt;
	
&lt;/style&gt;  &lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
Ok, as soon as I had the results I switch the card to my Nokia E52 mobile and started to configure the bluetooth connection. On Gnome there is a wizard for managing the bluetooth devices – it can be found  System-&amp;gt;Preferences-&amp;gt;Bluetooth or as in my case if you are using gnome-do just type bluetooth in the gnome-do window and just follow the instructions as on the screenshots below (please remember to enable the DUN):&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifjS0iRNxbHB0mvezRvdG-poXXM9dqYaRZo0BpwLl_uBq54GioszORqlBcFXSLzlAa7lgpMOX7rhxw7UelInfT5eNQGhT3STT-PYUznSJQNJ3oX7BfvHgU9DLTg6NRHiWWDbXS8JEfLlo/s1600/ScreenshotBlue-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifjS0iRNxbHB0mvezRvdG-poXXM9dqYaRZo0BpwLl_uBq54GioszORqlBcFXSLzlAa7lgpMOX7rhxw7UelInfT5eNQGhT3STT-PYUznSJQNJ3oX7BfvHgU9DLTg6NRHiWWDbXS8JEfLlo/s320/ScreenshotBlue-1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggOSn66A2gEG4Q_BjqtieMIWohk1iCA9zJlXkVpE0Is3sGsc8xbxXkQ6uuKqK0eqEyBX4YzIGgTp1-5ykgNINOwFXE1NYzfPY6glMk_SP6YcBZh1ahmgyVTRsJDPnbFjLkKBsg5YS24lU/s1600/ScreenshotBlue-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;284&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggOSn66A2gEG4Q_BjqtieMIWohk1iCA9zJlXkVpE0Is3sGsc8xbxXkQ6uuKqK0eqEyBX4YzIGgTp1-5ykgNINOwFXE1NYzfPY6glMk_SP6YcBZh1ahmgyVTRsJDPnbFjLkKBsg5YS24lU/s320/ScreenshotBlue-2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5ksc4UbqQXD-Pvbsrm9xWXZzYBrW6tA7oLhOhtUlnlrqoZk3Yv5w6WKJcZNB8edRAPnUjF5rdh_5vCCnC38FkZzFHR9UFJYHED6KUcwDD3k7HjeDT20DfKjZl4o7YR39xZss02XtAwfA/s1600/ScreenshotBlue-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;285&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5ksc4UbqQXD-Pvbsrm9xWXZzYBrW6tA7oLhOhtUlnlrqoZk3Yv5w6WKJcZNB8edRAPnUjF5rdh_5vCCnC38FkZzFHR9UFJYHED6KUcwDD3k7HjeDT20DfKjZl4o7YR39xZss02XtAwfA/s320/ScreenshotBlue-3.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuFn7Y_64n_YIbBSMFQuOUkemFImJ535Wy7s3LA384pq-1-kCUOg42FqyDbRgoZEJngkm7FVJmN2k9P0IhQFR91Yp_7YHBzzOYS2EZuMQFbUGxlYWHlozI9odF8eCOchrhzsaEem5EXV0/s1600/ScreenshotBlue-5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;285&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuFn7Y_64n_YIbBSMFQuOUkemFImJ535Wy7s3LA384pq-1-kCUOg42FqyDbRgoZEJngkm7FVJmN2k9P0IhQFR91Yp_7YHBzzOYS2EZuMQFbUGxlYWHlozI9odF8eCOchrhzsaEem5EXV0/s320/ScreenshotBlue-5.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7_KSZ8mkprOGBxL7ZDhrkJUiMWYVjdOBBeDfBTi0E6qHrjWmPObUKLX-gBiKfdw2ako4Dnyv-MMsgGck1cKqBCghika_SNcn5vxqOejMph4FW6JNtiF2H6bUvalpKSjLzGiU5akhjsLQ/s1600/ScreenshotBlue-6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;284&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7_KSZ8mkprOGBxL7ZDhrkJUiMWYVjdOBBeDfBTi0E6qHrjWmPObUKLX-gBiKfdw2ako4Dnyv-MMsgGck1cKqBCghika_SNcn5vxqOejMph4FW6JNtiF2H6bUvalpKSjLzGiU5akhjsLQ/s320/ScreenshotBlue-6.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9uSJlCLzb1fkKWuZoaTK_YFXrezcMXPyin3DgrK0Xsha1e7K-GFZA3MjI0h_xdCivyL4WElGVy9uV_AynQMMejQ2n9IXSH1dRx03O-5dl_QhNQR2lnDDO_gLGNHaTN2nrXNveiLcpqjo/s1600/ScreenshotBlue-7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;239&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9uSJlCLzb1fkKWuZoaTK_YFXrezcMXPyin3DgrK0Xsha1e7K-GFZA3MjI0h_xdCivyL4WElGVy9uV_AynQMMejQ2n9IXSH1dRx03O-5dl_QhNQR2lnDDO_gLGNHaTN2nrXNveiLcpqjo/s320/ScreenshotBlue-7.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho-DbC9UegrBtfM7gdPy6f-Bs3Z2V3hdGxzWwsgPTPG4HfniHJjGHNXCotmoktkBffHD2UsLYD7a9qafWlE2ciVJ2Qm0Oymb6GUa80lFQ_P4VGRTwYAgr6apWCOkJH7UiLGeD0GBUxAQc/s1600/ScreenshotBlue-8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho-DbC9UegrBtfM7gdPy6f-Bs3Z2V3hdGxzWwsgPTPG4HfniHJjGHNXCotmoktkBffHD2UsLYD7a9qafWlE2ciVJ2Qm0Oymb6GUa80lFQ_P4VGRTwYAgr6apWCOkJH7UiLGeD0GBUxAQc/s320/ScreenshotBlue-8.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1hVZgztEWIse9W5Drl2C5yx2o9RK-7ns4q3OjfjsZb9OKxXPCF3iQLUWK5bDLDg_trvwUpNEVMIzn4wSp73lfPiqeXLPe367ZLz0uofbByerlr18fjA6VaDqMqLdh0JcFBgG5hz9oeY4/s1600/ScreenshotBlue-9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1hVZgztEWIse9W5Drl2C5yx2o9RK-7ns4q3OjfjsZb9OKxXPCF3iQLUWK5bDLDg_trvwUpNEVMIzn4wSp73lfPiqeXLPe367ZLz0uofbByerlr18fjA6VaDqMqLdh0JcFBgG5hz9oeY4/s320/ScreenshotBlue-9.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqGltxOa4jK-uzbBLimm5pJen6p9B25dRw3riZF1PPuT-CZ6B19OQalSMBwHThQHuEQTCqchDgvH1c7lLo5diZ1Z6CKGX1x_yn3XacAWoY4pY2x5QyzQlFT5107zjDysVZYBTGXBexWvE/s1600/ScreenshotBlue-10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;239&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqGltxOa4jK-uzbBLimm5pJen6p9B25dRw3riZF1PPuT-CZ6B19OQalSMBwHThQHuEQTCqchDgvH1c7lLo5diZ1Z6CKGX1x_yn3XacAWoY4pY2x5QyzQlFT5107zjDysVZYBTGXBexWvE/s320/ScreenshotBlue-10.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUm2kGVRgoh5R9qBXpvO5ngYwWwtHXNjldeoTW5CQHtnDp2xa4LDHYwM9CZ1_V9Yit95VG4rtlNjcvms5klG17RNelikpK6tm3UyE6Ff5T3JY7ePYyjSqE3XG25LTBQQK_jbwkgrslQLI/s1600/ScreenshotBlue-11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;239&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUm2kGVRgoh5R9qBXpvO5ngYwWwtHXNjldeoTW5CQHtnDp2xa4LDHYwM9CZ1_V9Yit95VG4rtlNjcvms5klG17RNelikpK6tm3UyE6Ff5T3JY7ePYyjSqE3XG25LTBQQK_jbwkgrslQLI/s320/ScreenshotBlue-11.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh-NSrdcQnOqHlfzGqVLHfX5G_7Fef-CvB3AVhd3iG6QXWjyl0XvWnmdv7H7-NLLFYoJji-HeJ8r1fUPHfmVWED5Qw2pIAGnO8lIPeSd5divMxyLRy5W_NBtHZnL12RuS8qSQsf8iYHYk/s1600/ScreenshotBlue-12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;282&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh-NSrdcQnOqHlfzGqVLHfX5G_7Fef-CvB3AVhd3iG6QXWjyl0XvWnmdv7H7-NLLFYoJji-HeJ8r1fUPHfmVWED5Qw2pIAGnO8lIPeSd5divMxyLRy5W_NBtHZnL12RuS8qSQsf8iYHYk/s320/ScreenshotBlue-12.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;Last but not least I did the bandwidth check and the results are slightly better than in case of Huawei modem but the most important is that the signal strength is more stable than before. The measurements were done at polish seaside (Gaski - 54.241018,15.892321)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga3Zuis4_mLvZ2kPWAIm4PgntwZ6gegOxqd6oUup4sCQ09LUUShMwTwOlsBEgxv4pxcj5UJIBPz-uXSp88TOOktpfs1BqxEPmItQGiD7nbrS0S3sFosK0B7sdgtFRNAUpGN5CSwWb6N6Y/s1600/nokia_e52_blueconnect.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;194&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga3Zuis4_mLvZ2kPWAIm4PgntwZ6gegOxqd6oUup4sCQ09LUUShMwTwOlsBEgxv4pxcj5UJIBPz-uXSp88TOOktpfs1BqxEPmItQGiD7nbrS0S3sFosK0B7sdgtFRNAUpGN5CSwWb6N6Y/s320/nokia_e52_blueconnect.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://krystianekb.blogspot.com/feeds/2407680166739120031/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://krystianekb.blogspot.com/2011/08/ubuntu-nokia-e52-as-3g-modem-on-natty.html#comment-form' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/2407680166739120031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/570628863367981549/posts/default/2407680166739120031'/><link rel='alternate' type='text/html' href='http://krystianekb.blogspot.com/2011/08/ubuntu-nokia-e52-as-3g-modem-on-natty.html' title='Ubuntu: Nokia E52 as 3G modem on Natty 11.04 box'/><author><name>krystianekb</name><uri>http://www.blogger.com/profile/14151222628905370654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-9_kbZHZYIVM5BnMJyBn-oBtgrLOg1saWqKrWitTyY97XIVwvDd6kLSuTXR-Ng3NOzBVU5n1yXWSV4nBzQDXdy6bXCFIv5Y7pU0-8CPgPTUGZu4V1yIm_XD16dDFnODUQ12Glt_emn2M/s72-c/pingTestHuwaei3g.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>