# disk_treemap
Just another disk usage analyzer with treemap GUI.
## Pros
* Written 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 machine
* Support save/load a treemap. You can run the scanner on a machine, then copy result to another one and view it.
* Support S3 or S3 compatible object storage service
## Cons
* The web base frontend may suffer from performance issue if the treemap is too large.
* Scan speed is not ideal, especially on Windows.
# Installation
## Install via pip package installer
```shell
pip install disk_treemap
```
## Build and install from source
```shell
# clone the repository
git clone
git submodules update --recursively
# build static
python3 setup.py build_static
#build wheel
python3 setup.py bdist_wheel
#install built wheel
pip install dist/disk_treemap-1.0.0-py3-none-any.whl # change the filename
```
# Usage
```
usage: 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.
A `size_tree.json` will be generated in the current directory. It contains file tree and file size information. Keep it
safe!
# Typical Usage
**Analyze an ordinary computer**
1. Run `disk-treemap <Paths to analyze>`
1. After `listening 127.0.0.1:8000` appearing, open browser and navigate to http://127.0.0.1:8000 .
**Analyze a Windows computer with Everything x64 installed**
1. Make sure Everything x64 is running.
1. Run `disk-treemap --everything <Paths to analyze>`
1. After `listening 127.0.0.1:8000` appearing, open browser and navigate to http://127.0.0.1:8000 .
**Analyze a remote Linux server, view on the local machine**
1. Run `disk-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 `--compression` to command above to enable compression.
1. After `listening 0.0.0.0:8000` appearing, open browser on the local machine and navigate to http:
//<IP address of the server>:8000 .
**Analyze a remote Linux server without external accessible IP, view on the local machine**
1. Run `disk-treemap <Paths to analyze> --scan_only`
1. After process exit without error. There should be a file named `size_tree.json` in the current directory. Copy the
file to local machine using `rsync` or other tools.
1. Run `disk-treemap` in the directory where the copied file located.
1. After `listening 127.0.0.1:8000` appearing, open browser and navigate to http://127.0.0.1:8000 .
**Install and analyze an Android phone with Termux**
1. Install Termux https://termux.com/
1. Install Python and pip in Termux https://wiki.termux.com/wiki/Python
1. Install disk_treemap via pip: `pip install termux`
1. Just do analyze as your phone is an ordinary computer.
# TODO
* Provide more visualization. Icicle/flame, sunburst maybe.
* Use NTFS USN Journal to speed up scanning on Windows.

挣扎的蓝藻
- 粉丝: 14w+
- 资源: 15万+
最新资源
- 金属熔化凝固及多技术下的UDF代码讲解:最强学习资料,深入探索:金属熔凝最强学习资料汇编-涵盖流动传热传质、激光移动热源技术、熔化凝固现象、宏观偏析现象解析及UDF代码精细讲解,fluent金属熔凝
- 船舶电力系统稳定性分析与仿真的Python实现及优化调度(论文复现,含可运行代码及解释)
- 基于Python的渐开线直齿轮动力学与弹流润滑耦合模型仿真及不确定性和敏感性分析
- 基于FPGA的数字电子琴-数电小系统设计【数字电子技术】(使用Vivado中的verilog语言)实验设计代码文件(全)
- 格子玻尔兹曼方法LBM在Matlab中模拟三维多孔介质流动D3Q19的实践研究,格子玻尔兹曼方法LBM在Matlab中模拟三维多孔介质流动D3Q19的实践研究,使用格子玻尔兹曼方法LBM模拟三维多孔介
- 基于COMSOL的三维离散裂隙恒压注浆模型:粘度空间衰减的宾汉姆流体随机圆盘模型研究,基于宾汉姆流体粘度空间衰减的COMSOL三维离散裂隙恒压注浆模型研究,COMSOL 三维离散裂隙注浆模型 基于粘
- 基于双闭环控制与最近电平逼近调制的MMC模块化多电平换流器仿真研究:含技术文档、Matlab-Simulink实现、直流侧11kV交流侧6.6kV电压电流稳态对称仿真分析,基于双闭环控制与最近电平逼近
- chatbox软件压缩包
- 汇川小型机H5U编程特色:伺服驱动器与IO模块配置,梯形图编程直观易懂,卷绕轴速调整与多配方处理,产能统计及数据交互功能强大 ,汇川小型机H5U编程特色:伺服驱动器与IO模块配置,梯形图编程直观易懂
- 磁悬浮轴承MATLAB建模与仿真分析:理论与实践的完美结合,磁悬浮轴承与磁悬浮仿真模型的MATLAB建模与仿真分析,磁悬浮轴承MATLAB模型&磁悬浮仿真模型 ,磁悬浮轴承; MATLAB模型; 磁悬
- 人工智能之深度学习:神经网络分类与回归任务实战资源(源码+数据集+说明)
- numpy-2.2.0-cp312-cp312-win_amd64.whl
- 微信疯传社群测试可用+修复版+免激活去授权版
- 项目实战:Qt图像拼接渐进色图层生成工具v1.0.0(预设四路拼接,多路可通过多图叠层实现)
- numpy-2.2.0-cp312-cp312-win32.whl
- 智能算法在21个工程应用中的全面实践与效能分析:统计指标导出与收敛图可视化 这个标题符合您的要求,既包含了您提供的文字中的主要信息,又简洁明了,易于理解 ,智能算法在21个工程应用中的全面实践与效能
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


