From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,7c659045cfc01824 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-03-31 14:18:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!195.40.4.120.MISMATCH!easynet-quince!easynet.net!teaser.fr!wanadoo.fr!proxad.net!news.tiscali.fr!not-for-mail From: "Jerome" Newsgroups: comp.unix.tru64 Subject: Re: 99% CPU usage Date: Tue, 1 Apr 2003 00:16:07 +0200 Organization: Guest of TISCALI - FRANCE Message-ID: References: <2659581.1048063416@dbforums.com> NNTP-Posting-Host: news3adm.tiscali.fr X-Trace: news.tiscali.fr 1049149050 9291 172.29.129.3 (31 Mar 2003 22:17:30 GMT) X-Complaints-To: abuse@libertysurf.fr NNTP-Posting-Date: Mon, 31 Mar 2003 22:17:30 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-NNTP-Posting-Host: 195.242.78.77 Xref: archiver1.google.com comp.unix.tru64:9775 "murthi" wrote in message news:2659581.1048063416@dbforums.com... > > Hi All, > > The executable consists of approximately 110 screens, is running on > ES40/Tru64 5.1a cluster m/c. [snip] > Occasionally/At times, the CPU usage becomes 99.9% for about some > 15 minutes. [snip] > We have completely analyzed the source code. And found that the code > is perfect. [snip] Hmmm... is there such a thing as perfect code? :-) > How can we find a permanent fix for this problem? [snip] Is the CPU used by your application or by another process ? Is it essentially user or system time ? If all the CPU is used by by your application process, here is what I suggest. Build your app in debug mode (-g). When the problem occurs, attach a debugger (for instance, ladebug yourapp -pid ). Then, interrupt the program with Ctrl-C, look at the call stack (bt), then continue execution (c). Do this several times (Ctrl-C, bt, c). If there is a loop in your process, you will likely pinpoint the call sequence. If necessary, step more finely in the code (n). Hope this helps, -- Jerome