From 3da7f5cc0c62f1943f888ef47c6a084ef00ec180 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Tue, 24 Nov 2015 15:37:43 +0200 Subject: [PATCH] Added top command for Linux and OSX --- pages/index.json | 2 +- pages/linux/top.md | 23 +++++++++++++++++++++++ pages/osx/top.md | 27 +++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 pages/linux/top.md create mode 100644 pages/osx/top.md diff --git a/pages/index.json b/pages/index.json index 2b2dd4a4d..5f32282d4 100644 --- a/pages/index.json +++ b/pages/index.json @@ -1 +1 @@ -{"commands":[{"name":"ab","platform":["common"]},{"name":"ack","platform":["common"]},{"name":"ag","platform":["common"]},{"name":"airport","platform":["osx"]},{"name":"alias","platform":["common"]},{"name":"apropos","platform":["common"]},{"name":"apt-get","platform":["linux"]},{"name":"aptitude","platform":["linux"]},{"name":"ar","platform":["common"]},{"name":"awk","platform":["common"]},{"name":"base64","platform":["linux"]},{"name":"brew","platform":["osx"]},{"name":"bundle","platform":["common"]},{"name":"caffeinate","platform":["osx"]},{"name":"cal","platform":["common"]},{"name":"cat","platform":["common"]},{"name":"cd","platform":["common"]},{"name":"chmod","platform":["common"]},{"name":"chown","platform":["common"]},{"name":"chsh","platform":["common"]},{"name":"cksum","platform":["common"]},{"name":"convert","platform":["common"]},{"name":"cp","platform":["common"]},{"name":"curl","platform":["common"]},{"name":"cut","platform":["common"]},{"name":"date","platform":["common"]},{"name":"deluser","platform":["common"]},{"name":"df","platform":["common"]},{"name":"diff","platform":["common"]},{"name":"dig","platform":["common"]},{"name":"diskutil","platform":["osx"]},{"name":"dpkg","platform":["linux"]},{"name":"drush","platform":["common"]},{"name":"drutil","platform":["osx"]},{"name":"du","platform":["linux","osx"]},{"name":"echo","platform":["common"]},{"name":"electrum","platform":["common"]},{"name":"emerge","platform":["linux"]},{"name":"env","platform":["common"]},{"name":"exiftool","platform":["common"]},{"name":"fdupes","platform":["common"]},{"name":"ffmpeg","platform":["common"]},{"name":"find","platform":["common"]},{"name":"findmnt","platform":["linux"]},{"name":"firewall-cmd","platform":["linux"]},{"name":"free","platform":["linux"]},{"name":"fswebcam","platform":["common"]},{"name":"gcc","platform":["common"]},{"name":"gem","platform":["common"]},{"name":"gifsicle","platform":["common"]},{"name":"git","platform":["common"]},{"name":"git-add","platform":["common"]},{"name":"git-branch","platform":["common"]},{"name":"git-checkout","platform":["common"]},{"name":"git-clone","platform":["common"]},{"name":"git-commit","platform":["common"]},{"name":"git-diff","platform":["common"]},{"name":"git-init","platform":["common"]},{"name":"git-log","platform":["common"]},{"name":"git-merge","platform":["common"]},{"name":"git-push","platform":["common"]},{"name":"git-remote","platform":["common"]},{"name":"git-stash","platform":["common"]},{"name":"git-status","platform":["common"]},{"name":"gpg","platform":["common"]},{"name":"grep","platform":["common"]},{"name":"gzip","platform":["common"]},{"name":"handbrakecli","platform":["common"]},{"name":"haxelib","platform":["common"]},{"name":"head","platform":["linux","osx"]},{"name":"iconv","platform":["common"]},{"name":"iostat","platform":["linux"]},{"name":"ip","platform":["linux"]},{"name":"ipcs","platform":["common"]},{"name":"journalctl","platform":["linux"]},{"name":"kill","platform":["common"]},{"name":"less","platform":["common"]},{"name":"ln","platform":["common"]},{"name":"locate","platform":["linux","osx"]},{"name":"ls","platform":["common"]},{"name":"lsof","platform":["common"]},{"name":"man","platform":["common"]},{"name":"md5","platform":["osx"]},{"name":"md5sum","platform":["linux"]},{"name":"mdadm","platform":["linux"]},{"name":"mkdir","platform":["common"]},{"name":"more","platform":["common"]},{"name":"mount","platform":["common"]},{"name":"mp4box","platform":["common"]},{"name":"mtr","platform":["common"]},{"name":"mv","platform":["common"]},{"name":"mysql","platform":["common"]},{"name":"mysqldump","platform":["common"]},{"name":"nc","platform":["common"]},{"name":"netstat","platform":["linux"]},{"name":"networksetup","platform":["osx"]},{"name":"nmap","platform":["common"]},{"name":"node","platform":["common"]},{"name":"nohup","platform":["common"]},{"name":"npm","platform":["common"]},{"name":"open","platform":["osx"]},{"name":"pacman","platform":["linux"]},{"name":"passwd","platform":["common"]},{"name":"patch","platform":["common"]},{"name":"pbcopy","platform":["osx"]},{"name":"pbpaste","platform":["osx"]},{"name":"pgrep","platform":["common"]},{"name":"php","platform":["common"]},{"name":"ping","platform":["common"]},{"name":"pip","platform":["common"]},{"name":"play","platform":["common"]},{"name":"prctl","platform":["sunos"]},{"name":"prstat","platform":["sunos"]},{"name":"ps","platform":["common"]},{"name":"psql","platform":["common"]},{"name":"pushd","platform":["common"]},{"name":"pwd","platform":["common"]},{"name":"qlmanage","platform":["osx"]},{"name":"redis-cli","platform":["common"]},{"name":"rename","platform":["common"]},{"name":"rm","platform":["common"]},{"name":"rmdir","platform":["common"]},{"name":"route","platform":["osx"]},{"name":"rsync","platform":["common"]},{"name":"salt","platform":["common"]},{"name":"salt-call","platform":["common"]},{"name":"salt-key","platform":["common"]},{"name":"salt-run","platform":["common"]},{"name":"say","platform":["osx"]},{"name":"scp","platform":["common"]},{"name":"screen","platform":["common"]},{"name":"sed","platform":["common"]},{"name":"sha1sum","platform":["linux"]},{"name":"sha224sum","platform":["linux"]},{"name":"sha256sum","platform":["linux"]},{"name":"sha384sum","platform":["linux"]},{"name":"sha512sum","platform":["linux"]},{"name":"shuf","platform":["linux"]},{"name":"shutdown","platform":["linux","osx"]},{"name":"sort","platform":["common"]},{"name":"sox","platform":["common"]},{"name":"split","platform":["common"]},{"name":"srm","platform":["common"]},{"name":"ss","platform":["linux"]},{"name":"ssh","platform":["common"]},{"name":"sshfs","platform":["common"]},{"name":"strace","platform":["linux"]},{"name":"sudo","platform":["common"]},{"name":"svcadm","platform":["sunos"]},{"name":"svccfg","platform":["sunos"]},{"name":"svcs","platform":["sunos"]},{"name":"svn","platform":["common"]},{"name":"sw_vers","platform":["osx"]},{"name":"sysctl","platform":["osx"]},{"name":"system_profiler","platform":["osx"]},{"name":"systemctl","platform":["linux"]},{"name":"systemsetup","platform":["osx"]},{"name":"tail","platform":["common"]},{"name":"tar","platform":["common"]},{"name":"tcpdump","platform":["common"]},{"name":"tcpflow","platform":["linux"]},{"name":"tee","platform":["common"]},{"name":"telnet","platform":["common"]},{"name":"time","platform":["common"]},{"name":"tldr","platform":["common"]},{"name":"tmux","platform":["common"]},{"name":"touch","platform":["common"]},{"name":"tr","platform":["common"]},{"name":"traceroute","platform":["common"]},{"name":"tree","platform":["common"]},{"name":"umount","platform":["common"]},{"name":"uname","platform":["common"]},{"name":"unzip","platform":["common"]},{"name":"useradd","platform":["common"]},{"name":"userdel","platform":["common"]},{"name":"usermod","platform":["common"]},{"name":"wacaw","platform":["osx"]},{"name":"wall","platform":["linux"]},{"name":"watch","platform":["linux"]},{"name":"wc","platform":["common"]},{"name":"wget","platform":["common"]},{"name":"which","platform":["common"]},{"name":"wpa_cli","platform":["linux"]},{"name":"xargs","platform":["linux"]},{"name":"xctool","platform":["osx"]},{"name":"xed","platform":["osx"]},{"name":"xsltproc","platform":["osx"]},{"name":"yes","platform":["common"]},{"name":"zbarimg","platform":["common"]},{"name":"zfs","platform":["common"]},{"name":"zip","platform":["common"]},{"name":"zpool","platform":["common"]}]} \ No newline at end of file +{"commands":[{"name":"ab","platform":["common"]},{"name":"ack","platform":["common"]},{"name":"ag","platform":["common"]},{"name":"airport","platform":["osx"]},{"name":"alias","platform":["common"]},{"name":"apropos","platform":["common"]},{"name":"apt-get","platform":["linux"]},{"name":"aptitude","platform":["linux"]},{"name":"ar","platform":["common"]},{"name":"awk","platform":["common"]},{"name":"base64","platform":["linux"]},{"name":"brew","platform":["osx"]},{"name":"bundle","platform":["common"]},{"name":"caffeinate","platform":["osx"]},{"name":"cal","platform":["common"]},{"name":"cat","platform":["common"]},{"name":"cd","platform":["common"]},{"name":"chmod","platform":["common"]},{"name":"chown","platform":["common"]},{"name":"chsh","platform":["common"]},{"name":"cksum","platform":["common"]},{"name":"convert","platform":["common"]},{"name":"cp","platform":["common"]},{"name":"curl","platform":["common"]},{"name":"cut","platform":["common"]},{"name":"date","platform":["common"]},{"name":"deluser","platform":["common"]},{"name":"df","platform":["common"]},{"name":"diff","platform":["common"]},{"name":"dig","platform":["common"]},{"name":"diskutil","platform":["osx"]},{"name":"dpkg","platform":["linux"]},{"name":"drush","platform":["common"]},{"name":"drutil","platform":["osx"]},{"name":"du","platform":["linux","osx"]},{"name":"echo","platform":["common"]},{"name":"electrum","platform":["common"]},{"name":"emerge","platform":["linux"]},{"name":"env","platform":["common"]},{"name":"exiftool","platform":["common"]},{"name":"fdupes","platform":["common"]},{"name":"ffmpeg","platform":["common"]},{"name":"find","platform":["common"]},{"name":"findmnt","platform":["linux"]},{"name":"firewall-cmd","platform":["linux"]},{"name":"free","platform":["linux"]},{"name":"fswebcam","platform":["common"]},{"name":"gcc","platform":["common"]},{"name":"gem","platform":["common"]},{"name":"gifsicle","platform":["common"]},{"name":"git","platform":["common"]},{"name":"git-add","platform":["common"]},{"name":"git-branch","platform":["common"]},{"name":"git-checkout","platform":["common"]},{"name":"git-clone","platform":["common"]},{"name":"git-commit","platform":["common"]},{"name":"git-diff","platform":["common"]},{"name":"git-init","platform":["common"]},{"name":"git-log","platform":["common"]},{"name":"git-merge","platform":["common"]},{"name":"git-push","platform":["common"]},{"name":"git-remote","platform":["common"]},{"name":"git-stash","platform":["common"]},{"name":"git-status","platform":["common"]},{"name":"gpg","platform":["common"]},{"name":"grep","platform":["common"]},{"name":"gzip","platform":["common"]},{"name":"handbrakecli","platform":["common"]},{"name":"haxelib","platform":["common"]},{"name":"head","platform":["linux","osx"]},{"name":"iconv","platform":["common"]},{"name":"iostat","platform":["linux"]},{"name":"ip","platform":["linux"]},{"name":"ipcs","platform":["common"]},{"name":"journalctl","platform":["linux"]},{"name":"kill","platform":["common"]},{"name":"less","platform":["common"]},{"name":"ln","platform":["common"]},{"name":"locate","platform":["linux","osx"]},{"name":"ls","platform":["common"]},{"name":"lsof","platform":["common"]},{"name":"man","platform":["common"]},{"name":"md5","platform":["osx"]},{"name":"md5sum","platform":["linux"]},{"name":"mdadm","platform":["linux"]},{"name":"mkdir","platform":["common"]},{"name":"more","platform":["common"]},{"name":"mount","platform":["common"]},{"name":"mp4box","platform":["common"]},{"name":"mtr","platform":["common"]},{"name":"mv","platform":["common"]},{"name":"mysql","platform":["common"]},{"name":"mysqldump","platform":["common"]},{"name":"nc","platform":["common"]},{"name":"netstat","platform":["linux"]},{"name":"networksetup","platform":["osx"]},{"name":"nmap","platform":["common"]},{"name":"node","platform":["common"]},{"name":"nohup","platform":["common"]},{"name":"npm","platform":["common"]},{"name":"open","platform":["osx"]},{"name":"pacman","platform":["linux"]},{"name":"passwd","platform":["common"]},{"name":"patch","platform":["common"]},{"name":"pbcopy","platform":["osx"]},{"name":"pbpaste","platform":["osx"]},{"name":"pgrep","platform":["common"]},{"name":"php","platform":["common"]},{"name":"ping","platform":["common"]},{"name":"pip","platform":["common"]},{"name":"play","platform":["common"]},{"name":"prctl","platform":["sunos"]},{"name":"prstat","platform":["sunos"]},{"name":"ps","platform":["common"]},{"name":"psql","platform":["common"]},{"name":"pushd","platform":["common"]},{"name":"pwd","platform":["common"]},{"name":"qlmanage","platform":["osx"]},{"name":"redis-cli","platform":["common"]},{"name":"rename","platform":["common"]},{"name":"rm","platform":["common"]},{"name":"rmdir","platform":["common"]},{"name":"route","platform":["osx"]},{"name":"rsync","platform":["common"]},{"name":"salt","platform":["common"]},{"name":"salt-call","platform":["common"]},{"name":"salt-key","platform":["common"]},{"name":"salt-run","platform":["common"]},{"name":"say","platform":["osx"]},{"name":"scp","platform":["common"]},{"name":"screen","platform":["common"]},{"name":"sed","platform":["common"]},{"name":"sha1sum","platform":["linux"]},{"name":"sha224sum","platform":["linux"]},{"name":"sha256sum","platform":["linux"]},{"name":"sha384sum","platform":["linux"]},{"name":"sha512sum","platform":["linux"]},{"name":"shuf","platform":["linux"]},{"name":"shutdown","platform":["linux","osx"]},{"name":"sort","platform":["common"]},{"name":"sox","platform":["common"]},{"name":"split","platform":["common"]},{"name":"srm","platform":["common"]},{"name":"ss","platform":["linux"]},{"name":"ssh","platform":["common"]},{"name":"sshfs","platform":["common"]},{"name":"strace","platform":["linux"]},{"name":"sudo","platform":["common"]},{"name":"svcadm","platform":["sunos"]},{"name":"svccfg","platform":["sunos"]},{"name":"svcs","platform":["sunos"]},{"name":"svn","platform":["common"]},{"name":"sw_vers","platform":["osx"]},{"name":"sysctl","platform":["osx"]},{"name":"system_profiler","platform":["osx"]},{"name":"systemctl","platform":["linux"]},{"name":"systemsetup","platform":["osx"]},{"name":"tail","platform":["common"]},{"name":"tar","platform":["common"]},{"name":"tcpdump","platform":["common"]},{"name":"tcpflow","platform":["linux"]},{"name":"tee","platform":["common"]},{"name":"telnet","platform":["common"]},{"name":"time","platform":["common"]},{"name":"tldr","platform":["common"]},{"name":"tmux","platform":["common"]},{"name":"top","platform":["linux","osx"]},{"name":"touch","platform":["common"]},{"name":"tr","platform":["common"]},{"name":"traceroute","platform":["common"]},{"name":"tree","platform":["common"]},{"name":"umount","platform":["common"]},{"name":"uname","platform":["common"]},{"name":"unzip","platform":["common"]},{"name":"useradd","platform":["common"]},{"name":"userdel","platform":["common"]},{"name":"usermod","platform":["common"]},{"name":"wacaw","platform":["osx"]},{"name":"wall","platform":["linux"]},{"name":"watch","platform":["linux"]},{"name":"wc","platform":["common"]},{"name":"wget","platform":["common"]},{"name":"which","platform":["common"]},{"name":"wpa_cli","platform":["linux"]},{"name":"xargs","platform":["linux"]},{"name":"xctool","platform":["osx"]},{"name":"xed","platform":["osx"]},{"name":"xsltproc","platform":["osx"]},{"name":"yes","platform":["common"]},{"name":"zbarimg","platform":["common"]},{"name":"zfs","platform":["common"]},{"name":"zip","platform":["common"]},{"name":"zpool","platform":["common"]}]} \ No newline at end of file diff --git a/pages/linux/top.md b/pages/linux/top.md new file mode 100644 index 000000000..3f7494ae4 --- /dev/null +++ b/pages/linux/top.md @@ -0,0 +1,23 @@ +# top + +> Display dynamic real-time information about running processes. + +- Start top + +`top` + +- Start top ignoring any idle or zombie processes + +`top -i` + +- Start top displaying only processes owned by given user + +`top -u {{user-name}}` + +- Run top in batch (logging) mode and update information 5 times + +`top -b -n 5` + +- Get help about interactive commands + +`?` diff --git a/pages/osx/top.md b/pages/osx/top.md new file mode 100644 index 000000000..67a9dabf9 --- /dev/null +++ b/pages/osx/top.md @@ -0,0 +1,27 @@ +# top + +> Display dynamic real-time information about running processes. + +- Start top, all options are available in the interface + +`top` + +- Start top sorting processes by internal memory size (default order - process ID) + +`top -o mem` + +- Start top sorting processes first by CPU, then by running time + +`top -o cpu -O time` + +- Start top displaying only processes owned by given user + +`top -user {{user-name}}` + +- Run top in logging (batch) mode and update information 5 times + +`top -l 5` + +- Get help about interactive commands + +`?`