jobview


Namejobview JSON
Version 1.2.3 PyPI version JSON
download
home_pagehttps://github.com/Bio-MingChen/jobview
SummaryTools for better recording and visualizing computer resources of Sun Grid Engine(SGE) System
upload_time2025-01-22 02:40:57
maintainerNone
docs_urlNone
authorchenming
requires_pythonNone
licenseBSD License
keywords
VCS
bugtrack_url
requirements click matplotlib plotly humanfriendly
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## jobview



这个工具主要用于 SGE 系统的节点资源查看,任务资源显示和消耗记录的工具

简单来说,它是基于`qstat`, `qhost`, `qselect`等命令的信息,提供资源消耗的跟踪和更好的可视化



1. `jobview nodes` 可以展示用户所属节点的任务情况,资源使用,是否负载高等

2. `jobview status`以更好的可视化方式展示任务情况,提供资源消耗展示

3. `jobview track` 跟踪任务的资源消耗情况,并记录和生成一个可视化报告



### Installation



```shell

pip install jobview

```



### Usage



主要有三个子命令,如下所示:



```python

Usage: jobview [OPTIONS] COMMAND [ARGS]...



  用于SGE系统的节点资源查看,任务资源显示和消耗记录的工具

  Tools for better recording and visualizing computer resources of Sun Grid Engine(SGE) System



Options:

  --help  Show this message and exit.



Commands:

  nodes   展示指定用户所有可用节点的资源使用情况

  status  更全面和方便的展示投递任务情况

  track   跟踪任务资源消耗情况,并生成图片和总结报告



```



#### 查看所有节点



查看用户所属节点情况

`jobview nodes` 输出如下:

![nodes](./docs/image_change.png)



投递一个任务并在后台监控其资源消耗

`jobview track "qsub -V -l vf=2G -q SC1.q -cwd work.sh" &> run.log &`



得到如下报告:

![report](./docs/image_report.png)



### 子命令参数



