5 Add better description for u,d,l,r buttons
source | link

I couldn't find a live, text-only CPU chart either. So, I made one.

Here's a link to my github repo: https://github.com/rigel314/ttysys

Try it out if you like, and please report any errors on my repo's issues page.

EDIT:

Screenshot:

ttysys example

Install:

You will have to compile it from source. I provided a simple makefile that calls gcc.

You can run the program using make then ./build/target/ttysys Alternatively, you can run make install followed by ttysys since it is in your path now.

Usage:

$ ttysys [<sequence>]

sequence can consist of any number of the following characters:

  • ? - Displays a help window.
  • h - Split current window horizontally.
  • v - Split current window vertically.
  • c - Close current window.
  • Tab - Move to next window in order of creation.
  • Arrow Keys - Move to next window on screen in direction pressed.
  • Numbers 0 - 9 - Select a data source for a window.
    • 0 will set the data source to an overview, and 1 - 9 set it to a specific core.
  • g - Toggle grid for selected window.
  • e - Toggle value display in current window's title.
  • t - Toggle display of current window's title bar.
  • l - Toggle display of current window's label sidebar.
  • q - Quit this program.
  • u - Same as pressing up arrow key. Move to window above current one.
  • d - Same as pressing down arrow key. Move to window below current one.
  • l - Same as pressing left arrow key. Move to window left of current one.
  • r - Same as pressing right arrow key. Move to window right of current one.

These same buttons will control the program while it is running.

How it works:

It works by reading the first few lines in /proc/stat that begin with cpu.
man 5 proc explained the meaning of contents of /proc/stat.
These lines tell you how much time each CPU spent in different states. The sum of each line is the total time spent for each CPU. I read this file twice with a second in between. Then, I subtract the two totals to have the total CPU time spent during my sleep(). Now, I add the user and system numbers together and divide by my difference. Finally, it's just a matter of displaying it nicely.

I couldn't find a live, text-only CPU chart either. So, I made one.

Here's a link to my github repo: https://github.com/rigel314/ttysys

Try it out if you like, and please report any errors on my repo's issues page.

EDIT:

Screenshot:

ttysys example

Install:

You will have to compile it from source. I provided a simple makefile that calls gcc.

You can run the program using make then ./build/target/ttysys Alternatively, you can run make install followed by ttysys since it is in your path now.

Usage:

$ ttysys [<sequence>]

sequence can consist of any number of the following characters:

  • ? - Displays a help window.
  • h - Split current window horizontally.
  • v - Split current window vertically.
  • c - Close current window.
  • Tab - Move to next window in order of creation.
  • Arrow Keys - Move to next window on screen in direction pressed.
  • Numbers 0 - 9 - Select a data source for a window.
    • 0 will set the data source to an overview, and 1 - 9 set it to a specific core.
  • g - Toggle grid for selected window.
  • e - Toggle value display in current window's title.
  • t - Toggle display of current window's title bar.
  • l - Toggle display of current window's label sidebar.
  • q - Quit this program.
  • u - Same as pressing up arrow key
  • d - Same as pressing down arrow key
  • l - Same as pressing left arrow key
  • r - Same as pressing right arrow key

These same buttons will control the program while it is running.

How it works:

It works by reading the first few lines in /proc/stat that begin with cpu.
man 5 proc explained the meaning of contents of /proc/stat.
These lines tell you how much time each CPU spent in different states. The sum of each line is the total time spent for each CPU. I read this file twice with a second in between. Then, I subtract the two totals to have the total CPU time spent during my sleep(). Now, I add the user and system numbers together and divide by my difference. Finally, it's just a matter of displaying it nicely.

I couldn't find a live, text-only CPU chart either. So, I made one.

Here's a link to my github repo: https://github.com/rigel314/ttysys

Try it out if you like, and please report any errors on my repo's issues page.

EDIT:

Screenshot:

ttysys example

Install:

You will have to compile it from source. I provided a simple makefile that calls gcc.

You can run the program using make then ./build/target/ttysys Alternatively, you can run make install followed by ttysys since it is in your path now.

Usage:

$ ttysys [<sequence>]

sequence can consist of any number of the following characters:

  • ? - Displays a help window.
  • h - Split current window horizontally.
  • v - Split current window vertically.
  • c - Close current window.
  • Tab - Move to next window in order of creation.
  • Arrow Keys - Move to next window on screen in direction pressed.
  • Numbers 0 - 9 - Select a data source for a window.
    • 0 will set the data source to an overview, and 1 - 9 set it to a specific core.
  • g - Toggle grid for selected window.
  • e - Toggle value display in current window's title.
  • t - Toggle display of current window's title bar.
  • l - Toggle display of current window's label sidebar.
  • q - Quit this program.
  • u - Same as pressing up arrow key. Move to window above current one.
  • d - Same as pressing down arrow key. Move to window below current one.
  • l - Same as pressing left arrow key. Move to window left of current one.
  • r - Same as pressing right arrow key. Move to window right of current one.

