Find sqltext that consuming a high CPU

hello,
I have a linux machine, when i do a top command , i can see a oracle process that consumming a high CPU (PID=12958)
I want to find a sql request that correspond to this PID
I want to know , what is the view that contain the PID column.
PID USER PR NI %CPU
12958 oracle 18 0 90

Hemant K Chitale wrote:
SPID in V$PROCESS correspond to the Unix PID.
Join V$PROCESS back to V$SESSION on V$PROCESS.ADDR = V$SESSION.ADDR
Hemant K ChitaleShouldn't it be PADDR from v$session :)
Join V$PROCESS back to V$SESSION  on V$PROCESS.ADDR = V$SESSION.PADDR

Similar Messages

  • EEM applet that triggers on high CPU utilization

    Hi Folks,
    I am trying to create an eem applet which triggers on high cpu utilization (detected by erm).   The applet should then tftp the output from "show proc cpu sorted" to a tftp server.   
    I am trying to configure this on a 1841 running 124-24.T3 code
    This is my config:
    resource policy
      policy HighGlobalCPU global
       system
        cpu total
         critical rising 5 falling 2 interval 10
        cpu process
         critical rising 5 falling 2 interval 10
    ! I'm not sure whether it is correct to monitor 'cpu total' or 'cpu process'.   The rising thresholds are deliberately low to maker testing easier
    event manager applet ReportHighCPU
    event resource policy "HighGlobalCPU"
    action 1.0 cli command "show process cpu sorted 5sec | redirect tftp://192.168.1.1/highCPU$_resource_time_sent.txt"
    action 2.0 syslog priority debugging msg "high cpu event detected, output tftp sent"
    The problem is that I can't seem to trigger the applet.    I have generated enough traffic to push the cpu utilization to over 30% (according to 'show proc cpu'), but the applet does not appear to trigger (no syslog messages appear, and my syslog server does not receive anything).
    If anyone can tell me what I've done wrong here I would be very grateful!
    Thanks,
    Darragh

    I am just replying off the top of my head but I believe you
    need to also add to your conf the line
    user global HighGlobalCPU

  • Newly promoted Domain Controller consuming constantly high CPU in lsass

    Hi
    We newly promoted a VMware Server........ Windows 2008 R2 to Domain controller  fully patched upto date with Microsoft patches and Symantec Endpoint protection 11
    Can anybody point me to check which component to find it why lsass is consuming more cpu because we recently promoted many DC's of physical servers which are functioning properly....
    Thanks & Regards S.Swaminathan Live & let others live!!!

    Can anybody point me to check which component to find it why lsass is consuming more cpu because we recently promoted many DC's of physical servers which are functioning properly....
    Hope this one helps:
    How to Troubleshoot High LSASS.EXE CPU Utilization on an Active Directory Domain Controllers
    Troubleshooting
    High LSASS CPU Utilization on a Domain Controller (Part 1 of 2)
    Mahdi Tehrani   |  
      |  
    www.mahditehrani.ir
    Please click on Propose As Answer or to mark this post as
    and helpful for other people.
    This posting is provided AS-IS with no warranties, and confers no rights.
    How to query members of 'Local Administrators' group in all computers?

  • ITunes iPodService.exe spawns service thread that consumes 40%plus CPU use

    I have 7.1.1.5 loaded. all was well then I noticed that the program became unresponsive, lost coms with the iPod and developed the above symptom.. I have deleted all iPod temp files, iTunes related files in local data and have deleted and reinstalled iTunes - still the same problem, as soon as ipodsvcs comes up it spawns a service thread that will run forever at 40% usage....
    I can see the iPod in windows so it is not a comms issue with the iPod - just an iTunes issue.There doesn't appear to be a way to get Apple to respond to this issue. They seem to archive all such threads so you cannot update??
    WIn dual core   Windows XP Pro  

    if it was a windows drive letter confusion, i'm afraid that that one is due to the way that Windows assigns drive letters. it hits other devices as well. for possible symptoms for ipods and/or other devices, see:
    Windows confuses iPod with network drive or hard drive and may keep iPod from mounting or songs may seem to disappear
    "iTunes has detected an iPod in recovery mode - Use iTunes to restore"
    New drive or mapped network drive not available in Windows Explorer

  • Query to find adhoc queries taking high cpu on server

    Hi,
    I want to find all the adhoc and other queries consuming high cpu on sql server. sys.dm_exec_cahched_plan will only have cached queries and not the currently running ones.

    Hi Preetha7,
    According to your description, if you want to identify the most expensive SQL Server queries based on the cumulative CPU cost, you can use the DMVs of the sys.dm_exec_sql_text , the sys.dm_exec_query_plan and sys.dm_exec_query_stats. For example, you can
    refer to the following T-SQL statement.
    SELECT TOP 20
    qs.sql_handle,
    qs.execution_count,
    qs.total_worker_time AS Total_CPU,
    total_CPU_inSeconds = --Converted from microseconds
    qs.total_worker_time/1000000,
    average_CPU_inSeconds = --Converted from microseconds
    (qs.total_worker_time/1000000) / qs.execution_count,
    qs.total_elapsed_time,
    total_elapsed_time_inSeconds = --Converted from microseconds
    qs.total_elapsed_time/1000000,
    st.text,
    qp.query_plan
    FROM
    sys.dm_exec_query_stats AS qs
    CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS st
    CROSS apply sys.dm_exec_query_plan (qs.plan_handle) AS qp
    ORDER BY qs.total_worker_time DESC
    Or you can run the "Performance - Top Queries By Total CPU Time" report in SSMS. In addition, you can use SQL Server Extended Events session for troubleshooting the high consumed of CPU time. For more information about finding currently session that is costing
    high CPU.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/cb3e29ca-f1ef-4440-8f1a-db4924a43c5c/find-currently-session-that-is-costing-high-cpu?forum=sqldatabaseengine
    http://blogs.msdn.com/b/batala/archive/2011/07/23/troubleshoot-high-cpu-issue-without-using-profile-traces.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Process svchost consuming high cpu 99 %

    Hi,
    We have installed iis 6 in windows server 2003 and the process 832 svchost consuming the high cpu and causing the slow response of the applications, hence please advise the possible work around for the same 
    please find below the dump analysis 
    All Operations
    Tip:
    To search on any particular function in the list below, highlight it with the mouse then press CTRL+C, CTRL+F, CTRL+V. This will highlight all the call stacks which contain the particular function and allow you to jump between them in
    the browser.
    Top 40 functions in all operations (excludes boiler-plate functions)
    ntdll!NtReplyWaitReceivePortEx
    svchost!ServiceStarter
    advapi32!ScSvcctrlThreadA
    ntdll!ZwRemoveIoCompletion
    ntdll!ZwDelayExecution
    rpcrt4!Invoke
    rpcrt4!DispatchToStubInCNoAvrf
    rpcrt4!RPC_INTERFACE::DispatchToStubWorker
    rpcrt4!RPC_INTERFACE::DispatchToStub
    rpcrt4!LRPC_SCALL::DealWithRequestMessage
    rpcrt4!LRPC_ADDRESS::DealWithLRPCRequest
    ntdll!RtlpWaitThread
    authz!AuthzpDeQueueThreadWorker
    rpcrt4!COMMON_ProcessCalls
    rpcrt4!LOADABLE_TRANSPORT::ProcessIOEvents
    rpcrt4!ProcessIOEventsWrapper
    browser!BrWorkerThread
    vssapi!CVssWriterImpl::RequestWriterInfo
    ole32!ThreadInvoke
    rpcrt4!RPC_INTERFACE::DispatchToStubWithObject
    ncobjapi!CNamedPipeClient::ProviderReadyThreadProc
    msvcrt!_endthreadex
    aelupsvc!AelTppWorkerThreadRoutine
    ntdll!NtReadFile
    kernel32!ReadFile
    advapi32!ScGetPipeInput
    advapi32!ScDispatcherLoop
    advapi32!StartServiceCtrlDispatcherW
    svchost!_wmainCRTStartup
    kernel32!BaseProcessStart
    ntdll!RtlpTimerThread
    wzcsvc!ServiceStart
    shsvcs!CGenericServiceManager::_ServiceMain
    schedsvc!CSchedWorker::MainServiceLoop
    schedsvc!SchedMain
    schedsvc!SchedStart
    schedsvc!SchedServiceMain
    schedsvc!WindowMsgFcn
    schedsvc!PfSvcMainThread
    schedsvc!PfSvProcessTraceThread
    13 hits
    8 hits
    8 hits
    7 hits
    3 hits
    3 hits
    3 hits
    3 hits
    3 hits
    3 hits
    3 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits

    Hi,
    We have installed iis 6 in windows server 2003 and the process 832 svchost consuming the high cpu and causing the slow response of the applications, hence please advise the possible work around for the same 
    please find below the dump analysis 
    All Operations
    Tip:
    To search on any particular function in the list below, highlight it with the mouse then press CTRL+C, CTRL+F, CTRL+V. This will highlight all the call stacks which contain the particular function and allow you to jump between them in
    the browser.
    Top 40 functions in all operations (excludes boiler-plate functions)
    ntdll!NtReplyWaitReceivePortEx
    svchost!ServiceStarter
    advapi32!ScSvcctrlThreadA
    ntdll!ZwRemoveIoCompletion
    ntdll!ZwDelayExecution
    rpcrt4!Invoke
    rpcrt4!DispatchToStubInCNoAvrf
    rpcrt4!RPC_INTERFACE::DispatchToStubWorker
    rpcrt4!RPC_INTERFACE::DispatchToStub
    rpcrt4!LRPC_SCALL::DealWithRequestMessage
    rpcrt4!LRPC_ADDRESS::DealWithLRPCRequest
    ntdll!RtlpWaitThread
    authz!AuthzpDeQueueThreadWorker
    rpcrt4!COMMON_ProcessCalls
    rpcrt4!LOADABLE_TRANSPORT::ProcessIOEvents
    rpcrt4!ProcessIOEventsWrapper
    browser!BrWorkerThread
    vssapi!CVssWriterImpl::RequestWriterInfo
    ole32!ThreadInvoke
    rpcrt4!RPC_INTERFACE::DispatchToStubWithObject
    ncobjapi!CNamedPipeClient::ProviderReadyThreadProc
    msvcrt!_endthreadex
    aelupsvc!AelTppWorkerThreadRoutine
    ntdll!NtReadFile
    kernel32!ReadFile
    advapi32!ScGetPipeInput
    advapi32!ScDispatcherLoop
    advapi32!StartServiceCtrlDispatcherW
    svchost!_wmainCRTStartup
    kernel32!BaseProcessStart
    ntdll!RtlpTimerThread
    wzcsvc!ServiceStart
    shsvcs!CGenericServiceManager::_ServiceMain
    schedsvc!CSchedWorker::MainServiceLoop
    schedsvc!SchedMain
    schedsvc!SchedStart
    schedsvc!SchedServiceMain
    schedsvc!WindowMsgFcn
    schedsvc!PfSvcMainThread
    schedsvc!PfSvProcessTraceThread
    13 hits
    8 hits
    8 hits
    7 hits
    3 hits
    3 hits
    3 hits
    3 hits
    3 hits
    3 hits
    3 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    2 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits
    1 hits

  • Help!!! High CPU usage on Connect 8 servers.

    Hello everyone,
    Recently, we upgraded our Connect servers from 8.1.1 to 8.2.2.3. Since that time almost every evening as the number of concurrent users and meetings increases so does the CPU usage on Connect servers. After all CPUs are maxed out, people are started to be disconnected from meetings in droves. Sometimes, all users in a meeting are disconnected, other times half of the users stays in while another is disconnected.
    I can see that during the high CPU usage one of FMSCore processes consumes almost 80%-90% of CPU resources.
    I was wondering if somebody else had the same issue and how you solved it.
    Any help is appreciated,
    Milena

    Hi MilenaITS,
    It will be great if you could provide some additional informaion and that will help me in finding the cause here.
    can you confirm the value for one of the tag in application.xml here are the steps you need to follow in order to check that :
    1. got to connect installation folder (on cps servers where appserv/comserv presents)
    2, Open comserv\win32\conf\originhost\_defaultVHost_\Application.xml
    3. can you check what is the value for following tag in that xml : <SS_DYNAMIC_CODEC>
    Also it might worth atry to change the value for this tag to "false" if it is "true" currently. This will remove the disconnects you are getting and may affect on FMS CPU as well . also you need to follow this on each node .
    Can you give it a try and let me know if it solves the purpose for you.
    Hope this will help!!
    regards
    Nikhil

  • High CPU Usage with Flash Player 11

    I am not sure what the problem is but ever since I had those issues I went back to flash archive and installed a previous version that did not come with the flash plug in and I never had any problem with it since I am currently using the Adobe flash version 10 plug in with an adobe flash player active X. and I find out it was the new flash plug in that is the issue it suck all your ram. If you get some people who is having the same issues where flash player is duplicating and eating all their ram then ask them to try the version 10 plug in with the flash 11 active x it will work fine. I tried to run the version 10 flash as a complete set but some dynamic site that plays videos require a later version of flash active x to work and will be asking for an update however by keeping the flash 10 plug in there won't be any other issues. Adobe need to find out what is wrong with the new flash plug in and run a comparison with the flash 10 plug in. I hope this will help some user to get over the issues that made my online experience a nightmare for a while too.

    The best way to get a resolution is to address your individual issue.  Your complaint is that RAM usage is high, which is unrelated to the thread from the guy on Mac that was seeing High CPU usage on high definition video.
    In order to fix the issue that you're describing, we need to be able to reproduce it.  Please provide the information below, and the results of the basic troubleshooting steps as you work through them.  This will help us narrow down the root-cause, and allow us to find comparable hardware in our compatibility lab to reproduce the issue with.
    Basic Troubleshooting Info
    To help troubleshoot we'll need the following system information:
    - Operating system
    - Browser
    - Flash Player version - http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html
    - Antivirus/Anti-Malware software and versions
    The first step is to work through the video troubleshooting guide for your operating system, here:
    - Windows - http://helpx.adobe.com/flash-player/kb/video-playback-issues.html
    - Mac - http://helpx.adobe.com/flash-player/kb/video-playback-issues.htm
    When reporting issues with video or audio, it's also helpful to get your system hardware and driver details.  Instructions for finding this information can be found here:
    - Windows - http://helpx.adobe.com/flash-player/kb/video-playback-issues.html#main_For_Windows_users
    - Mac - http://helpx.adobe.com/flash-player/kb/video-playback-issues.html#main_For_Mac_OS_users
    Finally, sometimes video and audio problems are caused at a lower level and not directly related to Flash Player.  I recommend trying both of the links below to see how they perform.  If the problem exists with both, then Flash Player is most likely not the culprit as the HTML5 video link does not use Flash Player when playing.  You can verify this by right clicking the HTML5 video and looking for the words "About HTML5" at the bottom of the menu.
    - HTML5 video - http://www.youtube.com/watch?v=cTl3U6aSd2w&html5=True
    - Non-HTML5 video - http://www.youtube.com/watch?v=cTl3U6aSd2we
    Thanks!

  • High CPU usage on 2811 router

    dear support
    i have a problem recently, i have a 2811 router, there are several EIGRP VPN tunnel setup on it, recently i found this router running high CPU utilization, it almost reach 80 percent at the most day busy time, when i try to find what process causing that after " show proc cpu", the summarize number not such high, it estimate not more than 20 percent. i know in old Cisco IOS there is a command "show platform health", but seem this not exist in 2800 serials any more.
    so my question is what can i do next step to finding out what is causing high CPU usage, so that i can decide if the router need to be upgraded.
    thanks very much

    dear support
    i have a problem recently, i have a 2811 router, there are several EIGRP VPN tunnel setup on it, recently i found this router running high CPU utilization, it almost reach 80 percent at the most day busy time, when i try to find what process causing that after " show proc cpu", the summarize number not such high, it estimate not more than 20 percent. i know in old Cisco IOS there is a command "show platform health", but seem this not exist in 2800 serials any more.
    so my question is what can i do next step to finding out what is causing high CPU usage, so that i can decide if the router need to be upgraded.
    thanks very much

  • Very high cpu utilization with mq broker

    Hi all,
    I see a very high cpu utilization (400% on 8 cpu server) when I connect consumers to OpenQ. It increase close to 100% for every consumer I add. Slowly, the consumer comes to a halt, as the producers are sending messages at a good rate too.
    Environment Setup
    Glassfish version 2.1
    com.sun.messaging.jmq Version Information Product Compatibility Version: 4.3 Protocol Version: 4.3 Target JMS API Version: 1.1
    Cluster set up using persistent storage. snippet from broker log.
    Java Runtime: 1.6.0_14 Sun Microsystems Inc. /home/user/foundation/jdk-1.6/jre [06/Apr/2011:12:48:44 EDT] IMQ_HOME=/home/user/foundation/sges/imq [06/Apr/2011:12:48:44 EDT] IMQ_VARHOME=/home/user/foundation/installation/node-agent-server1/server1/imq [06/Apr/2011:12:48:44 EDT] Linux 2.6.18-164.10.1.el5xen i386 server1 (8 cpu) user [06/Apr/2011:12:48:44 EDT] Java Heap Size: max=394432k, current=193920k [06/Apr/2011:12:48:44 EDT] Arguments: -javahome /home/user/foundation/jdk-1.6 -Dimq.autocreate.queue=false -Dimq.autocreate.topic=false -Dimq.cluster.masterbroker=mq://server1:37676/ -Dimq.cluster.brokerlist=mq://server1:37676/,mq://server2:37676/ -Dimq.cluster.nowaitForMasterBroker=true -varhome /home/user/foundation/installation/node-agent-server1/server1/imq -startRmiRegistry -rmiRegistryPort 37776 -Dimq.imqcmd.user=admin -passfile /tmp/asmq5711749746025968663.tmp -save -name clusterservercom -port 37676 -bgnd -silent [06/Apr/2011:12:48:44 EDT] [B1004]: Starting the portmapper service using tcp [ 37676, 50, * ] with min threads 1 and max threads of 1 [06/Apr/2011:12:48:45 EDT] [B1060]: Loading persistent data...
    I followed step in http://middlewaremagic.com/weblogic/?p=4884 to narrow it down to Threads that was causing high cpu. Both were around 94%.
    Following is the stack for those threads.
    "Thread-jms[224]" prio=10 tid=0xd635f400 nid=0x5665 runnable [0xd18fe000] java.lang.Thread.State: RUNNABLE at com.sun.messaging.jmq.jmsserver.data.TransactionList.isConsumedInTransaction(TransactionList.java:697) at com.sun.messaging.jmq.jmsserver.core.Session.detatchConsumer(Session.java:918) - locked <0xf3d35730> (a java.util.Collections$SynchronizedMap) at com.sun.messaging.jmq.jmsserver.core.Session.detatchConsumer(Session.java:810) at com.sun.messaging.jmq.jmsserver.data.handlers.ConsumerHandler.destroyConsumer(ConsumerHandler.java:577) at com.sun.messaging.jmq.jmsserver.data.handlers.ConsumerHandler.handle(ConsumerHandler.java:422) at com.sun.messaging.jmq.jmsserver.data.PacketRouter.handleMessage(PacketRouter.java:181) at com.sun.messaging.jmq.jmsserver.service.imq.IMQIPConnection.readData(IMQIPConnection.java:1489) at com.sun.messaging.jmq.jmsserver.service.imq.IMQIPConnection.process(IMQIPConnection.java:644) at com.sun.messaging.jmq.jmsserver.service.imq.OperationRunnable.process(OperationRunnable.java:170) at com.sun.messaging.jmq.jmsserver.util.pool.BasicRunnable.run(BasicRunnable.java:493) at java.lang.Thread.run(Thread.java:619) Locked ownable synchronizers: - None
    "Thread-jms[214]" prio=10 tid=0xd56c8000 nid=0x566c waiting for monitor entry [0xd2838000] java.lang.Thread.State: BLOCKED (on object monitor) at com.sun.messaging.jmq.jmsserver.data.TransactionInformation.isConsumedMessage(TransactionList.java:2544) - locked <0xdbeeb538> (a com.sun.messaging.jmq.jmsserver.data.TransactionInformation) at com.sun.messaging.jmq.jmsserver.data.TransactionList.isConsumedInTransaction(TransactionList.java:697) at com.sun.messaging.jmq.jmsserver.core.Session.detatchConsumer(Session.java:918) - locked <0xe4c9abf0> (a java.util.Collections$SynchronizedMap) at com.sun.messaging.jmq.jmsserver.core.Session.detatchConsumer(Session.java:810) at com.sun.messaging.jmq.jmsserver.data.handlers.ConsumerHandler.destroyConsumer(ConsumerHandler.java:577) at com.sun.messaging.jmq.jmsserver.data.handlers.ConsumerHandler.handle(ConsumerHandler.java:422) at com.sun.messaging.jmq.jmsserver.data.PacketRouter.handleMessage(PacketRouter.java:181) at com.sun.messaging.jmq.jmsserver.service.imq.IMQIPConnection.readData(IMQIPConnection.java:1489) at com.sun.messaging.jmq.jmsserver.service.imq.IMQIPConnection.process(IMQIPConnection.java:644) at com.sun.messaging.jmq.jmsserver.service.imq.OperationRunnable.process(OperationRunnable.java:170) at com.sun.messaging.jmq.jmsserver.util.pool.BasicRunnable.run(BasicRunnable.java:493) at java.lang.Thread.run(Thread.java:619) Locked ownable synchronizers: - None
    "Thread-jms[213]" prio=10 tid=0xd65be800 nid=0x5670 runnable [0xd1a28000] java.lang.Thread.State: RUNNABLE at com.sun.messaging.jmq.jmsserver.data.TransactionList.isConsumedInTransaction(TransactionList.java:697) at com.sun.messaging.jmq.jmsserver.core.Session.detatchConsumer(Session.java:918) - locked <0xe4c4bad8> (a java.util.Collections$SynchronizedMap) at com.sun.messaging.jmq.jmsserver.core.Session.detatchConsumer(Session.java:810) at com.sun.messaging.jmq.jmsserver.data.handlers.ConsumerHandler.destroyConsumer(ConsumerHandler.java:577) at com.sun.messaging.jmq.jmsserver.data.handlers.ConsumerHandler.handle(ConsumerHandler.java:422) at com.sun.messaging.jmq.jmsserver.data.PacketRouter.handleMessage(PacketRouter.java:181) at com.sun.messaging.jmq.jmsserver.service.imq.IMQIPConnection.readData(IMQIPConnection.java:1489) at com.sun.messaging.jmq.jmsserver.service.imq.IMQIPConnection.process(IMQIPConnection.java:644) at com.sun.messaging.jmq.jmsserver.service.imq.OperationRunnable.process(OperationRunnable.java:170) at com.sun.messaging.jmq.jmsserver.util.pool.BasicRunnable.run(BasicRunnable.java:493) at java.lang.Thread.run(Thread.java:619) Locked ownable synchronizers: - None
    Any ideas will be appreciated.
    --

    Thanks ak, for the response.
    Yes, the messages are consumed in transactions. I set imq.txn.reapLimit=200 in Start Arguments in jvm configuration.
    I verified that it is being set in the log.txt file for the broker:
    -Dimq.autocreate.queue=false -Dimq.autocreate.topic=false -Dimq.txn.reapLimit=250
    It did not make any difference. Do I need to set this property somewhere else ?
    As far as upgrading MQ is concerned, I am using glassfish 2.1. And I think MQ 4.3 is packaged with it. Can you suggest a safe way to upgrade to OpenMQ 4.5 in a running environment. I can bring down the cluster temporarily. Can I just change the jar file somwhere to use MQ4.5 ?
    Here is the snippet of the consumer code :
    I create Connection in @postConstruct and close it in @preDestroy, so that I don't have to do it everytime.
    private ResultMessage[] doRetrieve(String username, String password, String jndiDestination, String filter, int maxMessages, long timeout, RetrieveType type)
    throws InvalidCredentialsException, InvalidFilterException, ConsumerException {
    // Resources
    Session session = null;
    try {
    if (log.isTraceEnabled()) log.trace("Creating transacted session with JMS broker.");
    session = connection.createSession(true, Session.SESSION_TRANSACTED);
    // Locate bound destination and create consumer
    if (log.isTraceEnabled()) log.trace("Searching for named destination: " + jndiDestination);
    Destination destination = (Destination) ic.lookup(jndiDestination);
    if (log.isTraceEnabled()) log.trace("Creating consumer for named destination " + jndiDestination);
    MessageConsumer consumer = (filter == null || filter.trim().length() == 0) ? session.createConsumer(destination) : session.createConsumer(destination, filter);
    if (log.isTraceEnabled()) log.trace("Starting JMS connection.");
    connection.start();
    // Consume messages
    if (log.isDebugEnabled()) log.trace("Creating retrieval containers.");
    List<ResultMessage> processedMessages = new ArrayList<ResultMessage>(maxMessages);
    BytesMessage jmsMessage = null;
    for (int i = 0 ; i < maxMessages ; i++) {
    // Attempt message retrieve
    if (log.isTraceEnabled()) log.trace("Attempting retrieval: " + i);
    switch (type) {
    case BLOCKING :
    jmsMessage = (BytesMessage) consumer.receive();
    break;
    case IMMEDIATE :
    jmsMessage = (BytesMessage) consumer.receiveNoWait();
    break;
    case TIMED :
    jmsMessage = (BytesMessage) consumer.receive(timeout);
    break;
    // Process retrieved message
    if (jmsMessage != null) {
    if (log.isTraceEnabled()) log.trace("Message retrieved\n" + jmsMessage);
    // Extract message
    if (log.isTraceEnabled()) log.trace("Extracting result message container from JMS message.");
    byte[] extracted = new byte[(int) jmsMessage.getBodyLength()];
    jmsMessage.readBytes(extracted);
    // Decompress message
    if (jmsMessage.propertyExists(COMPRESSED_HEADER) && jmsMessage.getBooleanProperty(COMPRESSED_HEADER)) {
    if (log.isTraceEnabled()) log.trace("Decompressing message.");
    extracted = decompress(extracted);
    // Done processing message
    if (log.isTraceEnabled()) log.trace("Message added to retrieval container.");
    String signature = jmsMessage.getStringProperty(DIGITAL_SIGNATURE);
    processedMessages.add(new ResultMessage(extracted, signature));
    } else
    if (log.isTraceEnabled()) log.trace("No message was available.");
    // Package return container
    if (log.isTraceEnabled()) log.trace("Packing retrieved messages to return.");
    ResultMessage[] collectorMessages = new ResultMessage[processedMessages.size()];
    for (int i = 0 ; i < collectorMessages.length ; i++)
    collectorMessages[i] = processedMessages.get(i);
    if (log.isTraceEnabled()) log.trace("Returning " + collectorMessages.length + " messages.");
    return collectorMessages;
    } catch (NamingException ex) {
    sessionContext.setRollbackOnly();
    log.error("Unable to locate named queue: " + jndiDestination, ex);
    throw new ConsumerException("Unable to locate named queue: " + jndiDestination, ex);
    } catch (InvalidSelectorException ex) {
    sessionContext.setRollbackOnly();
    log.error("Invalid filter: " + filter, ex);
    throw new InvalidFilterException("Invalid filter: " + filter, ex);
    } catch (IOException ex) {
    sessionContext.setRollbackOnly();
    log.error("Message decompression failed.", ex);
    throw new ConsumerException("Message decompression failed.", ex);
    } catch (GeneralSecurityException ex) {
    sessionContext.setRollbackOnly();
    log.error("Message decryption failed.", ex);
    throw new ConsumerException("Message decryption failed.", ex);
    } catch (JMSException ex) {
    sessionContext.setRollbackOnly();
    log.error("Unable to consumer messages.", ex);
    throw new ConsumerException("Unable to consume messages.", ex);
    } catch (Throwable ex) {
    sessionContext.setRollbackOnly();
    log.error("Unexpected error.", ex);
    throw new ConsumerException("Unexpected error.", ex);
    } finally {
    try {
    if (session != null) session.close();
    } catch (JMSException ex) {
    log.error("Unexpected error.", ex);
    Thanks for your help.
    Edited by: vineet on Apr 7, 2011 10:06 AM

  • High CPU on Cisco 4507

    Hi,
    We have Cisco 4507R-E and we see a high CPU even at nights when there is no much more traffic on the switch.
    Here are the some cpu cpmmand outputs.
    sh proc cpu sort
      69    52873350   108228799        488 13.35% 10.93% 10.60%   0 Cat4k Mgmt LoPri
      68    62281851   265686819        234  7.19%  6.88%  7.03%   0 Cat4k Mgmt HiPri
    sh platform health
    K5L3Unicast Adj Tabl   2.00  14.56     15      7  100  500   15  15    8  607:36
    sh platform cpu packet stat
    Event             Total                5 sec avg 1 min avg 5 min avg 1 hour avg
    Sa Miss                        1618486         8         1         0          0
    Input Acl Fwd                        1         0         0         0          0
    Packets Dropped In Processing by Priority
    Priority          Total                5 sec avg 1 min avg 5 min avg 1 hour avg
    Medium                         1618486         8         1         0          0
    High                                 1         0         0         0          0
    Packets Dropped In Processing by Reason
    Reason             Total                5 sec avg 1 min avg 5 min avg 1 hour avg
    STPDrop                            3044         0         0         0          0
    Tx Mode Drop                    1615443         8         1         0          0
    Total packet queues 64
    Packets Received by Packet Queue
    Queue                  Total           5 sec avg 1 min avg 5 min avg 1 hour avg
    Esmp                         169650262        97        92        94         87
    Input ACL fwd(snooping)            3438         0         0         0          0
    Host Learning                  1618477         9         1         0          0
    L2 Control                     8684569         5         3         2          0
    Ttl Expired                      12559         0         0         0          0
    Adj SameIf Fail                     23         0         0         0          0
    Bfd                               1614         0         0         0          0
    L2 router to CPU, 7           29932895        12         7        10         11
    L3 Glean, 7                   65336474        20        20        25         23
    L3 Receive, 7                  3202292         2         3         1          0
    Packets Dropped by Packet Queue
    Queue                  Total           5 sec avg 1 min avg 5 min avg 1 hour avg
    L3 Glean, 7                      84216         0         0         0          0
    I cannot find anything about the process K5L3Unicast Adj Tabl on yhe internet.

    Hi
    The platform-process “K5L3Unicast Adj Tabl”, that causes the high CPU usage is a  platform-process that is active when a new MAC address has been learned and the adjacency table is rewritten. This takes place when in the switch receives an unknown source MAC address, it’s forwarded to the CPU for MAC address learning.
    It could be possible to have a device connected to a switch port sending lots of MAC address randomly and massively forcing the switch to spend all CPU capacity just to process the new MAC addresses.
    So next step is check the interface statistics looking for the highest traffic rate. Use this link below in order to troubleshoot this issue and find the top offender interface.
    http://www.cisco.com/en/US/products/hw/switches/ps663/products_tech_note09186a00804cef15.shtml#trouble
    Hope this helps.

  • Kernel task over 100%. High CPU Load. High Temp. Problem Solved.

    Hi,
         I thought i would make a post as i had been having trouble with my 13 inch mid 2009 MBP for sometime (6 months), with runaway kernel tasks causing high CPU loads. I had searched through forums and discussions for a long time trying to find the problem and isolate it. Initially i discovered some problems with finder preferances that were chewing up CPU which i solved by deleting the prefereance file, allowing the system to recreate a non corrupted version. This helped but still i had problems. I tried maintainance suites like onyx, reseting PRAM, booting into safe mode, hardware checks and diagnostics, and more little tricks than i can remember. Nothing i tried really seemed to make a differance. Through reading on this forum and others i found out the kernel tasks can be a direct result of hi CPU core temps as the system runs a lot of small kernel tasks to try and take some of the CPU load away from processor intensive processes that may be contributing to hi CPU load. The thing which solved my problem in the end was opening up my MBP, being careful not to touch the logic board and literally puting my vacuum cleaner over the fan, sucking dust and dirt and dust out of my latop. This computer has been through the dirt with me, literally its been dragged through rural south east asia for a year and accompianied me to warhouse parties to perform and run lighting and visuals. Its little wonder the fan was obviously clogged. I know people tend to be holier than though with their mac products and treat them with the upmost respect, but my love for the MBP has come from how sturdy and reliable it has been under less than desirable conditions.
    Now im not telling people this is what they should do, i had just noticed alot of people with this problem in my attempts to solve mine, and in the end this is what helped. My MBP now runs at a temperature where i can touch the metal near the CPU without being worried about a 3rd degree burn and the CPU load is acceptable with no run away kernel tasks. Like i saw this might not be the cause of your porblem, as my laptop has lived a rough and fun life so far, but i thought i would share this with you all as i have had contstant help from this forum and others searches for solutions to problems with my apple products.

    Already tried SMC and PRAM-reset with no luck.
    On my MacBook late 2008 it's the same effect.

  • Windows 8; high cpu usage on explorer (~50%)

    I just restore my laptop, and now i noticed that my usage is above 50% and the major usage is because of explorer.exe which showed 49-53% in Task Manager.
    Is that normal? Is there any solution to lower down the usage for explorer?

    Hi,
    For high cpu usage issue, I usually use Process Explorer to troubleshoot, here is a link for you to download:
    Process Explorer v15.40
    http://technet.microsoft.com/en-in/sysinternals/bb896653.aspx
    It's a simple and small tool, once you installed and open it, locate to explorer.exe, you will find all processes related with explorer running in your system, find the culprit of the high cpu usage.
    Process Explorer Mini-guide and Screenshots
    http://www.bleepingcomputer.com/forums/t/354690/process-explorer-mini-guide-and-screenshots/
    NOTE
    This
    response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you.
    Microsoft
    does not control these sites and has not tested any software or information found on these sites.
    Regards
    Yolanda
    TechNet Community Support

  • Desktop Window Manager high CPU utilization

    I have several Windows 2012 servers that are showing high CPU utilization (70% or higher) coming from the Desktop Window Manager.  I do not have the Desktop Experience feature installed on these machines.  The interesting thing is that the process
    for dwm.exe does not show up as a service that I can stop or restart.  I've read through the various posts about re-registering dmw.exe so that the service shows up again, but nothing has worked.  Since these are application and file servers with
    no need for regular desktop use, I don't really need any fancy desktop graphics or performance.  I have the Advanced Performance Options set to 'Background services'.  Can anyone tell me how to stop dwm.exe or at least reduce it's CPU footprint?
    Thanks,
    Joe

    Hi Joe,
    Based on my research, On Windows 8 and Windows Server 2012, DWM is used at all times and cannot be disabled.
    For more detailed information, please refer to this article:
    Desktop Window Manager is always on:
    To troubleshoot the high usage of CPU, I would like to recommend to follow this article to collect and analyse the relevant log files and dump files:
    Troubleshooting High CPU performance issues - Part 1
    If you want to analyse the dump file, I also recommend you can open case and contact Microsoft support.
    I hope this helps.

  • SCCM 2012 Agent and high CPU utilization.

    We have numerous Windows workstations and servers running with very high CPU utilization. Services are slow to start and login can take an hour. The service running with high CPU is svchost.exe, we determined that it is Windows Management Instrumentation
    that is causing high CPU in svchost.exe.
    If we stop or uninstall the SCCM 2012 Agent, everything calms down on the computer.
    Any ideas as to way this would be?

    Same issue seen on a clients and KB2617858 resolves it. I am deploying using the App model no problem with x86 and x64 hotfixes with requisite OS requirements. Is there a way to configure to only apply to those that it applies to...if that makes sense. I
    ask because my B&C x64 W7Sp1 image does not require it (I have not included it) whereas other non-B&C do - what's the condition or applicability (or non-applicability) if not as listed on the KB..! If I run it one W7 machine it says it doesn't apply
    and isn't already, whereas another it installs..!
    http://support.microsoft.com/kb/2705357:
    To apply this hotfix, you must be running one of the following operating systems:
    Windows 7
    Windows 7 Service Pack 1 (SP1)
    Windows Server 2008 R2
    Windows Server 2008 R2 Service Pack 1 (SP1)
    ..obviously, if a client has the issue it applies :)
    Donald Rumsfeld's 'known unknowns' comes to mind here. Sorry.

Maybe you are looking for

  • Cisco DX650 CUCM registration over VPN

    Hi i've installed a CUCM 9.1.2 cluster with Cisco 8945s, Cisco 9971s all running SIP Protocol.    We have introduced the Cisco DX650 into the voice network, and all features are working normal on the Local LAN.   We are now testing the DX650 for a re

  • Select order by

    Hello everyone, I have an issue: I Know the aggregate function ORDER BY and I know we can specify the columns we need to put in order and if they have to be ASCENDING or DESCENDING But I'd like to create a "personal criterium", for example i have the

  • How to print data of selection screen

    hi plz tell me how to print that data in smartforms which the user enters in the selection screen...........

  • Classic Sync Issues following Restore

    I've recently has issues with the 160Gb classic freezing so it's now been restored. It doesn't freeze now (phew!)  but now it only wants to sync the ENTIRE library (which is larger than the 160Gb capacity) or Selected Playlists, Artists, Albums or Ge

  • Can't see Excel Tabs when combining files

    Using acrobat 9 I right click (like I have a thousand times on my old computer) on a file and "combine supported files".  I select 2 excel files and position them in the order that I want them.  But if I click on them to select which tab to use, I ge