java - Monitor file to find which thread is modifying file -
i want find java thread modifying file. if know tool or know how can monitor , thread name please share.
thanks.
i not sure why need information beleive there 2 ways.
first way in java code when create thread , create name. there constructors & method available in thread class same. if have logging in project can log thread name enters code modify file.
second way again dependent on having thread name. can use java profiler find out threads doing @ point in time. although tough if threads modifying file quickly. if trying find problem of slow modification of file thread profiler may give hint.
hope helps!
Comments
Post a Comment