Allow optionally configuring git-annex with -fEKG to enable awesome remote monitoring interfaceat http://localhost:4242/
This commit is contained in:
parent
77e3f36b92
commit
691850ca39
7 changed files with 48 additions and 2 deletions
|
@ -59,5 +59,8 @@ buildFlags = filter (not . null)
|
|||
#endif
|
||||
#ifdef WITH_CRYPTOHASH
|
||||
, "CryptoHash"
|
||||
#endif
|
||||
#ifdef WITH_EKG
|
||||
, "EKG"
|
||||
#endif
|
||||
]
|
||||
|
|
11
GitAnnex.hs
11
GitAnnex.hs
|
@ -5,7 +5,7 @@
|
|||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE CPP, OverloadedStrings #-}
|
||||
|
||||
module GitAnnex where
|
||||
|
||||
|
@ -87,6 +87,9 @@ import qualified Command.XMPPGit
|
|||
import qualified Command.Test
|
||||
import qualified Command.FuzzTest
|
||||
#endif
|
||||
#ifdef WITH_EKG
|
||||
import System.Remote.Monitoring
|
||||
#endif
|
||||
|
||||
cmds :: [Command]
|
||||
cmds = concat
|
||||
|
@ -169,4 +172,8 @@ header :: String
|
|||
header = "git-annex command [option ...]"
|
||||
|
||||
run :: [String] -> IO ()
|
||||
run args = dispatch True args cmds options [] header Git.CurrentRepo.get
|
||||
run args = do
|
||||
#ifdef WITH_EKG
|
||||
_ <- forkServer "localhost" 4242
|
||||
#endif
|
||||
dispatch True args cmds options [] header Git.CurrentRepo.get
|
||||
|
|
7
debian/changelog
vendored
7
debian/changelog
vendored
|
@ -1,3 +1,10 @@
|
|||
git-annex (4.20131107) UNRELEASED; urgency=low
|
||||
|
||||
* Allow optionally configuring git-annex with -fEKG to enable awesome
|
||||
remote monitoring interfaceat http://localhost:4242/
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Wed, 06 Nov 2013 16:14:14 -0400
|
||||
|
||||
git-annex (4.20131106) unstable; urgency=low
|
||||
|
||||
* Improve local pairing behavior when two computers both try to start
|
||||
|
|
14
doc/ekg.mdwn
Normal file
14
doc/ekg.mdwn
Normal file
|
@ -0,0 +1,14 @@
|
|||
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.
|
BIN
doc/ekg/ekg.png
Normal file
BIN
doc/ekg/ekg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
|
@ -50,3 +50,9 @@ you want, and use cabal as follows inside its source tree:
|
|||
cabal configure
|
||||
cabal build
|
||||
cabal install --bindir=$HOME/bin
|
||||
|
||||
## EKG
|
||||
|
||||
When building with cabal, you can optionally enable the
|
||||
[[EKG monitoring interface|ekg]]. This is great for debugging resource
|
||||
usage problems.
|
||||
|
|
|
@ -74,6 +74,10 @@ Flag Quvi
|
|||
Flag CryptoHash
|
||||
Description: Enable use of cryptohash for checksumming
|
||||
|
||||
Flag EKG
|
||||
Description: Enable use of EKG to monitor git-annex as it runs (at http://localhost:4242/)
|
||||
Default: False
|
||||
|
||||
Executable git-annex
|
||||
Main-Is: git-annex.hs
|
||||
Build-Depends: MissingH, hslogger, directory, filepath,
|
||||
|
@ -177,6 +181,11 @@ Executable git-annex
|
|||
Build-Depends: aeson
|
||||
CPP-Options: -DWITH_QUVI
|
||||
|
||||
if flag(EKG)
|
||||
Build-Depends: ekg
|
||||
GHC-Options: -with-rtsopts=-T
|
||||
CPP-Options: -DWITH_EKG
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
location: git://git-annex.branchable.com/
|
||||
|
|
Loading…
Reference in a new issue