These same buttons will control the program while it is running.

How it works:

It works by reading the first few lines in /proc/stat that begin with cpu.
man 5 proc explained the meaning of contents of /proc/stat.
These lines tell you how much time each CPU spent in different states. The sum of each line is the total time spent for each CPU. I read this file twice with a second in between. Then, I subtract the two totals to have the total CPU time spent during my sleep(). Now, I add the user and system numbers together and divide by my difference. Finally, it's just a matter of displaying it nicely.

4 Add undocumented arrow key aliases
source | link

I couldn't find a live, text-only CPU chart either. So, I made one.

Here's a link to my github repo: https://github.com/rigel314/ttysys

Try it out if you like, and please report any errors on my repo's issues page.

EDIT:

Screenshot:

ttysys example

Install:

You will have to compile it from source. I provided a simple makefile that calls gcc.

You can run the program using make then ./build/target/ttysys Alternatively, you can run make install followed by ttysys since it is in your path now.

Usage:

$ ttysys [<sequence>]

sequence can consist of any number of the following characters:

  • ? - Displays a help window.
  • h - Split current window horizontally.
  • v - Split current window vertically.
  • uc - Un-split Close current window.
  • Tab - Move to next window in order of creation.
  • Arrow Keys - Move to next window on screen in direction pressed.
  • Numbers 0 - 9 - Select a data source for a window.
    • 0 will set the data source to an overview, and 1 - 9 set it to a specific core.
  • g - Toggle grid for selected window.
  • e - Toggle value display in current window's title.
  • t - Toggle display of current window's title bar.
  • l - Toggle display of current window's label sidebar.
  • q - Quit this program.
  • u - Same as pressing up arrow key
  • d - Same as pressing down arrow key
  • l - Same as pressing left arrow key
  • r - Same as pressing right arrow key

These same buttons will control the program while it is running.

How it works:

It works by reading the first few lines in /proc/stat that begin with cpu.
man 5 proc explained the meaning of contents of /proc/stat.
These lines tell you how much time each CPU spent in different states. The sum of each line is the total time spent for each CPU. I read this file twice with a second in between. Then, I subtract the two totals to have the total CPU time spent during my sleep(). Now, I add the user and system numbers together and divide by my difference. Finally, it's just a matter of displaying it nicely.

I couldn't find a live, text-only CPU chart either. So, I made one.

Here's a link to my github repo: https://github.com/rigel314/ttysys

Try it out if you like, and please report any errors on my repo's issues page.

EDIT:

Screenshot:

ttysys example

Install:

You will have to compile it from source. I provided a simple makefile that calls gcc.

You can run the program using make then ./build/target/ttysys Alternatively, you can run make install followed by ttysys since it is in your path now.

Usage:

  • ? - Displays a help window.
  • h - Split current window horizontally.
  • v - Split current window vertically.
  • u - Un-split current window.
  • Tab - Move to next window in order of creation.
  • Arrow Keys - Move to next window on screen in direction pressed.
  • Numbers 0 - 9 - Select a data source for a window.
    • 0 will set the data source to an overview, and 1 - 9 set it to a specific core.
  • g - Toggle grid for selected window.
  • e - Toggle value display in current window's title.
  • t - Toggle display of current window's title bar.
  • l - Toggle display of current window's label sidebar.
  • q - Quit this program.

How it works:

It works by reading the first few lines in /proc/stat that begin with cpu.
man 5 proc explained the meaning of contents of /proc/stat.
These lines tell you how much time each CPU spent in different states. The sum of each line is the total time spent for each CPU. I read this file twice with a second in between. Then, I subtract the two totals to have the total CPU time spent during my sleep(). Now, I add the user and system numbers together and divide by my difference. Finally, it's just a matter of displaying it nicely.

I couldn't find a live, text-only CPU chart either. So, I made one.

Here's a link to my github repo: https://github.com/rigel314/ttysys

Try it out if you like, and please report any errors on my repo's issues page.

EDIT:

Screenshot:

ttysys example

Install:

You will have to compile it from source. I provided a simple makefile that calls gcc.

You can run the program using make then ./build/target/ttysys Alternatively, you can run make install followed by ttysys since it is in your path now.

Usage:

$ ttysys [<sequence>]

sequence can consist of any number of the following characters:

  • ? - Displays a help window.
  • h - Split current window horizontally.
  • v - Split current window vertically.
  • c - Close current window.
  • Tab - Move to next window in order of creation.
  • Arrow Keys - Move to next window on screen in direction pressed.
  • Numbers 0 - 9 - Select a data source for a window.
    • 0 will set the data source to an overview, and 1 - 9 set it to a specific core.
  • g - Toggle grid for selected window.
  • e - Toggle value display in current window's title.
  • t - Toggle display of current window's title bar.
  • l - Toggle display of current window's label sidebar.
  • q - Quit this program.
  • u - Same as pressing up arrow key
  • d - Same as pressing down arrow key
  • l - Same as pressing left arrow key
  • r - Same as pressing right arrow key

