vtop takes more of a graphical approach to top, while concentrating more on simplicity. It displays CPU and Memory usage live charts, as well as a running process list. It runs on Node.js and can be easily installed with npm install -g vtop.
- Mouse clicks
- Live chart (CPU, memory)
- Process list
gtop takes the graphical interface of vtop to another level. Just like vtop, it also displays a live chart of both CPU and memory, however gtop adds a network live chart to the list, and pie charts for both memory and swap, as well as storage usage.
gtop also runs on Node.js, and can easily be installed with npm install gtop -g.
- Live chart (CPU, memory/swap, network)
- Pie chart (memory, swap, disk usage)
- Process list
While s-tui is not a process monitoring utility, it displays great information about your process status. It’s python based and uses little resource. You can easily install it with sudo pip install s-tui.
- Processor info
- Live charts (CPU freq, utilization, temperature and power usage)
- Built-in CPU stress testing
So you have a Bash script that you want to troubleshoot, but you want to send stdout to a file, and stderr to another. Here’s a solution.
For example, I like to use Bash’s color to display failure or success on checks, and echo’s removal of new lines (echo -e "Wait for it...\c ") to wait for checks. For example, the screenshot below shows a script that check each step and report back.
Errors are displayed in red, and success in green, and this same output is sent to the stdout and to a log file as well.
Now I want to get error messages in a separate log file, so I can go back to my original log and match the time where it failed, with additional verbose from Bash’s xtrace.
The solution is very simple… I can just add the lines below to the top of my script:
The first line setups my debug log, the second redirects stderr to my debug log, and the third enables xtrace (same as bash -x [script]).
Note that doing this will disable any errors from being show in stdout.