{ "info": { "author": "Larry Chen, Weikai Wang, Gang He", "author_email": "lchen@suse.com, wewang@suse.com, ghe@suse.com", "bugtrack_url": null, "classifiers": [], "description": "# o2locktop - a top-like OCFS2 DLM lock monitor\n\n## Introduction\n\no2locktop is a top-like tool to monitor OCFS2 DLM lock usage in the cluster,\nand can be used to detect hot files/directories, which intensively acquire DLM\nlocks.\n\nThe average/maximal wait time for DLM lock acquisitions likely gives hints to\nthe administrator when concern about OCFS2 performance, for example,\n- if the workload is unbalanced among nodes.\n- if a file is too hot, then maybe need check the related applications above.\n- if a directory is too hot, then maybe split it to smaller with less number\n of files underneath.\n\nFor slightly more implementation details, \n\n- As a shared disk cluster file system, OCFS2 files and directies can be\n accessed from the different nodes simultaneously. To protect the data\nconsistency, the file access is coordinated through Distributed Lock\nManager(DLM). For example, \"Meta DLM lock\" is used to protect file(per inode)\nmeta data change. \"Write DLM lock\" is used to protect file data write. \"Open\nDLM lock\" could be used for one node keeps accessing a opened file while other\nprocesses (or even from other nodes) might delete it, and eventually get\ndeleted once all associated file descriptors are close. For more information\nabout how OCFS2 works with DLM, please check [OCFS2 Project web\npage][OCFS2_wiki].\n\n- o2locktop reads OCFS2 kernel debugfs statistics under /sys/kernel/debug/.\n That says, for all cluster nodes, OCFS2_FS_STATS kernel config option must be\nset(enabled). To check it out:\n\n```shell\ngrep OCFS2_FS_STATS < /boot/config-`uname -r`\n```\n\n## Installation\n\nNote: o2locktop is Python 2 and Python 3 compatible.\n\n- RPM:\n\n https://download.opensuse.org/repositories/network:/ha-clustering:/Factory/\n\n eg. to download openSUSE_Tumbleweed/noarch/o2locktop-1.0.0...noarch.rpm\n\n```shell\n sudo zypper install \n or\n sudo rpm -ivh \n```\n\n- Python pip:\n\n```shell\n sudo pip install o2locktop\n```\n\n- Or, directly use o2locktop from the source code tree:\n\n```shell\n git clone https://github.com/ganghe/o2locktop.git\n cd o2locktop \n ~/o2locktop> python o2locktop -h\n```\n\n## Usage\n\n- Check `o2locktop --help` in details, also availble in the below [REFERENCE](#reference)\n- Or, check the asciidemo [here][o2locktop_demo]\n\n- Known limitations\n 1. Since OCFS2 file system statistics in kernel calculation starts when\n applying for DLM lock and ends when it returns. If it never returns due to\nthe deadlock because of a bug just in case, o2locktop does not reflect this\nsituation currently.\n\n 2. o2locktop can't display the file names of the inode. The additional step\n is needed to translate inode to the file name.\n```shell\n find -inum \n```\n\n### TODO\n\n- Replay o2locktop log file. \n- Inside of the cluster, o2lockto can run without any argument.\n- unittest\n\n### Community\n\n* Report bugs at the [o2locktop issues @ Github.com](https://github.com/ganghe/o2locktop/issues) page.\n* Contact [OCFS2 developer mailing list](https://oss.oracle.com/mailman/listinfo/ocfs2-devel)\n\n\n\n\n[OCFS2_wiki]: https://ocfs2.wiki.kernel.org\n[o2locktop_demo]: https://asciinema.org/a/fktChiXJpLGL8Z3WaoWDaXLE2 \n\n\nREFERENCE\n---------\n```\nusage: o2locktop [-h] [-n NODE_IP] [-o LOG_FILE] [-l DISPLAY_LENGTH] [-V] [-d]\n [MOUNT_POINT]\n\nIt is a top-like tool to monitor OCFS2 DLM lock usage in the cluster, and can\nbe used to detect hot files/directories, which intensively acquire DLM locks.\n\npositional arguments:\n MOUNT_POINT the OCFS2 mount point, eg. /mnt/shared\n\noptional arguments:\n -h, --help show this help message and exit\n -n NODE_IP OCFS2 node IP address for ssh\n -o LOG_FILE log path\n -l DISPLAY_LENGTH number of lock records to display\n -V, --version print the current version of o2locktop and exit\n -d, --debug show all the inode including the system inode number\n\nThe average/maximal wait time for DLM lock acquisitions likely gives hints to\nthe administrator when concern about OCFS2 performance, for example,\n- if the workload is unbalanced among nodes.\n- if a file is too hot, then maybe need check the related applications above.\n- if a directory is too hot, then maybe split it to smaller with less number\n of files underneath.\n\nOUTPUT ANNOTATION:\n - The output is refreshed every 5 seconds, and sorted by the sum of \n DLM EX(exclusive) and PR(protected read) lock average wait time\n - One row, one inode (including the system meta files if with '-d' argument)\n - Columns:\n \"TYPE\" is DLM lock types,\n 'M' -> Meta data lock for the inode\n 'W' -> Write lock for the inode\n 'O' -> Open lock for the inode\n\n \"INO\" is the inode number of the file\n\n \"EX NUM\" is the number of EX lock acquisitions\n \"EX TIME\" is the maximal wait time to get EX lock\n \"EX AVG\" is the average wait time to get EX lock\n\n \"PR NUM\" is the number of PR(read) lock acquisitions\n \"PR TIME\" is the maximal wait time to get PR lock\n \"PR AVG\" is the average wait time to get PR lock\n\nSHORTCUTS:\n - Type \"d\" to display DLM lock statistics for each node\n - Type \"Ctrl+C\" or \"q\" to exit o2locktop process\n\nPREREQUISITES:\n o2locktop reads OCFS2_FS_STATS statistics from /sys/kernel/debug/. That says,\n for all cluster nodes, the kernel option must be set(enabled). Check it out:\n grep OCFS2_FS_STATS < /boot/config-\\`uname -r\\`\n\n o2locktop uses the passwordless SSH to OCFS2 nodes as root. Set it up if not:\n ssh-keygen; ssh-copy-id root@node1\n\nEXAMPLES:\n - At any machine within or outside of the cluster:\n\n o2locktop -n node1 -n node2 -n node3 /mnt/shared\n\n To find the absolute path of the inode file:\n find -inum \n\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ganghe/o2locktop", "keywords": "", "license": "GPL2.0", "maintainer": "", "maintainer_email": "", "name": "o2locktop", "package_url": "https://pypi.org/project/o2locktop/", "platform": "", "project_url": "https://pypi.org/project/o2locktop/", "project_urls": { "Homepage": "https://github.com/ganghe/o2locktop" }, "release_url": "https://pypi.org/project/o2locktop/1.0.10/", "requires_dist": null, "requires_python": "", "summary": "o2locktop is a top-like OCFS2 DLM lock monitor", "version": "1.0.10" }, "last_serial": 5236474, "releases": { "1.0.10": [ { "comment_text": "", "digests": { "md5": "c92fb55461166e82b016f261b4bab83a", "sha256": "25fd21a2d024c400329bb1d8fd882ae24684c50e0261f369d2bb5ef0b22afabb" }, "downloads": -1, "filename": "o2locktop-1.0.10.tar.gz", "has_sig": false, "md5_digest": "c92fb55461166e82b016f261b4bab83a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19146, "upload_time": "2019-05-07T07:23:14", "url": "https://files.pythonhosted.org/packages/d0/43/f6b2bfb1008d840096444ea92a0a75d559c8daa202d604904b739bd0fc51/o2locktop-1.0.10.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "8807e63b2024c8226780349873bb2c27", "sha256": "79dca8a058c906c901cf54ade81102207e27540f230292512711d89868c14a87" }, "downloads": -1, "filename": "o2locktop-1.0.4.tar.gz", "has_sig": false, "md5_digest": "8807e63b2024c8226780349873bb2c27", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17505, "upload_time": "2019-03-21T09:54:44", "url": "https://files.pythonhosted.org/packages/dd/96/7d26c35b770d5e33b3c5848f4182fa9f4ce5cc60b7c327634adf36591830/o2locktop-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "5515494f0391b1ca21dd7909802ab928", "sha256": "69acbd0f3e57a68530ddabef10d2583268b7eb3b6f8f3fe94b313b569bceb42a" }, "downloads": -1, "filename": "o2locktop-1.0.5.tar.gz", "has_sig": false, "md5_digest": "5515494f0391b1ca21dd7909802ab928", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17505, "upload_time": "2019-03-21T09:59:18", "url": "https://files.pythonhosted.org/packages/be/5d/9c894a35a978efc93035fa8beaee9dfb19f1bc79f3d6f6e44e8a3f11eb3c/o2locktop-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "2cbb82d73788ca54197d980ff9435a45", "sha256": "45f9f08ab33599de9bf56bc774b471779da5063a85c803d74a355fd0a10bff21" }, "downloads": -1, "filename": "o2locktop-1.0.6.tar.gz", "has_sig": false, "md5_digest": "2cbb82d73788ca54197d980ff9435a45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17535, "upload_time": "2019-03-21T10:02:49", "url": "https://files.pythonhosted.org/packages/30/85/4b3237aa3d6e13a4c594b047cda8b0c4163c5f2f8e061790162d2d40b47a/o2locktop-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "b8bc782f55dc462d7b5328a3326888ad", "sha256": "b54035cb80aa149da04cf802273398db04e3a391decc00b2feb17b95996a1c9e" }, "downloads": -1, "filename": "o2locktop-1.0.7.tar.gz", "has_sig": false, "md5_digest": "b8bc782f55dc462d7b5328a3326888ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19155, "upload_time": "2019-03-21T15:01:32", "url": "https://files.pythonhosted.org/packages/19/78/94a50e361947eb2db30b8a10db82b11144908a91d598ce440b91a213b45c/o2locktop-1.0.7.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "1ea95db3a36a198e6a3b6d842c816739", "sha256": "0650fdd75d44dc4d24dfb4f9b12f1ab16e434d75068d71820a9a86ed74d619ba" }, "downloads": -1, "filename": "o2locktop-1.0.9.tar.gz", "has_sig": false, "md5_digest": "1ea95db3a36a198e6a3b6d842c816739", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20031, "upload_time": "2019-03-21T15:28:34", "url": "https://files.pythonhosted.org/packages/44/05/b2d8e950283709d58a0557e459281069425fba6dca9babd363b769ec0e31/o2locktop-1.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c92fb55461166e82b016f261b4bab83a", "sha256": "25fd21a2d024c400329bb1d8fd882ae24684c50e0261f369d2bb5ef0b22afabb" }, "downloads": -1, "filename": "o2locktop-1.0.10.tar.gz", "has_sig": false, "md5_digest": "c92fb55461166e82b016f261b4bab83a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19146, "upload_time": "2019-05-07T07:23:14", "url": "https://files.pythonhosted.org/packages/d0/43/f6b2bfb1008d840096444ea92a0a75d559c8daa202d604904b739bd0fc51/o2locktop-1.0.10.tar.gz" } ] }