Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 180923

Running process not always found

$
0
0

We use a thread to monitor our application. This thread runs every x seconds (x can be configured). Another parameter is the query specified. This query remains the same during thread execution. However, we sometimes experience problems with this thread: it claims it can find no processes matching the query, althought the process is still running fine.

 

This is a simplified version of the code giving the problem:

 

private Sigar sigarImpl = null;
private SigarProxy proxy = null;

 

public MonitorThread()
{
    this.sigarImpl = new Sigar();
    this.proxy = SigarProxyCache.newInstance(this.sigarImpl, 1000);
}

 

private void monitor(String query)
{
    logger.info("performing following query: " + query);
    long[] processIds = ProcessFinder.find(proxy, query);

 

    if (processIds.length == 0)
    {
        errorMessage = "No processes found matching query " + query);
    }
}

 

Any help would be great !


Viewing all articles
Browse latest Browse all 180923

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>