From 4130eb24e9e844bcfa9a336a7fef7698ad0e5c9f Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Thu, 17 Nov 2016 12:12:35 -0500 Subject: [PATCH] Reduce spew data dumped Signed-off-by: Brian Goff --- daemon/debugtrap.go | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/daemon/debugtrap.go b/daemon/debugtrap.go index 0a7c5b594a..209048b589 100644 --- a/daemon/debugtrap.go +++ b/daemon/debugtrap.go @@ -27,7 +27,36 @@ func (d *Daemon) dumpDaemon(dir string) (string, error) { return "", errors.Wrap(err, "failed to open file to write the daemon datastructure dump") } defer f.Close() - spew.Fdump(f, d) // Does not return an error + + dump := struct { + containers interface{} + names interface{} + links interface{} + execs interface{} + volumes interface{} + images interface{} + layers interface{} + imageReferences interface{} + downloads interface{} + uploads interface{} + registry interface{} + plugins interface{} + }{ + containers: d.containers, + execs: d.execCommands, + volumes: d.volumes, + images: d.imageStore, + layers: d.layerStore, + imageReferences: d.referenceStore, + downloads: d.downloadManager, + uploads: d.uploadManager, + registry: d.RegistryService, + plugins: d.PluginStore, + names: d.nameIndex, + links: d.linkIndex, + } + + spew.Fdump(f, dump) // Does not return an error f.Sync() return path, nil }