<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
 xmlns:admin="http://webns.net/mvcb/"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:content="http://purl.org/rss/1.0/modules/content/"
 xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel><title>Secret Agent Man's Blog | Comments</title><description>Agents, agents everywhere.   Let's work together to fix your problem.</description><link>http://www.rprwyatt.com/sablog.nsf/</link><language>en-us</language><lastBuildDate>Mon, 22 Sep 2008 07:07:03 AM -0700</lastBuildDate>
<item>
<title>Re Time Creep / Application Agents</title>
<pubDate>Mon, 22 Sep 2008 07:07:03 AM -0700</pubDate>
<dc:creator>Secret Agent Man</dc:creator>
<dc:subject>Taking on all comers</dc:subject>
<description><![CDATA[Dear Chuck,<br /><br />The problem you are describing is a documented issue in Domino. Please follow the link to see the detailed desciption of the problem: http://www-10.lotus.com/ldd/bpmpblog.nsf/dx/creating-documents-in-the-future?opendocument&comments<br /><br />The way Lotus suggests to alleviate the issue is by avoing creation of too many documents at the same time. If you can divide up the task of document creation into batches, the time difference variation should subside. Please let us know if we can help you further.<br /><br />Sincerely, <br /><br />- Secret Agent Man]]></description>
<content:encoded><![CDATA[Dear Chuck,<br /><br />The problem you are describing is a documented issue in Domino. Please follow the link to see the detailed desciption of the problem: http://www-10.lotus.com/ldd/bpmpblog.nsf/dx/creating-documents-in-the-future?opendocument&comments<br /><br />The way Lotus suggests to alleviate the issue is by avoing creation of too many documents at the same time. If you can divide up the task of document creation into batches, the time difference variation should subside. Please let us know if we can help you further.<br /><br />Sincerely, <br /><br />- Secret Agent Man]]></content:encoded>
<link>http://www.rprwyatt.com/sablog.nsf/dx/taking-on-call-comers.htm?opendocument&amp;comments#09222008070703AMNSHJKF.htm</link>
</item>
<item>
<title>Time Creep / Application Agents</title>
<pubDate>Thu, 18 Sep 2008 06:40:43 AM -0700</pubDate>
<dc:creator>Chuck Hauble</dc:creator>
<dc:subject>Taking on all comers</dc:subject>
<description><![CDATA[I have a database that has several agents running on a schedule.. and several others that are triggered via and ?openagent call via http. These agents process and create documents in the same database they are running in. <br /><br />The agents run fine, but the create/date time on the documents that are created by them is in the future. The time can get to be up to an hour ahead.. it does eventually catch up and then go ahead again.<br /><br />The server time both OS and Domino is fine and other databases don't have this problem.<br /><br />Just doing the Time Warp... Any Ideas??]]></description>
<content:encoded><![CDATA[I have a database that has several agents running on a schedule.. and several others that are triggered via and ?openagent call via http. These agents process and create documents in the same database they are running in. <br /><br />The agents run fine, but the create/date time on the documents that are created by them is in the future. The time can get to be up to an hour ahead.. it does eventually catch up and then go ahead again.<br /><br />The server time both OS and Domino is fine and other databases don't have this problem.<br /><br />Just doing the Time Warp... Any Ideas??]]></content:encoded>
<link>http://www.rprwyatt.com/sablog.nsf/dx/taking-on-call-comers.htm?opendocument&amp;comments#09182008064043AMAZPJ2Z.htm</link>
</item>
<item>
<title>RE: Agent using alot of CPU</title>
<pubDate>Thu, 21 Aug 2008 07:20:32 AM -0700</pubDate>
<dc:creator>Secret Agent Man</dc:creator>
<dc:subject>Taking on all comers</dc:subject>
<description><![CDATA[Dear Joe,<br /><br />First we would like to thank you for your substantial question which voiced the pain of so many Domino Administrators. As you know well, the background agents can take up a lot of CPU cycles and slow down the system. An agent with poor coding is simply a recipe for poor server performance. Provided that your Domino server is running on Windows platform, I have the recipe to identify if your agent is a CPU hog or not. <br /><br />The basic idea is to combine log data of Domino with that of native performance measurement tool in Windows (Performance application) and identify your agent's performance profile. The first step is to improve the debugging level on your Domino server so that you can capture the thread id of each agent that runs. Then, you will leverage the Windows Performance application to capture the CPU usage of all Domino agent threads. Finally, you identify the profile of the specific agent you are looking to measure.<br /><br />1. The very first thing to do is to make sure that your domino server captures the thread ids of agents, server tasks, etc. with the following console command.<br /><br />> set config DEBUG_THREADID=1<br /><br />2. Now, go to the Control Panel of the Domino Server, and click on the Administrative Tasks\Performance. Double click on Performance Logs and Alerts<br /><br />3. Right-Click on Counter Logs and select New Log Settings. Give it a name and click OK.<br /><br />4. Click on Add Counters. Select Thread for Performance Object.<br /><br />5. Click on Select counters from list and make sure % Processor Time, ID Process and Thread are selected.<br /><br />6. Click on Select instances from list and use Shift key to select all of the namgr instances in the list.<br /><br />7. Click Add. Click Close. <br /><br />8. Click on Log Files and select your desired Log File type. e.g. Tab delimited text file.<br /><br />9. Click OK<br /><br />10. In the list of Counter Logs, highlight the one you had just created and right-click Start (Actually, start the logging a moment before your agent kicks off and remember to turn it off when the agent is done).<br /><br />11. In the resulting text file, you will find not only the performance values, but also the thread id. What you have to do is to trace the target agent in this text file using its thread id that you can get form the Log.nsf of the domino server.<br /><br />Note, the more Performance counters you select, the more data you will be presented in the text file. Just remember to turn off the Performance logging to avoid excessive disk consumption.<br /><br />Sincerely, <br /><br />- Secret Agent Man]]></description>
<content:encoded><![CDATA[Dear Joe,<br /><br />First we would like to thank you for your substantial question which voiced the pain of so many Domino Administrators. As you know well, the background agents can take up a lot of CPU cycles and slow down the system. An agent with poor coding is simply a recipe for poor server performance. Provided that your Domino server is running on Windows platform, I have the recipe to identify if your agent is a CPU hog or not. <br /><br />The basic idea is to combine log data of Domino with that of native performance measurement tool in Windows (Performance application) and identify your agent's performance profile. The first step is to improve the debugging level on your Domino server so that you can capture the thread id of each agent that runs. Then, you will leverage the Windows Performance application to capture the CPU usage of all Domino agent threads. Finally, you identify the profile of the specific agent you are looking to measure.<br /><br />1. The very first thing to do is to make sure that your domino server captures the thread ids of agents, server tasks, etc. with the following console command.<br /><br />> set config DEBUG_THREADID=1<br /><br />2. Now, go to the Control Panel of the Domino Server, and click on the Administrative Tasks\Performance. Double click on Performance Logs and Alerts<br /><br />3. Right-Click on Counter Logs and select New Log Settings. Give it a name and click OK.<br /><br />4. Click on Add Counters. Select Thread for Performance Object.<br /><br />5. Click on Select counters from list and make sure % Processor Time, ID Process and Thread are selected.<br /><br />6. Click on Select instances from list and use Shift key to select all of the namgr instances in the list.<br /><br />7. Click Add. Click Close. <br /><br />8. Click on Log Files and select your desired Log File type. e.g. Tab delimited text file.<br /><br />9. Click OK<br /><br />10. In the list of Counter Logs, highlight the one you had just created and right-click Start (Actually, start the logging a moment before your agent kicks off and remember to turn it off when the agent is done).<br /><br />11. In the resulting text file, you will find not only the performance values, but also the thread id. What you have to do is to trace the target agent in this text file using its thread id that you can get form the Log.nsf of the domino server.<br /><br />Note, the more Performance counters you select, the more data you will be presented in the text file. Just remember to turn off the Performance logging to avoid excessive disk consumption.<br /><br />Sincerely, <br /><br />- Secret Agent Man]]></content:encoded>
<link>http://www.rprwyatt.com/sablog.nsf/dx/taking-on-call-comers.htm?opendocument&amp;comments#08212008072032AMNSHJST.htm</link>
</item>
<item>
<title>Agent using alot of CPU</title>
<pubDate>Thu, 14 Aug 2008 09:42:05 AM -0700</pubDate>
<dc:creator>Joe Seaborne</dc:creator>
<dc:subject>Taking on all comers</dc:subject>
<description><![CDATA[I was wondering how or if I can test a agent to see if it's code is poorly written thus causing nAMGR to spike for CPU utilization.]]></description>
<content:encoded><![CDATA[I was wondering how or if I can test a agent to see if it's code is poorly written thus causing nAMGR to spike for CPU utilization.]]></content:encoded>
<link>http://www.rprwyatt.com/sablog.nsf/dx/taking-on-call-comers.htm?opendocument&amp;comments#08142008094205AMAZPMLC.htm</link>
</item>
<item>
<title>Re servlet</title>
<pubDate>Sat, 9 Aug 2008 02:50:10 PM -0700</pubDate>
<dc:creator>Secret Agent Woman</dc:creator>
<dc:subject>Taking on all comers</dc:subject>
<description><![CDATA[I feel like a politician re your questions<br /><br />1. Probably quicker; no telling how much until you give it a shot (:-><br /><br />2. Will it free up web agent tasks?.... Absolutely<br /><br />3. We do not but an example to share but fortunately there are plenty of servlet examples on the internet]]></description>
<content:encoded><![CDATA[I feel like a politician re your questions<br /><br />1. Probably quicker; no telling how much until you give it a shot (:-><br /><br />2. Will it free up web agent tasks?.... Absolutely<br /><br />3. We do not but an example to share but fortunately there are plenty of servlet examples on the internet]]></content:encoded>
<link>http://www.rprwyatt.com/sablog.nsf/dx/taking-on-call-comers.htm?opendocument&amp;comments#08092008025010PMRGITK6.htm</link>
</item>
<item>
<title>Shirts</title>
<pubDate>Sat, 9 Aug 2008 02:45:54 PM -0700</pubDate>
<dc:creator>Ron Gilbert</dc:creator>
<dc:subject>Taking on all comers</dc:subject>
<description><![CDATA[Your shit will be winging its way to you as soon as I have your mailing address. You can send it to me at rgilbert@rprwyatt.com.<br /><br />Size choices are L and XL.]]></description>
<content:encoded><![CDATA[Your shit will be winging its way to you as soon as I have your mailing address. You can send it to me at rgilbert@rprwyatt.com.<br /><br />Size choices are L and XL.]]></content:encoded>
<link>http://www.rprwyatt.com/sablog.nsf/dx/taking-on-call-comers.htm?opendocument&amp;comments#08092008024554PMRGITGH.htm</link>
</item>
<item>
<title>Servlet</title>
<pubDate>Thu, 7 Aug 2008 02:50:50 AM -0700</pubDate>
<dc:creator>Adam Foster</dc:creator>
<dc:subject>Taking on all comers</dc:subject>
<description><![CDATA[I have an advert agent that displays random adverts on various web pages.<br /><br />It runs in lotusscript and runs as a javascript, ie Content-Type: text/javascript is the first line printed out and every line is then document.write('&lt;html of some sort&gt;');.<br /><br />It runs about 3000 times a day, it doesn't take long, but I have been thinking of writing it in java as a servlet.<br /><br />Reasons:<br /><br />The agent will stay loaded in memory and so will run quicker. much quicker?<br /><br />I can practice java.<br /><br />Hopefully it will free up some web agent tasks as some other web lotusscript agents sometimes time out.<br /><br />Will it free up web agent tasks?<br /><br />Have you any code I can use as a starting point?]]></description>
<content:encoded><![CDATA[I have an advert agent that displays random adverts on various web pages.<br /><br />It runs in lotusscript and runs as a javascript, ie Content-Type: text/javascript is the first line printed out and every line is then document.write('&lt;html of some sort&gt;');.<br /><br />It runs about 3000 times a day, it doesn't take long, but I have been thinking of writing it in java as a servlet.<br /><br />Reasons:<br /><br />The agent will stay loaded in memory and so will run quicker. much quicker?<br /><br />I can practice java.<br /><br />Hopefully it will free up some web agent tasks as some other web lotusscript agents sometimes time out.<br /><br />Will it free up web agent tasks?<br /><br />Have you any code I can use as a starting point?]]></content:encoded>
<link>http://www.rprwyatt.com/sablog.nsf/dx/taking-on-call-comers.htm?opendocument&amp;comments#08072008025050AMAZPDKB.htm</link>
</item>
<item>
<title>Nice one</title>
<pubDate>Thu, 7 Aug 2008 02:37:04 AM -0700</pubDate>
<dc:creator>Adam Foster</dc:creator>
<dc:subject>Taking on all comers</dc:subject>
<description><![CDATA[Yes, good answer about terminate, that's how i did it. <br /><br />I stuck all the code in there. : )<br /><br />Do I get a t shirt anyway, or shall I think of another one?]]></description>
<content:encoded><![CDATA[Yes, good answer about terminate, that's how i did it. <br /><br />I stuck all the code in there. : )<br /><br />Do I get a t shirt anyway, or shall I think of another one?]]></content:encoded>
<link>http://www.rprwyatt.com/sablog.nsf/dx/taking-on-call-comers.htm?opendocument&amp;comments#08072008023704AMAZPDAQ.htm</link>
</item>
<item>
<title>Re how about Java</title>
<pubDate>Fri, 1 Aug 2008 08:33:15 AM -0700</pubDate>
<dc:creator>Secret Agent Man</dc:creator>
<dc:subject>Taking on all comers</dc:subject>
<description><![CDATA<br /><br />In a similar way to using LotusScripts "Terminate" method, override the "finalize" method on your Java agent class. Code here is called when the Java VM garbage collects your agent class. You can do whatever you want here for as long as you want, however you are not usually able to determine when garbage collection occurs.. so a call to System.gc() will attempt to force a garbage collection which will hopefully pick up your main agent class and call your finalize code. Here’s an example:<br /><br />--------------------------------------------------<br /><br />import lotus.domino.*;<br /><br />public class JavaAgent extends AgentBase {<br /><br />public void finalize()<br /><br />{<br /><br /> System.out.println("FinalStart");<br /><br /> int i = 0;<br /><br /> while (i < 5000)<br /><br /> {<br /><br /> try {<br /><br /> Thread.sleep(1000);<br /><br /> } catch (Exception ex)<br /><br /> {<br /><br /> }<br /><br /> System.out.println("Beep " + i);<br /><br /> i++;<br /><br /> }<br /><br /> System.out.println("5000 seconds later.");<br /><br /> super.finalize();<br /><br /> }<br /><br /> <br /><br /> public void NotesMain() {<br /><br /> try {<br /><br /> Session session = getSession();<br /><br /> AgentContext agentContext = session.getAgentContext();<br /><br /> System.out.println("Not much to do here.");<br /><br /> System.gc();<br /><br /> <br /><br /> } catch(Exception e) {<br /><br /> e.printStackTrace();<br /><br /> }<br /><br /> }<br /><br />}]]></description>
<content:encoded><![CDATA[<br /><br />In a similar way to using LotusScripts "Terminate" method, override the "finalize" method on your Java agent class. Code here is called when the Java VM garbage collects your agent class. You can do whatever you want here for as long as you want, however you are not usually able to determine when garbage collection occurs.. so a call to System.gc() will attempt to force a garbage collection which will hopefully pick up your main agent class and call your finalize code. Here’s an example:<br /><br />--------------------------------------------------<br /><br />import lotus.domino.*;<br /><br />public class JavaAgent extends AgentBase {<br /><br />public void finalize()<br /><br />{<br /><br /> System.out.println("FinalStart");<br /><br /> int i = 0;<br /><br /> while (i < 5000)<br /><br /> {<br /><br /> try {<br /><br /> Thread.sleep(1000);<br /><br /> } catch (Exception ex)<br /><br /> {<br /><br /> }<br /><br /> System.out.println("Beep " + i);<br /><br /> i++;<br /><br /> }<br /><br /> System.out.println("5000 seconds later.");<br /><br /> super.finalize();<br /><br /> }<br /><br /> <br /><br /> public void NotesMain() {<br /><br /> try {<br /><br /> Session session = getSession();<br /><br /> AgentContext agentContext = session.getAgentContext();<br /><br /> System.out.println("Not much to do here.");<br /><br /> System.gc();<br /><br /> <br /><br /> } catch(Exception e) {<br /><br /> e.printStackTrace();<br /><br /> }<br /><br /> }<br /><br />}]]></content:encoded>
<link>http://www.rprwyatt.com/sablog.nsf/dx/taking-on-call-comers.htm?opendocument&amp;comments#08012008083315AMRGIL9Q.htm</link>
</item>
<item>
<title>Ah, but what is the answer if...</title>
<pubDate>Tue, 29 Jul 2008 12:48:51 PM -0700</pubDate>
<dc:creator>Richard Schwartz</dc:creator>
<dc:subject>Taking on all comers</dc:subject>
<description><![CDATA[And what if the agent is written in Java?]]></description>
<content:encoded><![CDATA[And what if the agent is written in Java?]]></content:encoded>
<link>http://www.rprwyatt.com/sablog.nsf/dx/taking-on-call-comers.htm?opendocument&amp;comments#07292008124851PMAZPR94.htm</link>
</item>
<item>
<title>RE: I claim the &#163;5, your secret agent man is Top Gear&#8217;s Richard Hammond</title>
<pubDate>Fri, 25 Jul 2008 10:01:29 AM -0700</pubDate>
<dc:creator>Secret Agent Man</dc:creator>
<dc:subject>Taking on all comers</dc:subject>
<description><![CDATA[Dear Adam, <br /><br />First of all, let me congratulate you on being the first person who posted an excellent nontrivial question to our blog! After some deliberation, I would like to propose the following solution to the issue at hand: when an agent times out, the one thing that will always get executed immediately after is the Terminate subroutine in the agent code. Having said that, placing your time-out handling code into the Terminate subroutine would guarantee its execution, and if you make it a special case for your New Year's exception, your agent will thus execute to completion even if it exceeds the time limit. Does this answer work for you? <br /><br />Sincerely, <br /><br />- Secret Agent Man]]></description>
<content:encoded><![CDATA[Dear Adam, <br /><br />First of all, let me congratulate you on being the first person who posted an excellent nontrivial question to our blog! After some deliberation, I would like to propose the following solution to the issue at hand: when an agent times out, the one thing that will always get executed immediately after is the Terminate subroutine in the agent code. Having said that, placing your time-out handling code into the Terminate subroutine would guarantee its execution, and if you make it a special case for your New Year's exception, your agent will thus execute to completion even if it exceeds the time limit. Does this answer work for you? <br /><br />Sincerely, <br /><br />- Secret Agent Man]]></content:encoded>
<link>http://www.rprwyatt.com/sablog.nsf/dx/taking-on-call-comers.htm?opendocument&amp;comments#07252008100129AMNSHMX2.htm</link>
</item>
<item>
<title>I claim the &#163;5, your secret agent man is Top Gear&#8217;s Richard Hammond</title>
<pubDate>Wed, 23 Jul 2008 02:00:07 AM -0700</pubDate>
<dc:creator>Adam Foster</dc:creator>
<dc:subject>Taking on all comers</dc:subject>
<description><![CDATA[If his mouth was open I would be 100% sure as the whiteness of the teeth would shine through.<br /><br />Here is an agent question for you, which I know the answer of but I am asking to test you and get a t shirt.<br /><br />I have one scheduled agent that runs every day, but on new year's day (a bank holiday so I am not in) it exceeds the 30 minute agent time limit.<br /><br />How did I write the agent to avoid it timing out?<br /><br />-Adam Foster]]></description>
<content:encoded><![CDATA[If his mouth was open I would be 100% sure as the whiteness of the teeth would shine through.<br /><br />Here is an agent question for you, which I know the answer of but I am asking to test you and get a t shirt.<br /><br />I have one scheduled agent that runs every day, but on new year's day (a bank holiday so I am not in) it exceeds the 30 minute agent time limit.<br /><br />How did I write the agent to avoid it timing out?<br /><br />-Adam Foster]]></content:encoded>
<link>http://www.rprwyatt.com/sablog.nsf/dx/taking-on-call-comers.htm?opendocument&amp;comments#07232008020007AMAZPCKM.htm</link>
</item>

</channel></rss>
