2013-11-06 20:33:45 +00:00
|
|
|
You can `cabal configure -fEKG` to build a git-annex that includes
|
|
|
|
the EKG remote monitoring interface.
|
|
|
|
|
|
|
|
To access the EKG control panel, go to
|
|
|
|
<http://localhost:4242/> while a git-annex command is running.
|
|
|
|
|
|
|
|
This EKG build is mostly useful for debugging resource usage problems.
|
|
|
|
|
|
|
|
[[!img ekg.png caption="git-annex webapp startup, and assistant startup scan"]]
|
|
|
|
|
|
|
|
Note that since only one process can open port 4242 at a time, running
|
|
|
|
more than one git-annex process with EKG support at the same time can
|
|
|
|
result in some "resource busy (Address already in use)" messages -- but
|
|
|
|
git-annex will continue to work.
|
2014-01-05 23:53:41 +00:00
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
## full profiling
|
|
|
|
|
|
|
|
For the really tricky memory leaks, here's how to make a profiling build of
|
|
|
|
git-annex.
|
|
|
|
|
2016-12-08 20:55:40 +00:00
|
|
|
1. `cabal configure --enable-profiling`
|
2014-01-05 23:53:41 +00:00
|
|
|
This will probably fail due to some missing profiling libraries.
|
|
|
|
You have to get the profiling versions of all needed haskell libraries
|
|
|
|
installed somehow.
|
2016-12-08 20:55:40 +00:00
|
|
|
2. `cabal build`
|
2014-01-05 23:53:41 +00:00
|
|
|
3. Run git-annex with the special flags `+RTS -hc -p`
|
|
|
|
4. Reproduce the memory leak problem.
|
|
|
|
5. If the assistant was run, stop it.
|
|
|
|
6. `hp2ps -e8in -c git-annex.hp` to generate a .ps graph of memory usage.
|