JupyterLab扩展,用于显示系统信息
项目描述
JupyterLab System Monitor
JupyterLab扩展,用于显示系统信息(内存和CPU使用情况)。
为jupyter-resource-usage
指标提供了一个替代前端:[https://github.com/jupyter-server/jupyter-resource-usage](https://github.com/jupyter-server/jupyter-resource-usage)
此扩展最初作为jupyterlab-topbar项目的一部分开发,后来提取到其自己的存储库中。
待办事项
- 添加网络I/O
- 公开更多设置
先决条件
- JupyterLab 1.0+
- Node.js
安装
此扩展需要jupyter-resource-usage
包和JupyterLab的jupyterlab-topbar-extension
扩展。
注意:此扩展与nbresuse==0.3.4
不兼容.
从JupyterLab 3.0开始,扩展可以作为Python包分发。安装说明将根据您的JupyterLab版本有所不同
JupyterLab 3.x
pip install jupyterlab-system-monitor
JupyterLab 2.x
pip install nbresuse
jupyter labextension install jupyterlab-topbar-extension jupyterlab-system-monitor
nbresuse
也可以使用conda
安装
conda install -c conda-forge nbresuse
注意:安装JupyterLab扩展需要Node.js。它可以使用conda
安装
conda install -c conda-forge nodejs
配置
图形显示
您可以将内存和CPU限制(但不强制执行)设置为在顶部栏显示指示器。
有关更多信息,请查看内存限制,位于nbresuse存储库中。
编辑 ~/.jupyter/jupyter_notebook_config.py
(注意:如果您没有配置文件,请参阅这里)
c = get_config()
# memory
c.NotebookApp.ResourceUseDisplay.mem_limit = <size_in_GB> *1024*1024*1024
# cpu
c.NotebookApp.ResourceUseDisplay.track_cpu_percent = True
c.NotebookApp.ResourceUseDisplay.cpu_limit = <number_of_cpus>
例如
c.NotebookApp.ResourceUseDisplay.mem_limit = 4294967296
c.NotebookApp.ResourceUseDisplay.track_cpu_percent = True
c.NotebookApp.ResourceUseDisplay.cpu_limit = 2
或使用命令行选项
# POSIX shell
jupyter lab --NotebookApp.ResourceUseDisplay.mem_limit=$(( size_in_GB *1024*1024*1024)) \
--NotebookApp.ResourceUseDisplay.track_cpu_percent=True \
--NotebookApp.ResourceUseDisplay.cpu_limit=$(( number_of_cpus ))
高级设置
您可以在JupyterLab的高级设置编辑器中更改标签和刷新率
故障排除
如果您遇到内存和CPU指示器未显示的问题,请确保检查nbresuse 变更日志,了解是否有主要版本发布的破坏性更改。
开发
# create a new conda environment
conda create -n jupyterlab-system-monitor -c conda-forge jupyterlab nodejs nbresuse
conda activate jupyterlab-system-monitor
# Install dependencies
jlpm
# Install the package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jlpm run develop
# Rebuild extension TypeScript source after making changes
jlpm run build
卸载
pip uninstall jupyterlab-system-monitor
项目详情
关闭
哈希值 for jupyterlab_system_monitor-0.8.0-py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 2e26c2df5272237eba326ecd1eedb8203df19087fd1d651212cfd4ffeac3b122 |
|
MD5 | 8a3c8461637e6c8ecd39b0696e65da6a |
|
BLAKE2b-256 | e4cf6b635049df82a79f0b5da5b8e4df3d936bd544a84050ae89582dd50ad445 |