Saturday, February 2, 2013

Failed to initialize dtrace message

Recently, I wanted to learn DTrace programming, so I installed OpenSolaris 10 virtual machine on my laptop. After installation, I tried to execute a simple dtrace command but got the following message:

"dtrace: failed to initialize dtrace: DTrace require additional previleges"


Solution:
By default, when you install OpenSolaris 10, your primary profile is set as 'Primary Administrator' and role as 'root' but you are logged in as a normal user without root privileges. Therefore, to solve my issue I had to 'su' as 'root' and run DTrace commands.


You can check what role and profile you are assigned after installation by running following command:    cat /etc/user_attr


NOTE: If you don't want to log in as a root each time you want to run the DTrace command, you can read the following article on how to give DTrace privilege to a normal user.

Sunday, January 20, 2013

Macro to delete multiple comments in MS Word 2003

There are times when a reviewed Test plan doc(or someother MS Word document) comes back with multiple comments that need addressing. Once these have been addressed, there is no option to delete all comments in the MS Word like "Accept All Changes in Document" option. You can delete each comment after you have address it (manually) or use the following vbs macro to delete all the comments at once.


Sub RemoveComments()
Dim commCount As Integer
Dim oDoc As Document
Set oDoc = ActiveDocument
For commCount = 1 To oDoc.Comments.Count
   oDoc.Comments(1).Delete
Next
End Sub

Alternatively you can use this macro.


Sub RemoveComments()
Dim oDoc As Document
Set oDoc = ActiveDocument
oDoc.DeleteAllComments End Sub

NOTE: In MS Word 2007 and later, there is an option to delete all comments at once.

Monday, January 14, 2013

SQL vs NoSQL

Interesting talk on SQL vs NoSQL by Ken Ashcraft and Alfred Fuller.


Following scorecard taken from the talk.

Friday, October 5, 2012

IBM HeapAnalyzer java.lang.OutOfMemory

You might get java.lang.OutOfMemory error in IBM HeapAnalyzer while processing heapdumps.
Try increasing the JVM heap size and see whether it fixes your OutOfMemory issue before trying other options.



 Following is how you invoke HeapAnalyzer with a heap size parameter in windows.


Finally if your OutOfMemory Issue is fixed, you should able to see the heap dump analysis in HeapAnalyzer.

 

Thursday, October 4, 2012

Chrome About URL

I was playing around with Chrome's about feature few days ago but forgot the actual URL. Therefore this post is to remind me the actual URL. The URL is chrome://about/. There are some useful URLs to know in the list and they are:
  • chrome://dns/
  • chrome://tracing/
  • chrome://profiler/
  • chrome://net-internals/
  • chrome://memory-redirect/
  • chrome://flags/