<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Diadem Tech Weblogs</title>
	
	<link>http://www.diademblogs.com</link>
	<description>Tutorials, tips and howtos for web hosting and open source web development</description>
	<lastBuildDate>Sat, 27 Apr 2013 06:53:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/DiademBlogs" /><feedburner:info uri="diademblogs" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Incoming email spam protection with SPF</title>
		<link>http://feedproxy.google.com/~r/DiademBlogs/~3/WubQISOqO7g/incoming-email-spam-protection-with-spf</link>
		<comments>http://www.diademblogs.com/mail-service/incoming-email-spam-protection-with-spf#comments</comments>
		<pubDate>Thu, 25 Apr 2013 12:32:22 +0000</pubDate>
		<dc:creator>hriday</dc:creator>
				<category><![CDATA[Mail Service]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[SPAM]]></category>
		<category><![CDATA[SPF]]></category>
		<category><![CDATA[Spoof Mail]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.diademblogs.com/?p=304</guid>
		<description><![CDATA[These days, nearly all junk emails messages carry fake sender addresses. The victims whose addresses are being abused often suffer from the consequences, because their reputation gets affected and they have to waste their time sorting out misdirected bounce messages. You probably have experienced one kind of abuse or another of your e-mail address yourself [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">These days, nearly all junk emails messages carry fake sender addresses. The victims whose addresses are being abused often suffer from the consequences, because their reputation gets affected and they have to waste their time sorting out misdirected bounce messages.</p>
<p>You probably have experienced one kind of abuse or another of your e-mail address yourself in the past, e.g. when you received an error message saying that a message allegedly sent by you could not be delivered to the recipient, although you never sent a message to that address. Or you nay have received spam mails which have been sent from your e-mail ID.</p>
<p>These types of SPAM technique are called Sender address forgery or Spoof Mail. It is a threat to users and companies.</p>
<p><strong><em>There is a Solution for that!</em></strong></p>
<p><em><strong>SPF: Sender Policy Framework</strong></em></p>
<p>The Sender Policy Framework (SPF) is an open standard specifying a technical method to prevent sender address forgery. More precisely, the current version of SPF — called SPFv1 or SPF Classic — protects the envelope sender address, which is used for the delivery of messages.</p>
<p>Even more precisely, SPFv1 allows the owner of a domain to specify their mail sending policy, e.g. which mail servers they use to send mail from their domain. The technology requires two sides to play together:</p>
<p>(1) The domain owner publishes this information in an SPF record in the domain&#8217;s DNS zone, and when someone else&#8217;s mail server receives a message claiming to come from that domain, and then,</p>
<p style="text-align: justify;">(2) The receiving server can check whether the message complies with the domain&#8217;s stated policy. If, e.g., the message comes from an unknown server, it can be considered a fake.</p>
<p>Once you are confident about the authenticity of the sender address, you can finally &#8220;take it for real&#8221; and attach reputation to it. Furthermore, additional kinds of policies are planned for a future version of SPF, such as asserting that all of a domain&#8217;s outgoing mail is S/MIME or PGP signed.</p>
<h2>An Example Policy</h2>
<p style="text-align: justify;">Let&#8217;s look at an example to give you an idea of how SPF works. Bob owns the domain domain.com. He also sometimes sends mail through his otherdomain.com account.</p>
<blockquote>
<p style="text-align: justify;"><strong>example.net.  TXT  &#8220;v=spf1 mx ip4:10.100.110.201 mx:domain.com  a:pluto. domain.com include:mail.otherdomain.com -all&#8221;</strong></p>
</blockquote>
<p style="text-align: justify;">The parts of the SPF record mean the following:<em><strong> </strong></em></p>
<blockquote>
<p style="text-align: justify;"><em><strong>v=spf1 :</strong></em> this identifies the TXT record as an SPF string. SPF version 1.</p>
<p style="text-align: justify;"><em><strong>mx</strong></em> : the incoming mail servers (MXes) of the domain are authorized to also send mail for domain.com. If you add more MX servers in the future, they&#8217;ll automatically be allowed, too.</p>
<p style="text-align: justify;"><em><strong>ip4:10.100.110.201:</strong></em> 10.100.110.201 is allowed to send mail from domain.com.</p>
<p style="text-align: justify;"><em><strong>mx:domain.com:</strong></em> The MX servers for domain.com are allowed to send mail from domain.com.</p>
<p style="text-align: justify;"><em><strong>a:pluto.domain.com:</strong></em> the Host pluto.domain.com is authorized, too send mail</p>
<p style="text-align: justify;"><em><strong>include:mail.otherdomain.com:</strong></em> everything considered legitimate by mail.otherdomain.com (outside mail server) is legitimate for domain.com, too</p>
<p style="text-align: justify;"><em><strong>-all </strong></em>: No other servers are allowed to send mail from domain.com. This is a good default for sites particularly concerned about forgery.</p>
</blockquote>
<p style="text-align: justify;">This example demonstrates but a small part of SPF&#8217;s expressiveness. Do not take it as a guideline for building your own record — things might not work out as you expect and legitimate messages might get blocked! Instead, learn more about the record syntax, or get the complete picture by studying the full specification or contact your hosting service provider.</p>
<p>Today <em>Gmail, Hotmail, Rediffmail, Microsoft, Redhat, IBM, Citi Bank</em> and most of the leading Service Providers and Companies use SPF and so do we for blocking out unwanted junk emails from reaching our clients inboxes.</p>
<p><em>Read More about SPF at:</em></p>
<p><span style="color: #ff0000;"><a href="http://www.openspf.org">http://www.openspf.org</a><br />
<a href="http://en.wikipedia.org/wiki/Sender_Policy_Framework">http://en.wikipedia.org/wiki/Sender_Policy_Framework</a><br />
<a href="http://www.microsoft.com/mscorp/safety/technologies/senderid/overview.mspx">http://www.microsoft.com/mscorp/safety/technologies/senderid/overview.mspx</a></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">Note: There is a rating embedded within this post, please visit this post to rate it.</span><br />
</span></p>
<img src="http://feeds.feedburner.com/~r/DiademBlogs/~4/WubQISOqO7g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diademblogs.com/mail-service/incoming-email-spam-protection-with-spf/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.diademblogs.com/mail-service/incoming-email-spam-protection-with-spf</feedburner:origLink></item>
		<item>
		<title>JustBooks CLC – India’s leading community library chain – now in the City of Joy</title>
		<link>http://feedproxy.google.com/~r/DiademBlogs/~3/g2T0E0Czp18/justbooks-clc-now-in-kolkata</link>
		<comments>http://www.diademblogs.com/experiences/justbooks-clc-now-in-kolkata#comments</comments>
		<pubDate>Thu, 21 Mar 2013 08:38:01 +0000</pubDate>
		<dc:creator>hriday</dc:creator>
				<category><![CDATA[Experiences]]></category>

		<guid isPermaLink="false">http://www.diademblogs.com/?p=1487</guid>
		<description><![CDATA[It has been a while since we have recommended a service or solution on this blog, so I am excited to share with you one of the truly wonderful things to happen in the city for a while. If you are like me and are an avid reader of books on management, biographies, self-help and [...]]]></description>
			<content:encoded><![CDATA[<p>It has been a while since we have recommended a service or solution on this blog, so I am excited to share with you one of the truly wonderful things to happen in the city for a while. If you are like me and are an avid reader of books on management, biographies, self-help and magazines you are probably making a nice little hole in your pocket and running out of storage space to store your books and journals. As an alternative, I had been signing up for the digital versions of the books and magazines on my iPad but I have always found the touch and feel of paper to be a more soulful experience then to squint and stare at a digital screen and develop some very sore hands in the process.</p>
<p>So, I was walking by my office a couple of weeks back and out of some overgrown creepers, I was able to spot the signage of Just Books CLC and out of curiosity I walked in to find out more about this place. Once inside, I was met with some very courteous staff at Just Books and they walked me through the entire process of what makes Just Books community library chain, different and better then most standalone libraries. All the details are available on the Just Books CLC website &#8211; <a href="http://justbooksclc.com/how_it_works">http://justbooksclc.com/how_it_works</a> and I would like to summarise some of the key benefits which appealed to me:</p>
<ul>
<li>The library is just a short walk from my office, which makes it very convenient for me to change my books at ease. However for clients who would like to avail of a doorstep delivery service, its available across the city for a very nominal fee of Rs. 50 pm.</li>
<li>Their membership plans pricing is surprisingly low, when you consider their total collection of over 0.5 million books across all their locations and the quality of those books.</li>
<li>The technology behind issuing, returning and searching for books is truly innovative and convenient for the members. There are no queues for returning or issuing new books and the staff are always ready to help if you are stuck in the process.</li>
<li>If a book is not available at this library you can request for it from any of their other libraries and it will be made available to you within a week or two and you will be notified about it over SMS and email.</li>
<li>The library is tidy, well organised and the books are well maintained by an efficient team.</li>
</ul>
<p>It came as a surprise to me that this is the only JustBooks CLC in Kolkata and I truly hope that this would be the first of many such libraries in the days ahead as this is a truly innovative concept and a win-win model for all people concerned.</p>
<p>As for me, I am making the most of this opportunity to catch up on some of the books I most wanted to read and I would strongly recommend this place as one of the best kept secrets in the city!</p>

<div class="ngg-galleryoverview" id="ngg-gallery-4-1487">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://www.diademblogs.com/experiences/justbooks-clc-now-in-kolkata?show=slide">
			[Show as slideshow]		</a>
	</div>

	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://www.diademblogs.com/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=4&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-28" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.diademblogs.com/wp-content/gallery/just-books-kolkata/justbooks_kolkata1.jpg" title=" " class="shutterset_set_4" >
								<img title="justbooks_kolkata1" alt="justbooks_kolkata1" src="http://www.diademblogs.com/wp-content/gallery/just-books-kolkata/thumbs/thumbs_justbooks_kolkata1.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-29" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.diademblogs.com/wp-content/gallery/just-books-kolkata/justbooks_kolkata2.jpg" title=" " class="shutterset_set_4" >
								<img title="justbooks_kolkata2" alt="justbooks_kolkata2" src="http://www.diademblogs.com/wp-content/gallery/just-books-kolkata/thumbs/thumbs_justbooks_kolkata2.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-30" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.diademblogs.com/wp-content/gallery/just-books-kolkata/justbooks_kolkata3.jpg" title=" " class="shutterset_set_4" >
								<img title="justbooks_kolkata3" alt="justbooks_kolkata3" src="http://www.diademblogs.com/wp-content/gallery/just-books-kolkata/thumbs/thumbs_justbooks_kolkata3.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


<p>Just Books CLC Kolkata Centre:</p>
<p><strong>Contact :<br />
</strong>033 &#8211; 40012211; 8981853672</p>
<p><strong>Working Hours :<br />
</strong>Hours 10:00 AM TO 9:00 PM, MONDAY HOLIDAY</p>
<p><strong> </strong></p>
<p><strong>Address :</strong><br />
PPF ENTERPRISES BD 30 (1st. FLOOR), SECTOR  1, SALT LAKE, KOLKATA 700064.</p>
<p><strong>Email:</strong><a href="mailto:ppfenterprises1@gmail.com"><br />
ppfenterprises1@gmail.com</a></p>
Note: There is a rating embedded within this post, please visit this post to rate it.
<img src="http://feeds.feedburner.com/~r/DiademBlogs/~4/g2T0E0Czp18" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diademblogs.com/experiences/justbooks-clc-now-in-kolkata/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.diademblogs.com/experiences/justbooks-clc-now-in-kolkata</feedburner:origLink></item>
		<item>
		<title>Howto fix blank RDP Screen on Virtuozzo Windows Container</title>
		<link>http://feedproxy.google.com/~r/DiademBlogs/~3/JhJmuEixEFA/howto-fix-blank-rdp-screen-on-virtuozzo-windows-container</link>
		<comments>http://www.diademblogs.com/windows-server/howto-fix-blank-rdp-screen-on-virtuozzo-windows-container#comments</comments>
		<pubDate>Tue, 12 Mar 2013 04:58:19 +0000</pubDate>
		<dc:creator>jayabrata</dc:creator>
				<category><![CDATA[Virtualisation]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://www.diademblogs.com/?p=1466</guid>
		<description><![CDATA[Applies to: Windows 2008 R2 Parallels Virtuozzo Containers Description: While logging into Administrator account through RDP on a VPS after a reboot, a blank screen or recycled svchost.exe property page is shown. Rebooting the VPS does not resolve the issue. Cause: This problem is caused by corruption of the Administrator account profile. Solution: On the [...]]]></description>
			<content:encoded><![CDATA[<h3>Applies to:</h3>
<p><strong>Windows 2008 R2 Parallels Virtuozzo Containers</strong></p>
<h3>Description:</h3>
<p>While logging into <strong>Administrator</strong> account through <strong>RDP</strong> on a VPS after a reboot, a blank screen or recycled svchost.exe property page is shown. Rebooting the VPS does not resolve the issue.</p>
<h3>Cause:</h3>
<p>This problem is caused by corruption of the <strong>Administrator</strong> account profile.</p>
<h3>Solution:</h3>
<p>On the hardware node run the following command from command prompt, in order to enter the container.</p>
<pre class="brush: plain; collapse: false; title: ; wrap-lines: false; notranslate">
vzctl enter &lt;Container_ID&gt;
</pre>
<p>(<strong>Conatiner_ID</strong> can be obtained by running the <strong>vzlist –a</strong> command.)</p>
<p>Now you will get the <strong>C:\Windows\system32&gt;</strong> prompt in the terminal, indicating that you have entered the container. In the <strong>C:\Windows\system32&gt;</strong> prompt run the following commands, in order to create another account and make it a member of <strong>Administrators</strong> group on the container.</p>
<pre class="brush: plain; collapse: false; title: ; wrap-lines: false; notranslate">
net user &lt;username&gt; &lt;password&gt; /add
net localgroup administrators &lt;username&gt; /add
</pre>
<p>Now <strong>RDP</strong> into the affected container, using this new username and password.</p>
<p>After you successfully login into the container, make sure from task manager that <strong>Administrator</strong> account is not logged into the container.  If <strong>Administrator</strong> account is still logged into the container, then log off <strong>Administrator</strong> from <strong>Task Manager</strong>, running with elevated privilege.</p>
<p>Then copy all important files from <strong>C:\Users\Administrator</strong> folder to another folder for safekeeping and delete the <strong>C:\Users\Administrator</strong> folder.</p>
<p>Next login into the <strong>Administrator</strong> account. This account will use a temporary profile path due to absence of <strong>C:\Users\Administrator</strong> folder. Now create the <strong>C:\Users\Administrator</strong> folder again.</p>
<p>Then go to the windows <strong>Control Panel</strong>. Inside control panel select <strong>Small Icon</strong> view and click the <strong>User Accounts</strong> icon or link.</p>
<p style="text-align: center;"><a href="http://www.diademblogs.com/wp-content/uploads/2013/02/useracc_cpan.jpg"><img class="aligncenter size-full wp-image-1467" src="http://www.diademblogs.com/wp-content/uploads/2013/02/useracc_cpan.jpg" alt="" width="718" height="430" /></a></p>
<p>Inside <strong>User Accounts</strong> click on the <strong>Configure advanced user profile properties</strong> link on the left panel. It will popup <strong>User Profiles</strong> dialog.</p>
<p style="text-align: center;"><a href="http://www.diademblogs.com/wp-content/uploads/2013/02/useracc_cpan_1.jpg"><img class="aligncenter size-full wp-image-1468" src="http://www.diademblogs.com/wp-content/uploads/2013/02/useracc_cpan_1.jpg" alt="" width="721" height="231" /></a></p>
<p>Inside <strong>User Profiles</strong> dialog, select the <strong>Default Profile</strong> and then click <strong>Copy To</strong> button. It will pop up the <strong>Copy To</strong> dialog.</p>
<p><a href="http://www.diademblogs.com/wp-content/uploads/2013/02/useracc_uprof.jpg"><img class="aligncenter size-full wp-image-1469" src="http://www.diademblogs.com/wp-content/uploads/2013/02/useracc_uprof.jpg" alt="" width="388" height="405" /></a></p>
<p>In <strong>Copy profile to</strong> section, browse and select the path <strong>C:\Users\Administrator</strong> and in <strong>Permitted to use</strong> section click change and select the <strong>Administrator</strong> user. Then click <strong>Ok</strong>.</p>
<p><a href="http://www.diademblogs.com/wp-content/uploads/2013/02/useracc_uprof_cp.jpg"><img class="aligncenter size-full wp-image-1470" src="http://www.diademblogs.com/wp-content/uploads/2013/02/useracc_uprof_cp.jpg" alt="" width="396" height="240" /></a></p>
<p>Now the <strong>Confirm Copy</strong> message box will pop up with the message – <strong>“C:\Users\Administrator already exists. The current contents of this directory or this file will be deleted during this operation. Are you sure you want to continue?”</strong>. Click <strong>Ok</strong> to confirm.</p>
<p><a href="http://www.diademblogs.com/wp-content/uploads/2013/02/useracc_uprof_ok.jpg"><img class="aligncenter size-full wp-image-1471" src="http://www.diademblogs.com/wp-content/uploads/2013/02/useracc_uprof_ok.jpg" alt="" width="414" height="151" /></a></p>
<p>Now logoff from <strong>Administrator</strong> account and login again. Now the account will use the permanent profile path <strong>C:\Users\Administrator</strong> and everything should be fine.<br />
Note: There is a rating embedded within this post, please visit this post to rate it.</p>
<img src="http://feeds.feedburner.com/~r/DiademBlogs/~4/JhJmuEixEFA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diademblogs.com/windows-server/howto-fix-blank-rdp-screen-on-virtuozzo-windows-container/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.diademblogs.com/windows-server/howto-fix-blank-rdp-screen-on-virtuozzo-windows-container</feedburner:origLink></item>
		<item>
		<title>Howto check sites consuming additional resources in apache webserver</title>
		<link>http://feedproxy.google.com/~r/DiademBlogs/~3/IXqqH9CxYd8/apache-load-monitoring</link>
		<comments>http://www.diademblogs.com/linux/apache-load-monitoring#comments</comments>
		<pubDate>Sat, 02 Feb 2013 11:51:59 +0000</pubDate>
		<dc:creator>hriday</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://www.diademblogs.com/?p=599</guid>
		<description><![CDATA[We were facing an httpd process overload problem that was occurring frequently every week on our server. The server is a shared hosting server holding Over 300 domains with Apache 2.2.3, MySql 5.0.45 and PHP 5.2.6. Occasionally httpd process were getting timed out, consuming 90% to 100% CPU load alone.  Some PHP or Perl script [...]]]></description>
			<content:encoded><![CDATA[<p>We were facing an httpd process overload problem that was occurring frequently every week on our server. The server is a shared hosting server holding Over 300 domains with Apache 2.2.3, MySql 5.0.45 and PHP 5.2.6. Occasionally httpd process were getting timed out, consuming 90% to 100% CPU load alone.  Some PHP or Perl script that may be using too much of memory and CPU, but it was not possible or to check each and every script or put 300 domains offline one by one or remove any suspicious scripts because of that, since this was a production server.</p>
<p>&#8220;top&#8221; command returns only Apache&#8217;s child process, which is not as much helpful because it does not provide website name.  But there is a way or a tool to trace down the name of the website that is causing the overload.</p>
<p>The Status module (mod_status) allows a server administrator to find out how well their server is performing. A HTML page is presented that gives the current server statistics in an easily readable form. If required this page can be made to automatically refresh.</p>
<p><strong><span style="text-decoration: underline;">The details given are:</span></strong></p>
<p>* The number of children serving requests.<br />
* The number of idle children.<br />
* The status of each child, the number of requests that child has performed and the total number of bytes served by the child (*)<br />
* A total number of accesses and byte count served (*).<br />
* The time the server was started/restarted and the time it has been running for<br />
* Averages giving the number of requests per second, the number of bytes served per second and the average number of bytes per request (*).<br />
* The current percentage CPU used by each child and in total by Apache (*).<br />
* The current hosts and requests being processed (*).</p>
<p>Details marked &#8220;(*)&#8221; are only available with ExtendedStatus On.</p>
<h2>Configure Apache mod_status</h2>
<p>Open your httpd.conf file:</p>
<h3><span style="color: #800000;"><code># vi /etc/httpd/conf/httpd.conf</code></span></h3>
<p><strong><span style="text-decoration: underline;">Append / modify (or uncomment) directives as follows:</span></strong></p>
<h3><span style="color: #800000;">ExtendedStatus On</span></h3>
<h3><span style="color: #800000;"><code>&lt;Location /server-status&gt;</code></span></h3>
<h3><span style="color: #800000;"><code> SetHandler server-status</code></span></h3>
<h3><span style="color: #800000;"><code> Order deny,allow</code></span></h3>
<h3><span style="color: #800000;"><code> Deny from all</code></span></h3>
<h3><span style="color: #800000;"><code> Allow from 10.0.0.0/8</code></span></h3>
<h3><span style="color: #800000;"><code>&lt;/Location&gt;</code></span></h3>
<p>Replace 10.0.0.0/8 with your Network IP range or workstation IP address. Save and close the file. Restart httpd server:</p>
<h3><span style="color: #800000;"><code># service httpd restart</code></span></h3>
<p>For full status report type:</p>
<h3><span style="color: #800000;"><code># service httpd fullstatus</code></span><code> </code></h3>
<p>To view status report type URL &#8211; http://Server IP/server-status</p>
Note: There is a rating embedded within this post, please visit this post to rate it.
<img src="http://feeds.feedburner.com/~r/DiademBlogs/~4/IXqqH9CxYd8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diademblogs.com/linux/apache-load-monitoring/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.diademblogs.com/linux/apache-load-monitoring</feedburner:origLink></item>
		<item>
		<title>IPBan setup guide to block intrusion attempts on RDP and MSSQL server ports</title>
		<link>http://feedproxy.google.com/~r/DiademBlogs/~3/Q2aBsYbqdX8/ipban-setup-guide-to-block-intrusion-attempts-on-rdp-and-mssql-server-ports</link>
		<comments>http://www.diademblogs.com/windows-server/ipban-setup-guide-to-block-intrusion-attempts-on-rdp-and-mssql-server-ports#comments</comments>
		<pubDate>Tue, 08 Jan 2013 11:43:34 +0000</pubDate>
		<dc:creator>jayabrata</dc:creator>
				<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://www.diademblogs.com/?p=1416</guid>
		<description><![CDATA[Continuous intrusion attempts on RDP and SQL server in Windows dedicated and VPS environment is a big issue for system admins. They may drain a considerable amount CPU time and Memory resource of any server as thousands such attempts can be made within a span of few minutes by the automated attacking bots. Changing RDP [...]]]></description>
			<content:encoded><![CDATA[<p>Continuous intrusion attempts on <strong>RDP</strong> and <strong>SQL</strong> server in Windows dedicated and VPS environment is a big issue for system admins. They may drain a considerable amount CPU time and Memory resource of any server as thousands such attempts can be made within a span of few minutes by the automated attacking bots. Changing RDP and SQL port to a custom one can solve this issue, but these require client side configuration changes, which may be uncomfortable for the client due to many reasons. Also the modified port number again can get exposed to the attacking bots, due to presence of a Trojan or Malware on the client system. <strong> </strong></p>
<p><strong>IPBan</strong> software written by Jeffrey N. Johnson (jjxtra) comes to a great relief in tacking this nagging issue on Windows servers. IPBan is installed as a service under Windows operating system and listens for a failed logon event on the server. Whenever an failed logon attempt is made, it starts tracking the source IP and when number of such events reach a certain predefined threshold for that IP, within a specified time span, it Block that IP in the Windows Advanced Firewall using a Blocking rule there. The IP remains banned for a predefined amount of time after this. All these time and threshold values are configurable through the configuration file of the IPBan software. IPBan is a free tools which can be downloaded from jjxtra&#8217;s website <a href="http://www.digitalruby.com/">Digitalruby.com</a> and is updated often.</p>
</p>
<h4>Now let us follow the steps that are required to install IPBan software on a Windows server:</h4>
<p>1. IPBan software can be downloaded from the URL &#8211; <a href="https://github.com/jjxtra/Windows-IP-Ban-Service/downloads">https://github.com/jjxtra/Windows-IP-Ban-Service/downloads</a>. This software only works on <strong>Windows Server 2008/R2</strong>.</p>
<p>2. The IPBan software requires <strong>.net framework v.4</strong>, which can be installed from the URL &#8211; <a href="http://www.microsoft.com/en-us/download/details.aspx?id=17851">http://www.microsoft.com/en-us/download/details.aspx?id=17851</a> , if not already present in the system.</p>
<p>3. In order to enable the Remote Desktop Service to properly log the intruder’s IP addresses in the windows event log, perform the following configuration changes in Remote Desktop Session Host Configuration.</p>
<p style="padding-left: 30px">a) Run the <strong>Remote Desktop Session Host Configuration</strong> tool on Windows Server 2008/R2.</p>
<p style="padding-left: 30px">b) Double-click the connection <strong>RDP-Tcp</strong> to change encryption settings to native RDP encryption.</p>
<p style="padding-left: 30px"><a href="http://www.diademblogs.com/wp-content/uploads/2013/01/rdp-protocol-config-01.jpg"><img src="http://www.diademblogs.com/wp-content/uploads/2013/01/rdp-protocol-config-01.jpg" alt="" width="606" height="532" class="aligncenter size-full wp-image-1443" /></a></p>
<p style="padding-left: 30px">c) In order to do so change the Security Layer value to <strong>RDP Security Layer</strong> from the drop-down list in the General tab and click OK.</p>
<p style="padding-left: 30px"><a href="http://www.diademblogs.com/wp-content/uploads/2013/01/rdp-protocol-config-02.jpg"><img class="aligncenter size-full wp-image-1420" src="http://www.diademblogs.com/wp-content/uploads/2013/01/rdp-protocol-config-02.jpg" alt="" width="403" height="501" /></a></p>
<p style="padding-left: 30px">d) Now reboot the server to bring this change to effect.</p>
<p>4. Extract and copy all the files from the downloaded IPBan software zip archive to the folder <strong>C:\IPBan</strong></p>
<p>5. The <strong>IPBan.exe.config</strong> file in the folder contains all the configuration settings for IPBan software.</p>
<p>6. The following section configures the number of failed audits in the event viewer before banning the IP address:</p>
<pre class="brush: plain; collapse: false; title: ; wrap-lines: false; notranslate">
&lt;add key=&quot;FailedLoginAttemptsBeforeBan&quot; value=&quot;5&quot; /&gt;
</pre>
<p>Change the value setting according to your requirement.</p>
<p>7. The following section configures the duration of time to ban a failed IP address:</p>
<pre class="brush: plain; collapse: false; title: ; wrap-lines: false; notranslate">
&lt;add key=&quot;BanTime&quot; value=&quot;00:00:30:00&quot; /&gt;
</pre>
<p>Change the value setting according to your requirement in <strong>DD:HH:MM:SS</strong> format.</p>
<p>8. IPBan Log Rotation can be configured in the following section:</p>
<pre class="brush: plain; collapse: false; title: ; wrap-lines: false; notranslate">
&lt;target name=&quot;logfile&quot; xsi:type=&quot;File&quot; fileName=&quot;${basedir}\logfile.txt&quot; archiveNumbering=&quot;Sequence&quot; archiveEvery=&quot;Day&quot; maxArchiveFiles=&quot;28&quot; /&gt;
</pre>
<p>Change the <strong>archiveEvery</strong> and <strong>maxArchiveFiles</strong> according to your requirement and availability of storage space for the same.</p>
<p>9. If a named instance of SQL server is in use, then change <strong>MSSQLSERVER</strong> to <strong>MSSQL$ (e.g. MSSQL$SQLEXPRESS)</strong> in the following section:</p>
<pre class="brush: plain; collapse: false; title: ; wrap-lines: false; notranslate">
&lt;XPath&gt;//Provider[@Name='MSSQLSERVER']&lt;/XPath&gt;
</pre>
<p>10. Now open the Command prompt and the run the following commands there to create and start the IPBAN Service –</p>
<pre class="brush: plain; collapse: false; title: ; wrap-lines: false; notranslate">
sc create IPBAN type= own start= auto binPath= C:\IPBan\ipban.exe DisplayName= IPBAN
net start IPBAN
</pre>
<p style="padding-left: 30px">
Note: There is a rating embedded within this post, please visit this post to rate it.
<img src="http://feeds.feedburner.com/~r/DiademBlogs/~4/Q2aBsYbqdX8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diademblogs.com/windows-server/ipban-setup-guide-to-block-intrusion-attempts-on-rdp-and-mssql-server-ports/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.diademblogs.com/windows-server/ipban-setup-guide-to-block-intrusion-attempts-on-rdp-and-mssql-server-ports</feedburner:origLink></item>
		<item>
		<title>Now available: Hosted Email Archiving Service with Diadem MailVault</title>
		<link>http://feedproxy.google.com/~r/DiademBlogs/~3/Akv-uyzRKbw/hosted-email-archiving-service-with-diadem-mailvault</link>
		<comments>http://www.diademblogs.com/hosted-solutions/hosted-email-archiving-service-with-diadem-mailvault#comments</comments>
		<pubDate>Thu, 11 Oct 2012 07:11:54 +0000</pubDate>
		<dc:creator>hriday</dc:creator>
				<category><![CDATA[Hosted Solutions]]></category>

		<guid isPermaLink="false">http://www.diademblogs.com/?p=1397</guid>
		<description><![CDATA[We are pleased to announce the launch of our newest service &#8211; the Diadem MailVault Universal Email Archiving and recovery solution for SME&#8217;s and mid-sized businesses who need a central email archiving service to backup and keep a log of all incoming and outgoing emails for their domain. The MailVault email archiving software has been [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.diademblogs.com/wp-content/uploads/2012/10/email_archiving.jpg"><img class="aligncenter size-full wp-image-1404" title="email_archiving" src="http://www.diademblogs.com/wp-content/uploads/2012/10/email_archiving.jpg" alt="Diadem MailVault Hosted Email Archiving" width="499" height="150" /></a></p>
<p>We are pleased to announce the launch of our newest service &#8211; the <strong>Diadem MailVault Universal Email Archiving</strong> and recovery solution for SME&#8217;s and mid-sized businesses who need a central email archiving service to backup and keep a log of all incoming and outgoing emails for their domain.</p>
<p>The <a title="MailVault" href="http://www.mailvault.in" target="_blank">MailVault</a> email archiving software has been developed by <a title="Digital Glue" href="http://www.digitalglue.in">DigitalGlue</a> and its founder, <a href="http://digitalglue.in/about.html">Mr. Sharad Popli</a> is a pioneering Internet technologist and had also co-founded QLC which had developed the Postmaster email gateway software and had been a great success, still in use by thousands of businesses as a LAN based email server and gateway.</p>
<p>The <a href="http://www.diadem.co.in/email-archiving/cloud-enabled-universal-email-backup-&amp;-archiving-solution"><strong>Diadem MailVault email archiving solution</strong></a> is a cloud hosted email backup and recovery service which allows businesses to log all incoming and outgoing emails for compliance, email recovery and business continuity purposes. Since email is the single most critical IT investment for businesses, worldwide, the missing or deleted emails can have a major impact for a business when communicating with clients and vendors. Similarly, as e-mail messages increasingly take center stage in headlines and  lawsuits, it has become the electronic equivalent of DNA evidence.  Having a system in place that takes this risk into account is crucial  for businesses that don’t want to end up at the center of one of these  disreputable and potentially damaging situations.</p>
<p>Key features of the Diadem MailVault email archiving solution is given below:</p>
<ul>
<li>Automated email collection and archiving</li>
<li>Cloud enabled storage solution which expands as per your mail archival needs</li>
<li>Compatible with all leading mail server software in Linux and Windows OS</li>
<li>Quick, powerful search system to retrieve archived mails</li>
<li>Flexible retention policies for archived email</li>
<li>Litigation Support</li>
<li>No long term commitments or contracts.</li>
<li>Quick and seamless implementation with no downtime of your existing mail service</li>
</ul>
<p>The Diadem MailVault email archiving service comes bundled with user licenses, cloud storage, data backups and technical support which ensures that there are no hidden costs or usage charges.  You can read more about our <a title="cloud email archiving" href="http://www.diadem.co.in/email-archiving/cloud-enabled-universal-email-backup-&amp;-archiving-solution">cloud email archiving solution</a> on our website and also signup for a <a title="free email archiving" href="http://www.diadem.co.in/email-archiving/email-archiving-free-trial">15 Day Free Trial of our email archiving</a> service.</p>
<p>Questions? Visit our <a href="http://www.diadem.co.in/email-archiving/diadem-mailvault-hosted-email-archiving-plans" target="_self">email archiving FAQ</a> page or contact our <a href="mailto:sales@diadem.co.in">sales team</a> for a quick response.</p>
<img src="http://feeds.feedburner.com/~r/DiademBlogs/~4/Akv-uyzRKbw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diademblogs.com/hosted-solutions/hosted-email-archiving-service-with-diadem-mailvault/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.diademblogs.com/hosted-solutions/hosted-email-archiving-service-with-diadem-mailvault</feedburner:origLink></item>
		<item>
		<title>Some Useful SQL commands for MSSQL DB Admins</title>
		<link>http://feedproxy.google.com/~r/DiademBlogs/~3/9OAaqpR0iUw/some-useful-sql-commands-for-ms-sql-db-admins</link>
		<comments>http://www.diademblogs.com/database/some-useful-sql-commands-for-ms-sql-db-admins#comments</comments>
		<pubDate>Mon, 02 Jul 2012 09:21:34 +0000</pubDate>
		<dc:creator>jayabrata</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Sql server maintenance]]></category>

		<guid isPermaLink="false">http://www.diademblogs.com/?p=1331</guid>
		<description><![CDATA[Sometimes we just can’t get our hands on that right “command” or the perfect “script”, that will simply “do my job (no bells or whistles required)”. After some hard googling, you may find one like a gift you have always wished or had to go the toiling way of writing, testing and putting into use, [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes we just can’t get our hands on that right “command” or the perfect “script”, that will simply “do my job (no bells or whistles required)”. After some hard googling, you may find one like a gift you have always wished or had to go the toiling way of writing, testing and putting into use, your own code for that particular need. In the following post I will discuss about some SQL commands and scripts (intended for <a href="http://www.diadem.co.in/windows-hosting/compare-windows-2008-enterprise-hosting-plans">MSSQL DB hosting</a>) that comes handy in performing those tasks, that would otherwise take a lot of effort and time. You may find them scattered around the world wide web in fragments, but in my opinion finding them in one place have obvious advantage.</p>
<h3>Take backup of a particular database and set it offline</h3>
<p>This is a likely situation in a database migration scenario. You take backup of a database and immediately take it offline to avoid further data operations into it. You have to run the following SQL from sa login.</p>
<pre class="brush: sql; collapse: false; title: ; wrap-lines: false; notranslate">
BACKUP DATABASE &lt;dbname&gt;
TO DISK = '&lt;backup_path&gt;&lt;dbname&gt;.Bak'
WITH FORMAT,
NAME = 'Full Backup of &lt;dbname&gt; on &lt;backup_time&gt;, &lt;backup_date&gt;'
GO

ALTER DATABASE &lt;dbname&gt; SET OFFLINE
GO
</pre>
<p>&lt;backup_path&gt; may be something like “D:\migrate_database\” and &lt;dbname&gt; is the name of the database.</p>
<h3>List tables and stored procedures with a specific schema</h3>
<p>You may need to modify schema of tables and stored procedures in batch. This situation arises when you need to delete one user from the database who owns a lot of tables and stored procedures. In order to list those tables and procedures, run the following SQL commands.</p>
<pre class="brush: sql; collapse: false; title: ; wrap-lines: false; notranslate">
USE &lt;dbname&gt;;

&#083;&#069;&#076;&#069;&#067;&#084;&#032;&#042;&#032;&#070;&#082;&#079;&#077;&#032;&#073;&#078;&#070;&#079;&#082;&#077;&#065;&#084;&#073;&#079;&#078;&#095;&#083;&#067;&#072;&#069;&#077;&#065;&#046;&#084;&#065;&#066;&#076;&#069;&#083;&#032;&#087;&#072;&#069;&#082;&#069;&#032;&#073;&#078;&#070;&#079;&#082;&#077;&#065;&#084;&#073;&#079;&#078;&#095;&#083;&#067;&#072;&#069;&#077;&#065;&#046;&#084;&#065;&#066;&#076;&#069;&#083;&#046;&#084;&#065;&#066;&#076;&#069;&#095;&#083;&#067;&#072;&#069;&#077;&#065;&#032;&#061;&#032;&#039;&#060;&#100;&#098;&#117;&#115;&#101;&#114;&#062;&#039;&#059;

&#083;&#069;&#076;&#069;&#067;&#084;&#032;&#042;&#032;&#070;&#082;&#079;&#077;&#032;&#073;&#078;&#070;&#079;&#082;&#077;&#065;&#084;&#073;&#079;&#078;&#095;&#083;&#067;&#072;&#069;&#077;&#065;&#046;&#082;&#079;&#085;&#084;&#073;&#078;&#069;&#083;&#032;&#087;&#072;&#069;&#082;&#069;&#032;&#073;&#078;&#070;&#079;&#082;&#077;&#065;&#084;&#073;&#079;&#078;&#095;&#083;&#067;&#072;&#069;&#077;&#065;&#046;&#082;&#079;&#085;&#084;&#073;&#078;&#069;&#083;&#046;&#083;&#080;&#069;&#067;&#073;&#070;&#073;&#067;&#095;&#083;&#067;&#072;&#069;&#077;&#065;&#032;&#061;&#032;&#039;&#060;&#100;&#098;&#117;&#115;&#101;&#114;&#062;&#039;&#059;
</pre>
<p>Now you can prepare and run a batch SQL script with commands like the following one.</p>
<pre class="brush: sql; collapse: false; title: ; wrap-lines: false; notranslate">
ALTER SCHEMA dbo TRANSFER &lt;dbuser&gt;.&lt;tablename&gt;;
</pre>
<h3>Find log size of all the databases</h3>
<p>The following procedure will list the size of log file used by each database.</p>
<pre class="brush: sql; collapse: false; title: ; wrap-lines: false; notranslate">
SELECT INSTANCE_NAME AS [DATABASE],
(CNTR_VALUE/1000) AS Size_In_MB FROM MASTER.dbo.SYSPERFINFO
WHERE COUNTER_NAME LIKE '%Log File(s) Size (KB)%'
AND INSTANCE_NAME NOT IN ('_TOTAL','mssqlsystemresuorce')
ORDER BY Size_In_MB DESC
</pre>
<h3>Find recovery model of all the databases</h3>
<p>Run the following procedure to know the recovery model used in each database.</p>
<pre class="brush: sql; collapse: false; title: ; wrap-lines: false; notranslate">
Select name, DatabasePropertyEx(name, 'Recovery') from master..sysdatabases
</pre>
<p>A database’s log file size is influenced by the recovery model used in it.</p>
<h3>Find failed login attempts to ‘sa’ account</h3>
<p>Your public SQL server may be under constant brute force attack for ‘sa’ account. The following script will list the numbers and IPs from where the attacks are originated. This may be helpful in implementing your firewall policies.</p>
<pre class="brush: sql; collapse: false; title: ; wrap-lines: false; notranslate">
declare @path VARCHAR(512)
select @path = path from sys.traces where is_default = 1
SELECT loginname, IP, Max(starttime) as LastErrorTime, COUNT(*) AS AttempCounts
FROM (
SELECT t.loginname, REPLACE(SUBSTRING(t.textdata, CHARINDEX(':', t.textdata, CHARINDEX(':', t.textdata, 1) + 1) + 1, 16), ']', '') AS IP, t.starttime
FROM dbo.fn_trace_gettable(@path, DEFAULT) AS t INNER JOIN
sys.trace_events AS e ON t.eventclass = e.trace_event_id
WHERE (eventclass = 20)) AS A
GROUP BY loginname, IP
order by LastErrorTime desc
</pre>
<h3>Find cached page counts and memory uses for each database</h3>
<p>The following two SQL commands will show page counts and memory used for each database in a SQL server instance.</p>
<pre class="brush: sql; collapse: false; title: ; wrap-lines: false; notranslate">
SELECT
(CASE WHEN ([is_modified] = 1) THEN 'Dirty' ELSE 'Clean' END) AS 'Page State',
(CASE WHEN ([database_id] = 32767) THEN 'Resource Database' ELSE DB_NAME (database_id) END) AS 'Database Name',
COUNT (*) AS 'Page Count'
FROM sys.dm_os_buffer_descriptors
GROUP BY [database_id], [is_modified]
ORDER BY [Page Count], [is_modified];
GO

SELECT count(*)AS cached_pages_count, (count(*) * 8)/1024 As Mbytes,  db_name(database_id)
FROM sys.dm_os_buffer_descriptors
GROUP BY db_name(database_id) ,database_id
ORDER BY cached_pages_count DESC;
GO
</pre>
<h3>Get list of all current connections to SQL Server instance</h3>
<p>The following SQL command lists all current connections to the SQL Server instance. It generates list by code and is flexible and easy to analyze.</p>
<pre class="brush: sql; collapse: false; title: ; wrap-lines: false; notranslate">
SELECT DB_NAME(dbid)AS ConnectedToDB,
hostname, program_name,loginame,
cpu, physical_io, memusage, login_time,
last_batch, [status]
FROM master.dbo.sysprocesses
ORDER BY dbid, login_time, last_batch
GO
</pre>
<p>Also you can filter the results for a single user or a single database by providing filter criteria in where clause as required. For example to get just connections to database you may add following condition in where clause</p>
<pre class="brush: sql; collapse: false; title: ; wrap-lines: false; notranslate">
WHERE dbid = DB_ID ('AdventureWorks')
</pre>
<p>Similarly you may filter the results with relevance to any column as required. Above script can be used on all versions of SQL Server. </p>
<h3>Complete memory usage report of an SQL server</h3>
<p>The following SQL script will generate a complete memory usage report for a SQL server instance.</p>
<pre class="brush: sql; collapse: false; title: ; wrap-lines: false; notranslate">
DECLARE @pg_size INT, @Instancename varchar(50)

SELECT @pg_size = low from master..spt_values where number = 1 and type = 'E'

SELECT @Instancename = LEFT([object_name], (CHARINDEX(':',[object_name]))) FROM sys.dm_os_performance_counters WHERE counter_name = 'Buffer cache hit ratio'

PRINT '----------------------------------------------------------------------------------------------------'

PRINT 'Memory usage details for SQL Server instance ' + @@SERVERNAME  + ' (' + CAST(SERVERPROPERTY('productversion') AS VARCHAR) + ' - ' +  SUBSTRING(@@VERSION, CHARINDEX('X',@@VERSION),4)  + ' - ' + CAST(SERVERPROPERTY('edition') AS VARCHAR) + ')'

PRINT '----------------------------------------------------------------------------------------------------'

SELECT 'Memory Configuration on the Server visible to Operating System'

SELECT physical_memory_in_bytes/1048576.0 as [Physical Memory_MB], physical_memory_in_bytes/1073741824.0 as [Physical Memory_GB], virtual_memory_in_bytes/1048576.0 as [Virtual Memory MB] FROM sys.dm_os_sys_info

SELECT 'Buffer Pool Usage at the Moment'

SELECT (bpool_committed*8)/1024.0 as BPool_Committed_MB, (bpool_commit_target*8)/1024.0 as BPool_Commit_Tgt_MB,(bpool_visible*8)/1024.0 as BPool_Visible_MB  FROM sys.dm_os_sys_info

SELECT 'Total Memory used by SQL Server instance from Perf Mon '

SELECT cntr_value as Mem_KB, cntr_value/1024.0 as Mem_MB, (cntr_value/1048576.0) as Mem_GB FROM sys.dm_os_performance_counters WHERE counter_name = 'Total Server Memory (KB)'

SELECT 'Memory needed as per current Workload for SQL Server instance'

SELECT cntr_value as Mem_KB, cntr_value/1024.0 as Mem_MB, (cntr_value/1048576.0) as Mem_GB FROM sys.dm_os_performance_counters WHERE counter_name = 'Target Server Memory (KB)'

SELECT 'Total amount of dynamic memory the server is using for maintaining connections'

SELECT cntr_value as Mem_KB, cntr_value/1024.0 as Mem_MB, (cntr_value/1048576.0) as Mem_GB FROM sys.dm_os_performance_counters WHERE counter_name = 'Connection Memory (KB)'

SELECT 'Total amount of dynamic memory the server is using for locks'

SELECT cntr_value as Mem_KB, cntr_value/1024.0 as Mem_MB, (cntr_value/1048576.0) as Mem_GB FROM sys.dm_os_performance_counters WHERE counter_name = 'Lock Memory (KB)'

SELECT 'Total amount of dynamic memory the server is using for the dynamic SQL cache'

SELECT cntr_value as Mem_KB, cntr_value/1024.0 as Mem_MB, (cntr_value/1048576.0) as Mem_GB FROM sys.dm_os_performance_counters WHERE counter_name = 'SQL Cache Memory (KB)'

SELECT 'Total amount of dynamic memory the server is using for query optimization'

SELECT cntr_value as Mem_KB, cntr_value/1024.0 as Mem_MB, (cntr_value/1048576.0) as Mem_GB FROM sys.dm_os_performance_counters WHERE counter_name = 'Optimizer Memory (KB) '

SELECT 'Total amount of dynamic memory used for hash, sort and create index operations.'

SELECT cntr_value as Mem_KB, cntr_value/1024.0 as Mem_MB, (cntr_value/1048576.0) as Mem_GB FROM sys.dm_os_performance_counters WHERE counter_name = 'Granted Workspace Memory (KB) '

SELECT 'Total Amount of memory consumed by cursors'

SELECT cntr_value as Mem_KB, cntr_value/1024.0 as Mem_MB, (cntr_value/1048576.0) as Mem_GB FROM sys.dm_os_performance_counters WHERE counter_name = 'Cursor memory usage' and instance_name = '_Total'

SELECT 'Number of pages in the buffer pool (includes database, free, and stolen).'

SELECT cntr_value as [8KB_Pages], (cntr_value*@pg_size)/1024.0 as Pages_in_KB, (cntr_value*@pg_size)/1048576.0 as Pages_in_MB FROM sys.dm_os_performance_counters WHERE object_name= @Instancename+'Buffer Manager' and counter_name = 'Total pages'

SELECT 'Number of Data pages in the buffer pool'

SELECT cntr_value as [8KB_Pages], (cntr_value*@pg_size)/1024.0 as Pages_in_KB, (cntr_value*@pg_size)/1048576.0 as Pages_in_MB FROM sys.dm_os_performance_counters WHERE object_name=@Instancename+'Buffer Manager' and counter_name = 'Database pages'

SELECT 'Number of Free pages in the buffer pool'

SELECT cntr_value as [8KB_Pages], (cntr_value*@pg_size)/1024.0 as Pages_in_KB, (cntr_value*@pg_size)/1048576.0 as Pages_in_MB FROM sys.dm_os_performance_counters WHERE object_name=@Instancename+'Buffer Manager' and counter_name = 'Free pages'

SELECT 'Number of Reserved pages in the buffer pool'

SELECT cntr_value as [8KB_Pages], (cntr_value*@pg_size)/1024.0 as Pages_in_KB, (cntr_value*@pg_size)/1048576.0 as Pages_in_MB FROM sys.dm_os_performance_counters WHERE object_name=@Instancename+'Buffer Manager' and counter_name = 'Reserved pages'

SELECT 'Number of Stolen pages in the buffer pool'

SELECT cntr_value as [8KB_Pages], (cntr_value*@pg_size)/1024.0 as Pages_in_KB, (cntr_value*@pg_size)/1048576.0 as Pages_in_MB FROM sys.dm_os_performance_counters WHERE object_name=@Instancename+'Buffer Manager' and counter_name = 'Stolen pages'

SELECT 'Number of Plan Cache pages in the buffer pool'

SELECT cntr_value as [8KB_Pages], (cntr_value*@pg_size)/1024.0 as Pages_in_KB, (cntr_value*@pg_size)/1048576.0 as Pages_in_MB FROM sys.dm_os_performance_counters WHERE object_name=@Instancename+'Plan Cache' and counter_name = 'Cache Pages'  and instance_name = '_Total'
</pre>
<p>At <a href="http://diadem.co.in">Diadem Technologies</a> we have been using these scripts in our day to day DBA work and have benefited from these code snippets.</p>
<p>You can download all the scripts shown on this page from here: <a href='http://www.diademblogs.com/wp-content/uploads/2012/07/SQL-Scripts1.zip'><strong>SQL Scripts</strong> (.zip)</a></p>
Note: There is a rating embedded within this post, please visit this post to rate it.
<img src="http://feeds.feedburner.com/~r/DiademBlogs/~4/9OAaqpR0iUw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diademblogs.com/database/some-useful-sql-commands-for-ms-sql-db-admins/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.diademblogs.com/database/some-useful-sql-commands-for-ms-sql-db-admins</feedburner:origLink></item>
		<item>
		<title>Mail Queue monitoring for Qmail and Postfix email servers</title>
		<link>http://feedproxy.google.com/~r/DiademBlogs/~3/BwQs1Jh4UXw/mail-queue-monitoring-for-qmail-and-postfix-server</link>
		<comments>http://www.diademblogs.com/linux/mail-queue-monitoring-for-qmail-and-postfix-server#comments</comments>
		<pubDate>Mon, 11 Jun 2012 10:50:58 +0000</pubDate>
		<dc:creator>ankur</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mail Queue monitoring]]></category>
		<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[postfix queue monitoring]]></category>
		<category><![CDATA[qail queue monitoring]]></category>
		<category><![CDATA[qmail-remove]]></category>
		<category><![CDATA[qmHandle]]></category>

		<guid isPermaLink="false">http://www.diademblogs.com/?p=978</guid>
		<description><![CDATA[Mail Queue monitoring is a big task for any organization running a busy mail server. Failure to do in a timely manner may lead a huge mail queue of SPAM mails or Bulk mail in the queue, which slows down the delivery of genuine mails in the queue. There are few third party tools and [...]]]></description>
			<content:encoded><![CDATA[<p>Mail Queue monitoring is a big task for any organization running a busy mail server. Failure to do in a timely manner may lead a huge mail queue of SPAM mails or Bulk mail in the queue, which slows down the delivery of genuine mails in the queue. There are few third party tools and inbuilt command is available to monitor the mail queue in Qmail or Postfix mail server.</p>
<h3>Qmail Server Mail Queue monitoring overview:</h3>
<blockquote><p><em>/var/qmail/bin/qmail-qstat</em> will show current processed or unprocessed mail in the queue. This is a qmail inbuilt command.</p>
<p><em>/var/qmail/bin/qmail-qread</em> will show a brief details of queued mails, like delivery address and mail type (remote/local).</p></blockquote>
<p>These are only inbuilt command in Qmail for mail queue monitoring.</p>
<p>There are few third-party tools available for Qmail for mail queue monitoring.</p>
<p><span style="text-decoration: underline;"><strong><em>qmHandle </em></strong></span>is a simple program which allows you to view and manage the Qmail message queue. The software will work on every Unix platform with Perl installed and Qmail installed.</p>
<p><em>qmHandle </em>Installation:<br />
# wget http://optusnet.dl.sourceforge.net/sourceforge/qmhandle/qmhandle-1.3.2.tar.gz<br />
# tar -xvzf qmhandle-1.3.2.tar.gz<br />
# cp qmHandle /usr/bin/</p>
<p>Now run the command as<br />
# <em>qmHandle</em></p>
<p>Available parameters:<br />
-a       : try to send queued messages now (qmail must be running)<br />
-l       : list message queues<br />
-L       : list local message queue<br />
-R       : list remote message queue<br />
-s       : show some statistics<br />
-mN      : display message number N<br />
-dN      : delete message number N<br />
-fsender : delete message from sender<br />
-f&#8217;re&#8217;   : delete message from senders matching regular expression re<br />
-Stext   : delete all messages that have/contain text as Subject<br />
-h&#8217;re&#8217;   : delete all messages with headers matching regular expression re (case insensitive)<br />
-b&#8217;re&#8217;   : delete all messages with body matching regular expression re (case insensitive)<br />
-H&#8217;re&#8217;   : delete all messages with headers matching regular expression re (case sensitive)<br />
-B&#8217;re&#8217;   : delete all messages with body matching regular expression re (case sensitive)<br />
-t&#8217;re&#8217;   : flag messages with recipients in regular expression &#8216;re&#8217; for earlier retry (note: this lengthens the time message can stay in queue)<br />
-D       : delete all messages in the queue (local and remote)<br />
-V       : print program version</p>
<p>You can view/delete multiple message i.e. -d123 -v456 -d567</p>
<p>The <span style="text-decoration: underline;"><strong><em>Qmail-Remove</em></strong></span> utility will remove messages containing a particular string from your Qmail queue.</p>
<p>Qmail-Remove Installation:<br />
# wget http://www.linuxmagic.com/opensource/qmail/qmail-remove/qmail-remove-0.95.tar.gz<br />
# tar –zxvf qmail-remove-0.95.tar.gz<br />
# mkdir /var/qmail/queue/yanked<br />
# make ; make install</p>
<p>Now for deleting mail containing a particular IP Address run:</p>
<blockquote><p># qmail-remove -p 111.111.111.11 –v -d</p></blockquote>
<p>You can change the IP address with a word string also  e.g.</p>
<blockquote><p># qmail-remove -p your- string -v -d</p></blockquote>
<blockquote><p># qmail-remove -p your- string -v -r</p></blockquote>
<p>This will yanked the mails instead of permanent delete.</p>
<h3><strong>Postfix Server Mail Queue monitoring overview:</strong></h3>
<p>List/Print current mail queue</p>
<p># postqueue –p<br />
# mailq</p>
<p>Flush the queue</p>
<p># postqueue -f</p>
<p>Schedule immediate delivery of all mail that is queued for the named as domain.come.</p>
<p># postqueue -s domain.com</p>
<p>TO delete all queue</p>
<p># postsuper -d ALL</p>
<p>To delete a particular message</p>
<p># postsuper -d messageid</p>
<p>Postfix inbuilt tools are pretty good for monitoring the mail Queue.</p>
<p>That’s all, for all my System Admin friends. I will keep posted for other useful article soon. Keep browsing <img src='http://www.diademblogs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
Note: There is a rating embedded within this post, please visit this post to rate it.
<img src="http://feeds.feedburner.com/~r/DiademBlogs/~4/BwQs1Jh4UXw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diademblogs.com/linux/mail-queue-monitoring-for-qmail-and-postfix-server/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.diademblogs.com/linux/mail-queue-monitoring-for-qmail-and-postfix-server</feedburner:origLink></item>
		<item>
		<title>Diadem hosting services, now available at a datacenter near you!</title>
		<link>http://feedproxy.google.com/~r/DiademBlogs/~3/kHpPv8eaSSg/diadem-hosting-services-now-available-at-a-datacenter-near-you</link>
		<comments>http://www.diademblogs.com/datacenter/diadem-hosting-services-now-available-at-a-datacenter-near-you#comments</comments>
		<pubDate>Tue, 28 Feb 2012 09:59:01 +0000</pubDate>
		<dc:creator>hriday</dc:creator>
				<category><![CDATA[Datacenter]]></category>
		<category><![CDATA[News & Updates]]></category>

		<guid isPermaLink="false">http://www.diademblogs.com/?p=1316</guid>
		<description><![CDATA[At Diadem Technologies, we strive to deliver an enhanced web hosting experience which our customers expect from a professional web hosting provider. In keeping with this commitment, I am pleased to announce the launch of our new hosting facility from Singapore, which is situated bang in the middle of the APAC region and would enable [...]]]></description>
			<content:encoded><![CDATA[<p>At Diadem Technologies, we strive to deliver an enhanced web hosting experience which our customers expect from a professional web hosting provider. In keeping with this commitment, I am pleased to announce the launch of our new hosting facility from Singapore, which is situated bang in the middle of the APAC region and would enable much faster access to websites, emails and applications which we host in this new datacenter facility.</p>
<p>The Singapore datacenter has been built by Softlayer, which is the world&#8217;s largest and most innovative datacenter services provider. We have been using their network ever since 2006 and have found their network, hardware and support services to be top notch and very efficient. This multimillion dollar, state-of-the-art  datacenter facility has the following specs:</p>
<ul>
<li>Capacity: more than 16,000 dedicated servers</li>
<li>30 MW available input power</li>
<li>12 x 800Kva UPS Battery Backup Units, 2N</li>
<li>12 x 2000Kw Diesel Generator with On-site Fuel Storage, N+1</li>
</ul>
<ul>
<li>48 x 123.3kW CRAH units, N+2</li>
<li>4 x 5.275kW chillers, N+2</li>
<li>Pre-Action Dry Pipe Fire Suppression</li>
<li>Proximity Security Badge Access</li>
<li>Digital Security Video Surveillance<br />
<em>get more details at: <a href="http://www.softlayer.com/advantages/datacenters/singapore">http://www.softlayer.com/advantages/datacenters/singapore</a></em></li>
</ul>
<p>With over 2000 Gbps of network connectivity across the Softlayer 13 datacenters and a reduced latency time compared to US datacenters, our customers can expect the load time of their websites and the time taken to access their emails, stored files and databases to drop considerably as we move our servers from the US to Asia, since almost all our network traffic (incoming and outgoing) is from this region.</p>
<p>As an added example, I have run ping and traceroute commands to both our servers in the Softlayer US and the SG datacenters and found the the singapore servers to have a much lower latency (by over 70%) and also much less hops are required to reach the singapore servers.</p>
<p>Average ping response to US server:312 ms</p>
<p><code><span style="color: #888888;">Pinging plesk04.diadem-tech.com [208.43.212.71] with 32 bytes of data:<br />
Reply from 208.43.212.71: bytes=32 time=312ms TTL=47<br />
Reply from 208.43.212.71: bytes=32 time=313ms TTL=47<br />
Reply from 208.43.212.71: bytes=32 time=313ms TTL=47<br />
Reply from 208.43.212.71: bytes=32 time=312ms TTL=47<br />
<span style="color: #000000;">Ping statistics for 208.43.212.71:<br />
Minimum = 312ms, Maximum = 313ms, <strong>Average = 312ms </strong></span></span></code></p>
<p>Compare this with our singapore server which has a 70% lower latency at 97 ms:</p>
<p><span style="color: #888888;">Pinging 216.185.104.235 with 32 bytes of data:<br />
Reply from 216.185.104.235: bytes=32 time=97ms TTL=115<br />
Reply from 216.185.104.235: bytes=32 time=98ms TTL=115<br />
Reply from 216.185.104.235: bytes=32 time=97ms TTL=115<br />
Reply from 216.185.104.235: bytes=32 time=98ms TTL=115</span></p>
<p>Ping statistics for 216.185.104.235:<br />
Minimum = 97ms, Maximum = 98ms, <strong>Average = 97ms (215 ms less then the US server!)<br />
</strong></p>
<p>Here are some images of the SL Singapore datacenter and some links from their blogs:</p>
<p><img class="alignnone" title="Softlayer Singapore office" src="http://farm7.static.flickr.com/6172/6207463999_57b1bdd905_b.jpg" alt="" width="614" height="346" /></p>
<p><img class="alignnone" title="softlayer singapore datacenter" src="http://farm7.static.flickr.com/6168/6207976966_c6e8431c35.jpg" alt="" width="500" height="281" /></p>
<p><img class="alignnone" title="softlayer datacenter " src="http://farm7.static.flickr.com/6169/6207463923_41dd867aea.jpg" alt="" width="500" height="281" /></p>
<p>Links from Softlayer.com on their international expansion:</p>
<ul>
<li><a href="http://blog.softlayer.com/2011/globalization-and-hosting-the-world-wide-web-is-flat/">http://blog.softlayer.com/2011/globalization-and-hosting-the-world-wide-web-is-flat/</a></li>
<li><a href="http://blog.softlayer.com/2011/global-expansion-singapore-ready-for-launch/">http://blog.softlayer.com/2011/global-expansion-singapore-ready-for-launch/</a></li>
<li><a href="http://blog.softlayer.com/2011/global-expansion-singapore-ready-for-launch/">http://www.softlayer.com/press/release/1321/softlayer-launches-asia-pacific-operation/</a></li>
</ul>
<p>As you can view from the above pics, this is a brand new datacenter with all the network security, performance and scaling up advantages which you can expect from the world&#8217;s leading datacenter provider and we are excited to bring this network closer to our customers.</p>
<p>We start moving our first server from US to Asia, this weekend and this will be an ongoing process, till we migrate the bulk of our servers over the next few months and deliver an outstanding hosting experience to our customers, all over again!</p>
Note: There is a rating embedded within this post, please visit this post to rate it.
<img src="http://feeds.feedburner.com/~r/DiademBlogs/~4/kHpPv8eaSSg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diademblogs.com/datacenter/diadem-hosting-services-now-available-at-a-datacenter-near-you/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.diademblogs.com/datacenter/diadem-hosting-services-now-available-at-a-datacenter-near-you</feedburner:origLink></item>
		<item>
		<title>Service improvements and new hosted solutions @ Diadem Technologies</title>
		<link>http://feedproxy.google.com/~r/DiademBlogs/~3/5lkV_AjeMH4/service-improvements-and-new-hosted-solutions-diadem</link>
		<comments>http://www.diademblogs.com/news-updates/service-improvements-and-new-hosted-solutions-diadem#comments</comments>
		<pubDate>Tue, 14 Feb 2012 05:09:07 +0000</pubDate>
		<dc:creator>hriday</dc:creator>
				<category><![CDATA[News & Updates]]></category>

		<guid isPermaLink="false">http://www.diademblogs.com/?p=1308</guid>
		<description><![CDATA[It has been a busy few months for all of us here at Diadem as we are working round the clock on our servers and ensuring smooth operations of our datacenter services. Here is a recap of all the key activities which has been keeping us busy over the past few months: a. Support team [...]]]></description>
			<content:encoded><![CDATA[<p>It has been a busy few months for all of us here at Diadem as we are working round the clock on our servers and ensuring smooth operations of our datacenter services. Here is a recap of all the key activities which has been keeping us busy over the past few months:</p>
<p><strong>a. Support team augmentation: </strong>We have added more staff to our support team and have also been training them to work with our new hosting tools and utilities to ensure that our clients get prompt feedback for their queries. Our support team is now also available on Sunday&#8217;s (from 10AM  &#8211; 2 PM IST) and we are planning to further enhance our support functions by bringing in more resources and further extending their availability over the next few months.</p>
<p><strong>b.Plesk Control Panel upgrade to 10.4:</strong> For our shared hosting clients, we have now upgraded our hosting control panel to the latest release of the much awaited Plesk control panel version 10.4. The new version of the Plesk panel has a more intuitive interface, single login for clients hosting multiple domains, third party application hosting support and administrative enhancements for admin users.</p>
<p><strong><a title="plesk control panel 10.4" href="http://www.parallels.com/products/plesk/">Get more details of the latest Plesk control panel 10.4</a></strong></p>
<p><strong>c. New VPS and Dedicated Hosting setups</strong>: We have added a record no. of new clients for our dedicated and vps hosting services, proving our capability for managing mission critical apps and services for our clients through our superior datacenter services, coupled with enterprise level backup and security services and our round the clock server management services. We will continue to enhance and further extend our dedicated and vps offerings in the next few months, so stay tuned.</p>
<p><strong>d. Diadem Hosted Solutions: </strong>In a step beyond traditional mass market shared and plain vanilla vps hosting services, we have introduced the <a title="Diadem Hosted Solutions" href="http://www.diadem.co.in" target="_self">Diadem Hosted Solutions </a>services which is essentially a SAAS model for providing enterprise level hosted services for small to mid sized organisation who wish to benefit from a zero capex enterprise level messaging, archiving and backup solution. Currently, we have introduced the following hosted services which has already been deployed for a good no. of clients for the past 12-18 months:</p>
<ul>
<li><strong><a title="R1soft data protection and backup solution" href="http://www.diadem.co.in/backup-&amp;-recovery/r1soft-cdp-continuous-data-protection-&amp;-recovery-solution" target="_blank">R1Soft Continuous Data Protection &amp; Recovery Solution</a></strong></li>
<li><strong><a href="http://www.diadem.co.in/email-tracking">Email archiving and retention solution<br />
</a></strong></li>
<li><strong><a href="http://www.diadem.co.in/zimbra-groupware/hosted-zimbra-collaboration-server-zcs">Hosted Zimbra Groupware<br />
</a></strong></li>
</ul>
<p><strong>e. Sysadmin knowledge sharing</strong>: The job of a sysadmin is never complete. As soon as one job is completed or an issue is resolved, another task, issue, update or an emergency pops up in front of us, making our job an ongoing roller coaster ride or learning, relearning and improvements. At Diadem, we have focused the last few months in documenting all our routine and custom activities in our internal knowledgebase which is shared by our sysadmins in enabling them to share their knowledge, resolve issues faster and work more cohesively as a single unit. We have been working tirelessly in the background to ensure less spams are being received in your inboxes, your sites stay clean from malware, intrusion attempts are nullified and all our servers are operating at an optimal state, 24&#215;7.</p>
<p>The above activities, in a nutshell have kept us busy for the past few months but we have also been working on further extending our offerings and improving our services in the next couple of quarters, so if you would like to get email updates on our new offerings, signup on our <a href="http://www.diadem.co.in" target="_blank">newsletter mailing list</a> on the main page of our website.</p>
Note: There is a rating embedded within this post, please visit this post to rate it.
<img src="http://feeds.feedburner.com/~r/DiademBlogs/~4/5lkV_AjeMH4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diademblogs.com/news-updates/service-improvements-and-new-hosted-solutions-diadem/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.diademblogs.com/news-updates/service-improvements-and-new-hosted-solutions-diadem</feedburner:origLink></item>
	</channel>
</rss>
