Giter VIP home page Giter VIP logo

Comments (4)

Sartner avatar Sartner commented on August 15, 2024

it's a bug~
processTree() method load all ProcessInfo to make a tree
the find() method only traversed the top level of the tree
so , when your process is not the top level process you will get null.

the right way to slove this problem is get the whole processInfo array and fillter by the app's pid.

monitor.processTable()
monitor.currentPid()
the 2 methods above is using to do that

from javasysmon.

jezhumble avatar jezhumble commented on August 15, 2024

Hi Sartner

The find() method does not only traverse the top level of the tree. It is
recursive, employing the visitor
patternhttp://en.wikipedia.org/wiki/Visitor_patternto visit every
node in the tree.

Thanks,

Jez.

On 19 February 2014 02:22, Sartner [email protected] wrote:

it's a bug~
processTree() method load all ProcessInfo to make a tree
the find() method only traversed the top level of the tree
so , when your process is not the top level process you will get null.

the right way to slove this problem is get the whole processInfo array and
fillter by the app's pid.

monitor.processTable()
monitor.currentPid()
the 2 methods above is using to do that

Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-35484356
.

Jez Humble
Co-author, Continuous Delivery http://continuousdelivery.com/
http://continuousdelivery.com/
http://jezhumble.net/

from javasysmon.

Sartner avatar Sartner commented on August 15, 2024

Hi jezhumble, i'm glad to see your reply

yeah, I checked the src again, you are right.
but the same question (Can't find process by PID) happend yesterday and the find() method returned null
I use "monitor.processTree().find(monitor.currentPid())" to get the current OsProcess
finally I traversed the processTable and find out my OsProcess.
The problem is not occr often, generally the "monitor.processTree().find(monitor.currentPid())" works well.
If it happend again. I'll check it carefully and feedback to you.

Thanks for your reply and the great javasysmon, it's very useful.

from javasysmon.

kakaAgent avatar kakaAgent commented on August 15, 2024

fvvd

from javasysmon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.