Comments (4)
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.
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 thatReply 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.
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.
fvvd
from javasysmon.
Related Issues (20)
- Access violation in call to processTable() - (Win7 64bit) HOT 6
- Process handle leak when killing a process on Windows
- NPE when try to kill linux process running JDK8 HOT 5
- When SWAP is totally disabled under Windows JavaSysMon returns incorrect SWAP values
- When java is started as a service under Windows, JavaSysMon may not find the current process
- x86 Version HOT 7
- Clean way to exec a new sub process and get its PID to be able to kill it?
- Uncompatible DLL loaded on Windows 64-bit HOT 12
- windows 32bit dll was incorrectly compiled as 64bit HOT 3
- No match found on RHEL 6.6
- http://continuousdelivery.com/downloads/javasysmon/javasysmon-0.3.5.jar is dead HOT 1
- NullPointerException in ProcessInfo.stringFormat HOT 2
- Jar File Download Links is Dead(404)
- object.swap() returns not free memory, but occupied memory HOT 1
- Network and Disk stats
- Add a function to getCurrentOsProcess()
- com.jezhumble.javasysmon.WindowsMonitor.processTable() leads sometimes to access violation under Windows10
- ProcessInfo.getCommand() leads to ??? under Windows 10
- fix links in the readme file
- missing javadocs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javasysmon.