« Domino Workshop on Linux | Main| New AJAX Guidelines »

Debug In Your Domino Console

Category Administration
This is not a pay-grade tip, just something that's an interesting technique when debugging your server. Starting in Domino 7, a small change has occurred in debugging—it is now possible to debug server-to-server activities right in the console.


Because this method will only be of interest to Domino administrators, you're going to have to click into the entry to read further.


For as long as I can remember, Notes has supported client-to-server debugging. It's one of the best known undocumented, and unsupported features of Notes. It is officially mentioned in only one Domino performance Redbook, but you can easily find it described all over the Internet.


By adding two lines to the Notes.ini, all Notes Remote Procedure Calls to a Domino server are displayed in a debug console window. What is displayed is the name of the C/C++ routines being invoked, their time and data size of the transmission. Even though it's quite geeky, lots of Domino programmers like to have it open because it can easily identify latency for their routines. Help desk and support administrators also modify the Notes.ini to assist in their troubleshooting.


The two lines are:


DEBUG_CONSOLE=1

CLIENT_CLOCK=1


It is possible to have the debugging write directly into a log file (to create a permanent record), but most developers use the console format.


Starting in 7.0, and continued in 7.0.1 we can now use these debugging parameters in the Domino Notes.ini to present debugging information in the server console. When used for the Notes client, the debugging shows client-to-server transactions. When written into the Domino server's notes.ini, the debugging information is shown directly in the server's console. Here's how it looks when I replicate with Notes1.Notes.Net (an IBM/Lotus public Domino server).


rep notes1.notes.net

(1-2694 [204]) OPEN_DB(notes1!!):

05/11/2006 11:57:00 AM Database Replicator started

05/11/2006 11:57:00 AM Replicator is set to Ignore Database Quotas

05/11/2006 11:57:00 AM Non-fatal problem encountered during authentication with server Notes1/NotesWeb: Your public key was not found in the Name and Address Book

05/11/2006 11:57:01 AM Non-fatal problem encountered during authentication with server Notes1/NotesWeb: Your public key was not found in the Name and Address Book

(Connect to Notes1/NotesWeb: 791 ms)

(Exch names: 0 ms)

(Authenticate:

0 ms.)

(OPEN_SESSION: 40 ms)

110 ms. [138+294=432]

(2-2695 [205]) SERVER_AVAILABLE_LITE:

40 ms. [30+108=138] (Access to this server has been restricted due to excessive load)

(3-2695 [206]) DBGETREPLICAMATCHES:

05/11/2006 11:57:01 AM Starting replication with server Notes1/NotesWeb

130 ms. [1284+662=1946]

(4-2695 [207]) OPEN_DB(CN=Notes1/O=NotesWeb!!dfc\dfc100.nsf):

50 ms. [138+294=432]

(5-2695 [208]) CLOSE_DB(REP85257031:0059D0FB):

0 ms. [18+0=18]

05/11/2006 11:57:01 AM Access control is set in dfc\dfc100.nsf to not allow replication from Notes1/NotesWeb dfc\dfc100.nsf

(6-2695 [209]) OPEN_DB(CN=Notes1/O=NotesWeb!!iNotes\Forms5.nsf):


It's a useful tool, but it's not recommended to leave on all the time—or you are just going to bog down your logs with too much content.


Don't forget that you don't actually need to open up the notes.ini file to make changes to its configuration. You can use either the configuration document for the server, or directly enter the modifications into the server console, like so:


  • Start with a “sh config *” Now, all the notes.ini configurations will be exposed in the server console.

  • Now enter “set config CLIENT_CLOCK=1” and hit return.

  • Enter the next line, “set config DEBUG_CONSOLE=1” and hit return.

  • Restart your server

  • To turn it off, simple reenter the configurations with a “0” instead of a “1”

Comments

Gravatar Image5 - Thanks for the information

Gravatar Image4 - FYI: This a really old technic but it was called client_clock on the client and server_clock on the server.

Gravatar Image3 - Jack, I usually will not use the log unless I need to get info to Lotus. I have used the console to see that the get_unread was causing really poor db performance. Probably should have just looked at that setting first , but I didn't develop the application...

Gravatar Image2 - Thanks, Chris, I am never quite how much information to post and I appreciate the clarity of your explanation. I'm not as fond of the console_log unless I need to document a specific activity. For instance, using the debug console I was able to identify that a weird problem with a form was tied to an authors field having set the "editor only" property.

Gravatar Image1 - Jack, great tips. I need to update my debugging page on my site:

http://cwhisonant.blogspot.com/2005/07/debugging-for-domino.html

I was not aware that they added this to the server notes.ini - thanks. In regards to the client console, I have this section in my notes.ini that I will use sometimes when troubleshooting issues for a user (just copy/paste the whole section).

;-------------------------------------------
;-------------------------------------------
;-----Notes Client Debugging Parameters-----
;Console_LogLevel=2
;LOG_SESSIONS=1
;LOG_CONNECTIONS=1
;TCP_DEBUG_ALL=1
;CLIENT_CLOCK=1
;CONSOLE_LOG_ENABLED=1
;DEBUG_CONSOLE=1
;-------------------------------------------
;-------------------------------------------

You can then enable whichever lines you wish. I like having the CONSOLE_LOG_ENABLED=1 because that will create the log files along with the console window.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::rolleyes:;-)