Package: disk-treemap
disk_treemapJust another disk usage analyzer with treemap GUI.ProsWritten in Python. Easy to run, modify and extend. Cross platform support. (Tested on Linux, Windows, and Android with
Termux.)B/S structure. You can run the scanner on a remote machine, and view treemap via a browser on a local machineSupport save/load a treemap. You can run the scanner on a machine, then copy result to another one and view it.Support S3 and S3 compatible object storage serviceSupport usingEverything by voidtoolsto speedup scanning extraordinarily.ConsThe web base frontend may suffer from performance issue if the treemap is too large.InstallationInstall via pip package installerpipinstalldisk_treemapBuild and install from sourcedependencies:npm:npmmust be inPATHto build static. Make sure NodeJS and npm is installed and inPATH.# clone the repositorygitclonegitsubmoduleupdate--recursive# build staticpython3setup.pybuild_static#build wheelpython3setup.pybdist_wheel#install built wheelpipinstalldist/disk_treemap-1.0.0-py3-none-any.whl# change the filenameUsageusage: disk-treemap [-h] [--size-tree-path SIZE_TREE_PATH] [--overwrite]
                    [--scan-only] [--host HOST] [--port PORT] [--compression]
                    [--endpoint-url ENDPOINT_URL] [--follow-links]
                    [--follow-mounts] [--everything]
                    [paths ...]

positional arguments:
  paths                 path(s) to scan. If multiple paths is provided, they
                        will be show in root side by side. S3 or compatible
                        object storage service is supported by a "s3://"
                        prefixed URI

optional arguments:
  -h, --help            show this help message and exit
  --size-tree-path SIZE_TREE_PATH, --size_tree_path SIZE_TREE_PATH, -f SIZE_TREE_PATH
                        path to save scan result as a JSON file
  --overwrite, -o       overwrite existed JSON file. default to False
  --scan-only, --scan_only, -s
                        scan and save JSON file but do not start web server.
                        default to False
  --host HOST, -H HOST  listening host of the web server
  --port PORT, -p PORT  listening port of the web server. default to 8000
  --compression, -c     enable compression of web server. require
                        flask_compress to operate. default to False
  --endpoint-url ENDPOINT_URL
                        custom endpoint url, only affects S3
  --follow-links, --follow_links
                        follow symlinks
  --follow-mounts, --follow_mounts
                        follow mounts
  --everything          use Everything by voidtools to speedup scanning. The
                        result will be absolute path. Everything must be
                        running and only x64 version is supported.You may also use the module directly:python -m disk_treemap.main. Same arguments apply.Asize_tree.jsonwill be generated in the current directory. It contains file tree and file size information. Keep it
safe!Typical UsageAnalyze an ordinary computerRundisk-treemap <Paths to analyze>Afterlistening 127.0.0.1:8000appearing, open browser and navigate tohttp://127.0.0.1:8000.Analyze a Windows computer with Everything x64 installedMake sure Everything x64 is running. Get it fromhttps://www.voidtools.com/if it's not installed. It's free.Rundisk-treemap --everything <Paths to analyze>Afterlistening 127.0.0.1:8000appearing, open browser and navigate tohttp://127.0.0.1:8000.Analyze a remote Linux server, view on the local machineRundisk-treemap <Paths to analyze> --host 0.0.0.0.If bandwidth between the server and the local machine is limited, try to install optional dependencies and append--compressionto command above to enable compression.Afterlistening 0.0.0.0:8000appearing, open browser on the local machine and navigate to http:
//:8000 .Analyze a remote Linux server without external accessible IP, view on the local machineRundisk-treemap <Paths to analyze> --scan_onlyAfter process exit without error. There should be a file namedsize_tree.jsonin the current directory. Copy the
file to local machine usingrsyncor other tools.Rundisk-treemapin the directory where the copied file located.Afterlistening 127.0.0.1:8000appearing, open browser and navigate tohttp://127.0.0.1:8000.Install and analyze an Android phone with TermuxInstall Termuxhttps://termux.com/Install Python and pip in Termuxhttps://wiki.termux.com/wiki/PythonInstall disk_treemap via pip:pip install disk_treemapJust do analyze as your phone is an ordinary computer.TODOProvide more visualization. Icicle/flame, sunburst maybe.Use NTFS USN Journal to speed up scanning on Windows.