<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>explanation &#8211; Uroš Vovk</title>
	<atom:link href="https://www.urosvovk.com/tag/explanation/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.urosvovk.com</link>
	<description>Uroš Vovk home page</description>
	<lastBuildDate>Mon, 09 Mar 2015 17:26:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>gmail configuration for Mikrotik router OS mail</title>
		<link>https://www.urosvovk.com/gmail-configuration-for-mikrotik-router-os-mail/</link>
					<comments>https://www.urosvovk.com/gmail-configuration-for-mikrotik-router-os-mail/#comments</comments>
		
		<dc:creator><![CDATA[Uroš]]></dc:creator>
		<pubDate>Mon, 09 Mar 2015 20:02:26 +0000</pubDate>
				<category><![CDATA[Network Stuff]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[explanation]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mail configuration]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[RouterOS]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[step by step]]></category>
		<category><![CDATA[terminal]]></category>
		<guid isPermaLink="false">http://www.urosvovk.com/?p=720</guid>

					<description><![CDATA[Usually I would say something about the tool that I talk about, but this time a quote from wiki.mikrotik.com (link) will do the job: E-mail tool is the utility that allows to send e-mails from the router. Tool can be used to send regular configuration backups and exports to network administrator. Email tool uses only &#8230; <a href="https://www.urosvovk.com/gmail-configuration-for-mikrotik-router-os-mail/" class="more-link">Continue reading <span class="screen-reader-text">gmail configuration for Mikrotik router OS mail</span></a>]]></description>
										<content:encoded><![CDATA[<p>Usually I would say something about the tool that I talk about, but this time a quote from wiki.mikrotik.com (<a title="wiki" href="http://wiki.mikrotik.com/wiki/Manual:Tools/email">link</a>) will do the job:</p>
<blockquote><p>E-mail tool is the utility that allows to send e-mails from the router. Tool can be used to send regular configuration backups and exports to network administrator.<br />
Email tool uses only plain authentication and tls encryption. Other methods are not supported.</p></blockquote>
<p>All data that you need is here:</p>
<pre>Server:   74.125.136.108 <span style="color: #ff0000;">[smtp.gmail.com] &lt;- you can't use hostname</span>
Port:     587
From:     &lt;your name&gt; &lt;- nice name
User:     &lt;gmail username&gt; &lt;- <span style="color: #ff0000;">without @gmail.com</span>
Password: &lt;gmail password&gt;</pre>
<p>Configuring this tool is very simple, all you need to do is fill your data as shown in the picture</p>
<p><img fetchpriority="high" decoding="async" class="size-full wp-image-723" src="http://www.urosvovk.com/wp-content/uploads/2015/03/IMG000070.png" alt="mail settings" width="535" height="480" srcset="https://www.urosvovk.com/wp-content/uploads/2015/03/IMG000070.png 535w, https://www.urosvovk.com/wp-content/uploads/2015/03/IMG000070-300x269.png 300w" sizes="(max-width: 535px) 100vw, 535px" /></p>
<p>or you can do this in one step from the terminal:</p>
<pre>/tool e-mail set address=74.125.136.108 from="&lt;your name&gt;" password=&lt;gmail password&gt; port=587 start-tls=yes user=&lt;gmail username&gt;</pre>
<p>This is all you need to do&#8230; next time I will write some usage example. If you have some your example, you can leave it in a comment ;)</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.urosvovk.com/gmail-configuration-for-mikrotik-router-os-mail/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Get current db2 database size</title>
		<link>https://www.urosvovk.com/get-current-db2-database-size/</link>
		
		<dc:creator><![CDATA[Uroš]]></dc:creator>
		<pubDate>Thu, 04 Jul 2013 12:30:49 +0000</pubDate>
				<category><![CDATA[Linux Stuff]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[db2]]></category>
		<category><![CDATA[explanation]]></category>
		<category><![CDATA[procedure]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[stored]]></category>
		<guid isPermaLink="false">http://urosv.wordpress.com/?p=453</guid>

					<description><![CDATA[Today I needed to get database size for one of my databases. I find a partial solution here. My first choice was this stored procedure, which needs to be called from command line: db2 'call get_dbsize_info(?,?,?,1)' Output: [db2inst1@gina64 ~]$ db2 "call get_dbsize_info(?,?,?,-1)" Value of output parameters -------------------------- Parameter Name : SNAPSHOTTIMESTAMP Parameter Value : 2013-07-04-13.00.05.476704 &#8230; <a href="https://www.urosvovk.com/get-current-db2-database-size/" class="more-link">Continue reading <span class="screen-reader-text">Get current db2 database size</span></a>]]></description>
										<content:encoded><![CDATA[<p>Today I needed to get database size for one of my databases.</p>
<p>I find a partial solution <a title="Query to find database size" href="http://www.dbforums.com/db2/1633306-query-find-database-size.html" target="_blank">here</a>.</p>
<p>My first choice was this stored procedure, which needs to be called from command line:<br />
<span id="more-453"></span></p>
<pre>db2 'call get_dbsize_info(?,?,?,1)'</pre>
<p>Output:</p>
<pre>[db2inst1@gina64 ~]$ db2 "call get_dbsize_info(?,?,?,-1)"

Value of output parameters
--------------------------
Parameter Name : SNAPSHOTTIMESTAMP
Parameter Value : 2013-07-04-13.00.05.476704

Parameter Name : DATABASESIZE
Parameter Value : 6993657856

Parameter Name : DATABASECAPACITY
Parameter Value : 5311283195

Return Status = 0
</pre>
<p>Later I realized that if I would like to use this data in a script, I will need to parse this data. Before doing that I tried the second option:</p>
<pre>db2 "select (SUM(total_pages)*4)/1024.0/1024 TOTAL_ALLOCATED_SPACE_IN_GB from table (snapshot_tbs_cfg('dbname',-1)) TBS_SPCE"</pre>
<p>Output:</p>
<pre>TOTAL_ALLOCATED_SPACE_IN_GB
---------------------------------
                    6.99011230468</pre>
<p>This query is more easy to use in a script, but being a lazy person I corrected this query to work without any &#8220;customization&#8221; for each database&#8230;</p>
<p>As you can see, the original query calculate database size assuming that page size is 4K:</p>
<pre>... <del datetime="2013-07-04T11:12:05+00:00">(SUM(total_pages)*4)/1024.0/1024</del> ...</pre>
<p>I changed to this:</p>
<pre>... (SUM(total_pages*page_size))/1024.0/1024/1024 ...</pre>
<p>The second thing to change is the dbname value:</p>
<p>From:</p>
<pre>... table (snapshot_tbs_cfg(<del datetime="2013-07-04T11:21:34+00:00">'dbname'</del>,-1)) ...</pre>
<p>to:</p>
<pre>... table (snapshot_tbs_cfg(CURRENT SERVER,-1)) ...</pre>
<p>The final query looks like this:</p>
<pre>select (SUM(total_pages*page_size))/1024.0/1024/1024 TOTAL_ALLOCATED_SPACE_IN_GB from table (snapshot_tbs_cfg(CURRENT SERVER,-1)) TBS_SPCE</pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
