{ "info": { "author": "Jean-Tiare Le Bigot", "author_email": "jt@yadutaf.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: Console :: Curses", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: System :: Monitoring" ], "description": "CTOP\r\n====\r\n\r\nA command line / text based Linux Containers monitoring tool that works just like you expect.\r\n\r\n.. image:: https://github.com/yadutaf/ctop/raw/master/screenshots/screenshot.png\r\n\r\nIn a hurry?\r\n\r\n.. code:: bash\r\n\r\n curl -sSl https://raw.githubusercontent.com/yadutaf/ctop/master/cgroup_top.py > /opt/ctop && python /opt/ctop\r\n\r\nIntroduction\r\n------------\r\n\r\n``ctop`` will help you see what's going on at the container level. Basically,\r\ncontainers are a logical group of processes isolated using kernel's cgroups and\r\nnamespaces. Recently, they have been made popular by Docker and they are also\r\nheavily used under the hood by systemd and a load of container tools like lxc,\r\nrocket, lmctfy and many others.\r\n\r\nUnder the hood, ctop will collect all metrics it can from cgroups in realtime\r\nand render them to instantly give you an overview of the global system health.\r\n\r\nIt currently collects metrics related to cpu, memory and block IO usage as well\r\nas metadata such as owning user (mostly for systemd based containers), uptime\r\nand attempts to guess the container managing technology behind.\r\n\r\nWhen the container technology has been successfully guessed, additional features\r\nare exposed like attaching to container (basically, it opens a shell in the\r\ncontainer context) and stopping it.\r\n\r\n``ctop`` author uses it on production system to quicky detect biggest memory\r\nusers in low memory situations.\r\n\r\nFeatures\r\n--------\r\n\r\n- collect cpu, pids, memory and blkio metrics\r\n- collect metadata like task count, owning user, container technology\r\n- sort by any column\r\n- filter by container type (docker, lxc, systemd, ...)\r\n- optionally display logical/tree view\r\n- optionally fold/unfold sub cgroup tree\r\n- optionally follow selected cgroup/container\r\n- optionnaly pause the refresh (typically, to select text)\r\n- detects Docker, LXC, unprivileged LXC, OpenVZ and systemd based containers\r\n- supports advanced features for Docker, LXC and OpenVZ based containers\r\n- open a shell/attach to supported container types for further diagnose\r\n- stop/kill/chekpointing supported container types\r\n- click to sort / reverse\r\n- click to select cgroup\r\n- no external dependencies beyond Python >= 2.6 or Python >= 3.0\r\n\r\nInstallation\r\n------------\r\n\r\nAs a monitoring tool, ``ctop`` tries to be as dicrete as possible. Nonetheless\r\nit still has some expectations. It will need at least Python 2.6 with builtin\r\ncurses support to run. This is usually found with Debian 6 and newer.\r\n\r\nThis said, the recommended installation method relies on pip\r\n\r\n.. code:: bash\r\n\r\n pip install ctop\r\n ctop\r\n\r\nIf using pip is not an option, which is often the case on production systems,\r\nyou may also directly grab the self-contained source file directly from github\r\nand run it in place. All you'll need is Python 2.6 (Debian Squeeze):\r\n\r\n.. code:: bash\r\n\r\n wget https://raw.githubusercontent.com/yadutaf/ctop/master/cgroup_top.py -O ctop\r\n chmod +x ctop\r\n ./ctop\r\n\r\nAlternatively, if you are a Boot2docker user, you may install a Dockerized\r\nversion of ctop instead. Please note that this is experimental. You have to\r\nhave a docker binary inside your container to control / attach to your\r\ncontainers from ctop using this method:\r\n\r\n.. code:: bash\r\n\r\n docker pull yadutaf/ctop\r\n docker run --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro --volume=/var/run/docker.sock:/var/run/docker.sock -it --rm yadutaf/ctop\r\n # Optionally, to resolve uids to usernames, add '--volume /etc/passwd:/etc/passwd:ro'\r\n\r\nUsage:\r\n------\r\n\r\n**Command line**:\r\n\r\n.. code:: text\r\n\r\n Monitor local cgroups as used by Docker, LXC, SystemD, ...\r\n\r\n Usage:\r\n ctop [--tree] [--refresh=] [--columns=] [--sort-col=] [--follow=] [--fold=, ...] [--type=, ...]\r\n ctop (-h | --help)\r\n\r\n Options:\r\n --tree Show tree view by default.\r\n --fold= Start with cgroup path folded\r\n --follow= Follow/highlight cgroup at path.\r\n --type=TYPE Only show containers of this type\r\n --refresh= Refresh display every [default: 1].\r\n --columns= List of optional columns to display. Always includes 'name'. [default: owner,processes,memory,cpu-sys,cpu-user,blkio,cpu-time].\r\n --sort-col= Select column to sort by initially. Can be changed dynamically. [default: cpu-user]\r\n -h --help Show this screen.\r\n\r\n**Control**:\r\n\r\n- press ``p`` to toggle/pause the refresh and select text.\r\n- press ``f`` to let selected line follow / stay on the same container. Default: Don't follow.\r\n- press ``q`` or ``Ctrl+C`` to quit.\r\n- press ``F5`` to toggle tree/list view. Default: list view.\r\n- press ``\u2191`` and ``\u2193`` to navigate between containers.\r\n- press ``+`` or ``-`` to toggle child cgroup folding\r\n- click on title line to select sort column / reverse sort order.\r\n- click on any container line to select it.\r\n\r\nAdditionally, for supported container types (Currently Docker, LXC and OpenVZ):\r\n\r\n- press ``a`` to attach to console output.\r\n- press ``e`` to open a shell in the container context. Aka 'enter' container.\r\n- press ``s`` to stop the container (SIGTERM).\r\n- press ``k`` to kill the container (SIGKILL).\r\n- press ``c`` to checkpointing the container(OpenVZ only now - run 'vzctl chkpnt CTID')\r\n\r\nRequirements\r\n------------\r\n\r\n* python >=2.6 or python >=3.0, with builtin curses support\r\n\r\nLicence\r\n-------\r\n\r\nMIT", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/yadutaf/ctop", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ctop", "package_url": "https://pypi.org/project/ctop/", "platform": "any", "project_url": "https://pypi.org/project/ctop/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/yadutaf/ctop" }, "release_url": "https://pypi.org/project/ctop/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "A lightweight top like monitor for linux CGroups", "version": "1.0.0" }, "last_serial": 2114609, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d9d449ba682ceaef3080afde1cc2d4b5", "sha256": "a8a4cc0b6bfd7e2c3d9dac2cea43ecf5468b329c0414ee03884907d3ce624886" }, "downloads": -1, "filename": "ctop-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d9d449ba682ceaef3080afde1cc2d4b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4741, "upload_time": "2015-03-05T21:40:04", "url": "https://files.pythonhosted.org/packages/1a/e3/969a47641d28d66cb13c3d3395e39ecac0b0913766195a17420b3ef1dc52/ctop-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "57e4a985a6fb0746855ced5a71c0b05c", "sha256": "c19a2c9c017fc3ef512d2047c362491b9cccc8324eb22edcea37ec3a5b0eecb0" }, "downloads": -1, "filename": "ctop-0.2.0.tar.gz", "has_sig": false, "md5_digest": "57e4a985a6fb0746855ced5a71c0b05c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6142, "upload_time": "2015-03-24T20:39:13", "url": "https://files.pythonhosted.org/packages/b0/33/6ea6b1863425d1051e96d654f4765637e15ab367c6571b098db2f628538d/ctop-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "c7dff67927e1203c0ab4c57def5ec4a7", "sha256": "76557a8019e0a5d6106d792075f35179da6efea4a375150641f40e0663434ae7" }, "downloads": -1, "filename": "ctop-0.3.0.tar.gz", "has_sig": false, "md5_digest": "c7dff67927e1203c0ab4c57def5ec4a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7304, "upload_time": "2015-03-26T23:49:44", "url": "https://files.pythonhosted.org/packages/4c/05/20f1f37803cc6a882a653237192a5841faa354e18c15b4adad25385bce8e/ctop-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "0af05e6b311b8763c6adfd212def71cc", "sha256": "ea23278a38193530bcfa1375c7b46f950158c958b66fc4e6f3fb8e700f025e15" }, "downloads": -1, "filename": "ctop-0.3.1.tar.gz", "has_sig": false, "md5_digest": "0af05e6b311b8763c6adfd212def71cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7349, "upload_time": "2015-03-30T21:32:59", "url": "https://files.pythonhosted.org/packages/94/62/b3aa5ca3bfb1667a560cc2a72ffb3bdc2d3b57c78010dd36cabae420001d/ctop-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "b9ba7ee0cd49514d86d87789a45e306a", "sha256": "0f70d8aa2472cd36ada3a9650211260982bee0f8d55897da5d71b1b136d18a95" }, "downloads": -1, "filename": "ctop-0.4.0.tar.gz", "has_sig": false, "md5_digest": "b9ba7ee0cd49514d86d87789a45e306a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10393, "upload_time": "2015-04-19T15:42:03", "url": "https://files.pythonhosted.org/packages/3c/f3/c1af97233366ae4b2a23ae437a3bc5a69c2c083b1db4f066c0c7acde19f2/ctop-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "c14ae32351502213bc47f7c47179520b", "sha256": "ab062870c7dd8a0ba745e364d0d4507daf928b8c7af1abd69459fe5c296016fe" }, "downloads": -1, "filename": "ctop-0.4.1.tar.gz", "has_sig": false, "md5_digest": "c14ae32351502213bc47f7c47179520b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11068, "upload_time": "2015-05-14T20:26:06", "url": "https://files.pythonhosted.org/packages/5d/8d/9170481811b78a015f03475c4b9cb8f91f842d2b9cf36a567e3a2fb55dcf/ctop-0.4.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "16b0dafd7c0d893c45d6dcf52e25053b", "sha256": "332c68292c7e119cc4dbfa764f6238172f5acd26e0a9fd5748bd553f05245101" }, "downloads": -1, "filename": "ctop-1.0.0.tar.gz", "has_sig": false, "md5_digest": "16b0dafd7c0d893c45d6dcf52e25053b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13307, "upload_time": "2016-05-13T19:36:53", "url": "https://files.pythonhosted.org/packages/91/77/829c00b102d35b0a188cd4dc02c2ae69a5640ca9b4957ecb9d507f33b754/ctop-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "16b0dafd7c0d893c45d6dcf52e25053b", "sha256": "332c68292c7e119cc4dbfa764f6238172f5acd26e0a9fd5748bd553f05245101" }, "downloads": -1, "filename": "ctop-1.0.0.tar.gz", "has_sig": false, "md5_digest": "16b0dafd7c0d893c45d6dcf52e25053b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13307, "upload_time": "2016-05-13T19:36:53", "url": "https://files.pythonhosted.org/packages/91/77/829c00b102d35b0a188cd4dc02c2ae69a5640ca9b4957ecb9d507f33b754/ctop-1.0.0.tar.gz" } ] }