```python

$jobview nodes --help

Usage: jobview nodes [OPTIONS]



  展示指定用户所有可用节点的资源使用情况



Options:

  -u, --user TEXT  指定用户(默认为当前用户)

  --help           Show this message and exit.



$jobview status --help

Usage: jobview status [OPTIONS]



  更全面和方便的展示投递任务情况

  使用示例:

      SGEViwer status

      SGEViwer status -u user_name

      SGEViwer status -u user_name -d



Options:

  -u, --user TEXT    指定用户

  -j, --job_id TEXT  指定作业ID

  -d, --detail       启用详细输出格式

  -o, --one_line     一行展示信息

  -q, --queue TEXT   要过滤的队列,可指定多个,示例:-q gpu.q,bigmem.q

  -n, --node TEXT    要过滤的节点,可指定多个,示例:-n tjcompute001,tjcompute002

  --help             Show this message and exit.



$jobview track --help

Usage: jobview track [OPTIONS] [CMD]...



  跟踪任务资源消耗情况,并生成图片和总结报告

  示例:

      执行命令:

      SGEViewer track "qsub -V -l vf=20G -q SC1.q -cwd  work.sh"

      后台执行:

      SGEViewer track "qsub -V -l vf=20G -q SC1.q -cwd  work.sh" &> run.log &

      仅绘图:

      SGEViewer track -p track_7355217.json



Options:

  -i, --interval INTEGER  检查任务状态的时间间隔(秒),默认为10秒。

  -p, --plot-only TEXT    制定一个json文件,只绘图

  --help                  Show this message and exit.



```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Bio-MingChen/jobview",
    "name": "jobview",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "chenming",
    "author_email": "cm.bio@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/1e/aa/d8c68ded1c3c7d10cf369830c6fa102e3b0e57a7514dc8a4e945f7641cdb/jobview-1.2.3.tar.gz",
    "platform": null,
    "description": "## jobview\r\n\r\n\r\n\r\n\u8fd9\u4e2a\u5de5\u5177\u4e3b\u8981\u7528\u4e8e SGE \u7cfb\u7edf\u7684\u8282\u70b9\u8d44\u6e90\u67e5\u770b\uff0c\u4efb\u52a1\u8d44\u6e90\u663e\u793a\u548c\u6d88\u8017\u8bb0\u5f55\u7684\u5de5\u5177\r\n\r\n\u7b80\u5355\u6765\u8bf4\uff0c\u5b83\u662f\u57fa\u4e8e`qstat`, `qhost`, `qselect`\u7b49\u547d\u4ee4\u7684\u4fe1\u606f\uff0c\u63d0\u4f9b\u8d44\u6e90\u6d88\u8017\u7684\u8ddf\u8e2a\u548c\u66f4\u597d\u7684\u53ef\u89c6\u5316\r\n\r\n\r\n\r\n1. `jobview nodes` \u53ef\u4ee5\u5c55\u793a\u7528\u6237\u6240\u5c5e\u8282\u70b9\u7684\u4efb\u52a1\u60c5\u51b5\uff0c\u8d44\u6e90\u4f7f\u7528\uff0c\u662f\u5426\u8d1f\u8f7d\u9ad8\u7b49\r\n\r\n2. `jobview status`\u4ee5\u66f4\u597d\u7684\u53ef\u89c6\u5316\u65b9\u5f0f\u5c55\u793a\u4efb\u52a1\u60c5\u51b5\uff0c\u63d0\u4f9b\u8d44\u6e90\u6d88\u8017\u5c55\u793a\r\n\r\n3. `jobview track` \u8ddf\u8e2a\u4efb\u52a1\u7684\u8d44\u6e90\u6d88\u8017\u60c5\u51b5\uff0c\u5e76\u8bb0\u5f55\u548c\u751f\u6210\u4e00\u4e2a\u53ef\u89c6\u5316\u62a5\u544a\r\n\r\n\r\n\r\n### Installation\r\n\r\n\r\n\r\n```shell\r\n\r\npip install jobview\r\n\r\n```\r\n\r\n\r\n\r\n### Usage\r\n\r\n\r\n\r\n\u4e3b\u8981\u6709\u4e09\u4e2a\u5b50\u547d\u4ee4\uff0c\u5982\u4e0b\u6240\u793a:\r\n\r\n\r\n\r\n```python\r\n\r\nUsage: jobview [OPTIONS] COMMAND [ARGS]...\r\n\r\n\r\n\r\n  \u7528\u4e8eSGE\u7cfb\u7edf\u7684\u8282\u70b9\u8d44\u6e90\u67e5\u770b\uff0c\u4efb\u52a1\u8d44\u6e90\u663e\u793a\u548c\u6d88\u8017\u8bb0\u5f55\u7684\u5de5\u5177\r\n\r\n  Tools for better recording and visualizing computer resources of Sun Grid Engine(SGE) System\r\n\r\n\r\n\r\nOptions:\r\n\r\n  --help  Show this message and exit.\r\n\r\n\r\n\r\nCommands:\r\n\r\n  nodes   \u5c55\u793a\u6307\u5b9a\u7528\u6237\u6240\u6709\u53ef\u7528\u8282\u70b9\u7684\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5\r\n\r\n  status  \u66f4\u5168\u9762\u548c\u65b9\u4fbf\u7684\u5c55\u793a\u6295\u9012\u4efb\u52a1\u60c5\u51b5\r\n\r\n  track   \u8ddf\u8e2a\u4efb\u52a1\u8d44\u6e90\u6d88\u8017\u60c5\u51b5\uff0c\u5e76\u751f\u6210\u56fe\u7247\u548c\u603b\u7ed3\u62a5\u544a\r\n\r\n\r\n\r\n```\r\n\r\n\r\n\r\n#### \u67e5\u770b\u6240\u6709\u8282\u70b9\r\n\r\n\r\n\r\n\u67e5\u770b\u7528\u6237\u6240\u5c5e\u8282\u70b9\u60c5\u51b5\r\n\r\n`jobview nodes` \u8f93\u51fa\u5982\u4e0b\uff1a\r\n\r\n![nodes](./docs/image_change.png)\r\n\r\n\r\n\r\n\u6295\u9012\u4e00\u4e2a\u4efb\u52a1\u5e76\u5728\u540e\u53f0\u76d1\u63a7\u5176\u8d44\u6e90\u6d88\u8017\r\n\r\n`jobview track \"qsub -V -l vf=2G -q SC1.q -cwd work.sh\" &> run.log &`\r\n\r\n\r\n\r\n\u5f97\u5230\u5982\u4e0b\u62a5\u544a\uff1a\r\n\r\n![report](./docs/image_report.png)\r\n\r\n\r\n\r\n### \u5b50\u547d\u4ee4\u53c2\u6570\r\n\r\n\r\n\r\n```python\r\n\r\n$jobview nodes --help\r\n\r\nUsage: jobview nodes [OPTIONS]\r\n\r\n\r\n\r\n  \u5c55\u793a\u6307\u5b9a\u7528\u6237\u6240\u6709\u53ef\u7528\u8282\u70b9\u7684\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5\r\n\r\n\r\n\r\nOptions:\r\n\r\n  -u, --user TEXT  \u6307\u5b9a\u7528\u6237(\u9ed8\u8ba4\u4e3a\u5f53\u524d\u7528\u6237)\r\n\r\n  --help           Show this message and exit.\r\n\r\n\r\n\r\n$jobview status --help\r\n\r\nUsage: jobview status [OPTIONS]\r\n\r\n\r\n\r\n  \u66f4\u5168\u9762\u548c\u65b9\u4fbf\u7684\u5c55\u793a\u6295\u9012\u4efb\u52a1\u60c5\u51b5\r\n\r\n  \u4f7f\u7528\u793a\u4f8b\uff1a\r\n\r\n      SGEViwer status\r\n\r\n      SGEViwer status -u user_name\r\n\r\n      SGEViwer status -u user_name -d\r\n\r\n\r\n\r\nOptions:\r\n\r\n  -u, --user TEXT    \u6307\u5b9a\u7528\u6237\r\n\r\n  -j, --job_id TEXT  \u6307\u5b9a\u4f5c\u4e1aID\r\n\r\n  -d, --detail       \u542f\u7528\u8be6\u7ec6\u8f93\u51fa\u683c\u5f0f\r\n\r\n  -o, --one_line     \u4e00\u884c\u5c55\u793a\u4fe1\u606f\r\n\r\n  -q, --queue TEXT   \u8981\u8fc7\u6ee4\u7684\u961f\u5217\uff0c\u53ef\u6307\u5b9a\u591a\u4e2a\uff0c\u793a\u4f8b\uff1a-q gpu.q,bigmem.q\r\n\r\n  -n, --node TEXT    \u8981\u8fc7\u6ee4\u7684\u8282\u70b9\uff0c\u53ef\u6307\u5b9a\u591a\u4e2a\uff0c\u793a\u4f8b\uff1a-n tjcompute001,tjcompute002\r\n\r\n  --help             Show this message and exit.\r\n\r\n\r\n\r\n$jobview track --help\r\n\r\nUsage: jobview track [OPTIONS] [CMD]...\r\n\r\n\r\n\r\n  \u8ddf\u8e2a\u4efb\u52a1\u8d44\u6e90\u6d88\u8017\u60c5\u51b5\uff0c\u5e76\u751f\u6210\u56fe\u7247\u548c\u603b\u7ed3\u62a5\u544a\r\n\r\n  \u793a\u4f8b\uff1a\r\n\r\n      \u6267\u884c\u547d\u4ee4:\r\n\r\n      SGEViewer track \"qsub -V -l vf=20G -q SC1.q -cwd  work.sh\"\r\n\r\n      \u540e\u53f0\u6267\u884c:\r\n\r\n      SGEViewer track \"qsub -V -l vf=20G -q SC1.q -cwd  work.sh\" &> run.log &\r\n\r\n      \u4ec5\u7ed8\u56fe:\r\n\r\n      SGEViewer track -p track_7355217.json\r\n\r\n\r\n\r\nOptions:\r\n\r\n  -i, --interval INTEGER  \u68c0\u67e5\u4efb\u52a1\u72b6\u6001\u7684\u65f6\u95f4\u95f4\u9694\uff08\u79d2\uff09\uff0c\u9ed8\u8ba4\u4e3a10\u79d2\u3002\r\n\r\n  -p, --plot-only TEXT    \u5236\u5b9a\u4e00\u4e2ajson\u6587\u4ef6\uff0c\u53ea\u7ed8\u56fe\r\n\r\n  --help                  Show this message and exit.\r\n\r\n\r\n\r\n```\r\n\r\n",
    "bugtrack_url": null,
    "license": "BSD License",
    "summary": "Tools for better recording and visualizing computer resources of Sun Grid Engine(SGE) System",
    "version": "1.2.3",
    "project_urls": {
        "Homepage": "https://github.com/Bio-MingChen/jobview",
        "Tracker": "https://github.com/Bio-MingChen/jobview/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cbdc995a53dedd94e36c652a5dadb68bf08f869739ee1456bf6050058a332cab",
                "md5": "48551048634eaf408216094600c068ee",
                "sha256": "db4b0c540855c9d4f2a394004be71f40db0eff1b77a711aa085999a71422f53a"
            },
            "downloads": -1,
            "filename": "jobview-1.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "48551048634eaf408216094600c068ee",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5089668,
            "upload_time": "2025-01-22T02:40:53",
            "upload_time_iso_8601": "2025-01-22T02:40:53.114483Z",
            "url": "https://files.pythonhosted.org/packages/cb/dc/995a53dedd94e36c652a5dadb68bf08f869739ee1456bf6050058a332cab/jobview-1.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1eaad8c68ded1c3c7d10cf369830c6fa102e3b0e57a7514dc8a4e945f7641cdb",
                "md5": "98f048e518c118ef39602cc6c7aa8234",
                "sha256": "9773f76e252c1d4aa85bbbf9520c43cb04acaba353bc752737275a7df2482f97"
            },
            "downloads": -1,
            "filename": "jobview-1.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "98f048e518c118ef39602cc6c7aa8234",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5072600,
            "upload_time": "2025-01-22T02:40:57",
            "upload_time_iso_8601": "2025-01-22T02:40:57.368699Z",
            "url": "https://files.pythonhosted.org/packages/1e/aa/d8c68ded1c3c7d10cf369830c6fa102e3b0e57a7514dc8a4e945f7641cdb/jobview-1.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-22 02:40:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Bio-MingChen",
    "github_project": "jobview",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "click",
            "specs": []
        },
        {
            "name": "matplotlib",
            "specs": []
        },
        {
            "name": "plotly",
            "specs": []
        },
        {
            "name": "humanfriendly",
            "specs": []
        }
    ],
    "lcname": "jobview"
}
        
Elapsed time: 0.43792s