These same buttons will control the program while it is running.

How it works:

It works by reading the first few lines in /proc/stat that begin with cpu.
man 5 proc explained the meaning of contents of /proc/stat.
These lines tell you how much time each CPU spent in different states. The sum of each line is the total time spent for each CPU. I read this file twice with a second in between. Then, I subtract the two totals to have the total CPU time spent during my sleep(). Now, I add the user and system numbers together and divide by my difference. Finally, it's just a matter of displaying it nicely.

3 Updated answer to reflect new version of the tool.
source | link

I couldn't find a live, text-only CPU chart either. So, I made one.

Here's a link to my github repo: https://github.com/rigel314/ttyloadhttps://github.com/rigel314/ttysys

Try it out if you like, and please report any errors on my repo's issuesissues page.

EDIT:

Screenshot:

ttyload examplettysys example

Install:

You will have to compile it from source. I provided a simple makefile that calls gcc.

You can run the program using make then ./build/target/ttyloadttysys Alternatively, you can run make install followed by ttyloadttysys since it is in your path now.

Usage:

Right now the only thing you can do once the program is running is press 'q' or enter to quit.

  • ? - Displays a help window.
  • h - Split current window horizontally.
  • v - Split current window vertically.
  • u - Un-split current window.
  • Tab - Move to next window in order of creation.
  • Arrow Keys - Move to next window on screen in direction pressed.
  • Numbers 0 - 9 - Select a data source for a window.
    • 0 will set the data source to an overview, and 1 - 9 set it to a specific core.
  • g - Toggle grid for selected window.
  • e - Toggle value display in current window's title.
  • t - Toggle display of current window's title bar.
  • l - Toggle display of current window's label sidebar.
  • q - Quit this program.

How it works:

It works by reading the first few lines in /proc/stat that begin with cpu.
man 5 proc explained the meaning of contents of /proc/stat.
These lines tell you how much time each CPU spent in different states. The sum of each line is the total time spent for each CPU. I read this file twice with a second in between. Then, I subtract the two totals to have the total CPU time spent during my sleep(). Now, I add the user and system numbers together and divide by my difference. Finally, it's just a matter of displaying it nicely.

I couldn't find a live, text-only CPU chart either. So, I made one.

Here's a link to my github repo: https://github.com/rigel314/ttyload

Try it out if you like, and please report any errors on my repo's issues page.

EDIT:

Screenshot:

ttyload example

Install:

You will have to compile it from source. I provided a simple makefile that calls gcc.

You can run the program using make then ./build/target/ttyload Alternatively, you can run make install followed by ttyload since it is in your path now.

Usage:

Right now the only thing you can do once the program is running is press 'q' or enter to quit.

How it works:

It works by reading the first few lines in /proc/stat that begin with cpu.
man 5 proc explained the meaning of contents of /proc/stat.
These lines tell you how much time each CPU spent in different states. The sum of each line is the total time spent for each CPU. I read this file twice with a second in between. Then, I subtract the two totals to have the total CPU time spent during my sleep(). Now, I add the user and system numbers together and divide by my difference. Finally, it's just a matter of displaying it nicely.

I couldn't find a live, text-only CPU chart either. So, I made one.

Here's a link to my github repo: https://github.com/rigel314/ttysys

Try it out if you like, and please report any errors on my repo's issues page.

EDIT:

Screenshot:

ttysys example

Install:

You will have to compile it from source. I provided a simple makefile that calls gcc.

You can run the program using make then ./build/target/ttysys Alternatively, you can run make install followed by ttysys since it is in your path now.

Usage:

  • ? - Displays a help window.
  • h - Split current window horizontally.
  • v - Split current window vertically.
  • u - Un-split current window.
  • Tab - Move to next window in order of creation.
  • Arrow Keys - Move to next window on screen in direction pressed.
  • Numbers 0 - 9 - Select a data source for a window.
    • 0 will set the data source to an overview, and 1 - 9 set it to a specific core.
  • g - Toggle grid for selected window.
  • e - Toggle value display in current window's title.
  • t - Toggle display of current window's title bar.
  • l - Toggle display of current window's label sidebar.
  • q - Quit this program.

How it works:

It works by reading the first few lines in /proc/stat that begin with cpu.
man 5 proc explained the meaning of contents of /proc/stat.
These lines tell you how much time each CPU spent in different states. The sum of each line is the total time spent for each CPU. I read this file twice with a second in between. Then, I subtract the two totals to have the total CPU time spent during my sleep(). Now, I add the user and system numbers together and divide by my difference. Finally, it's just a matter of displaying it nicely.

2 Added fixes suggested by slm.
source | link
1
source | link