Thursday, July 17, 2014

Introducing vtop — A Terminal Activity Monitor in Node.js

Command-line tools like “top” make it difficult to see CPU usage across multi-process applications (like Apache and Chrome), spikes over time, and memory usage.
That’s why we created vtop.
Vtop is a free and open source activity monitor for the command line. It’s written in node.js and can be easily extended. Why not check out the source code?

How to install

If you haven’t already got Node.js, then download that first, then run:
sudo npm install -g vtop

Running

This is pretty simple too.
vtop

Keyboard shortcuts

  • Press ‘u’ to update to the latest version of vtop.
  • Arrow up or k to move up the process list.
  • Arrow down or j to move down.
  • g to go to the top of the process list.
  • G to move to the end of the list.
  • dd to kill all the processes in that group

FAQs

How does it work?

It uses Unicode braille characters to draw CPU and Memory charts, helping you visualise spikes. We also group processes with the same name together.

I think the CPU % is coming out wrong.

We calculate the CPU percentage as a total of your overall system power. 100% is all cores and HyperThreads maxed out. This is different to how Apple Activity monitor works.

Can I change the color scheme?

Sure, just do:
vtop --theme wizard
This loads the theme file in themes/ with the same name. Make your own and send me a Pull Request
You could add this to your aliases if you’d like to use it always.
alias vtop="vtop --theme brew"

What about measuring server req/s, log entries, etc etc?

Yeah that’s on the list. Feel free to send a pull request though. Check out the sensors/ folder.

What license is this under?

MIT – do what you like with it.

I have another problem that’s not answered here

Please open a ticket and we’ll take a look for you.

Interested in working at Parallax?

We have a front-end developer position open at the moment

Related Posts:

  • Clear memory linuxLệnh dùng clear memory cho linux. sync; echo 3 > /proc/sys/vm/drop_caches free -m … Read More
  • File Permission trong Linux Một trong những thành phần chính của hệ điều hành Linux là hệ thống quyền hạn truy cập (permission) áp dụng cho mọi đối tượng (file, thư mục, link…). Hệ thống này đóng 1 vai trò quan trọng trong việc đem lại mức an ninh cao … Read More
  • Lệnh dd -dd dùng để copy các phân vùng và đĩa cứng… dd đọc theo từng block, theo mật định là 512 bytes.Dạng sử dụng:dd if="source" of="target" bs="byte size" conv="conversion" Sử dụng dd -copy đĩa cứng:# dd if=/dev/hda of=/dev/hdc… Read More
  • Các lệnh thông dụng xem thông tin phần cứng trên HĐH Linux Đầu tiên là lệnh xem RAM [root@localhost ~]#top Tasks: 508 total, 1 running, 507 sleeping, 0 stopped, 0 zombie Cpu(s): 4.7%us, 0.3%sy, 0.0%ni, 94.6%id, 0.4%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 8289408k total, 3601696k used, 46877… Read More
  • Hiển thị tiến trình trong hệ thống Linux Một trong những công việc cần thiết khi quản trị hệ thống Linux đó là kiểm soát các tiến trình hiện đang chạy. Khi đã biết được những tiến trình nào đang chạy bạn có thể tắt những tiến trình gây giảm tốc độ của hệ thống. Ng… Read More