16 Juli
Publish date: Jul 16, 2019
Last updated: Apr 22, 2020
Last updated: Apr 22, 2020
setting limits to resources
- free
- to check memory resources consumption
- crontab -l
- run periodic jobs on system
Limit memory usage for a single Linux process
How to update terminal text without repainting? How to overwrite a line
- repaint terminal
- commandline
- get/set current commandline buffer
- If commandline is called during a call to complete a given string using complete -C STRING, commandline will consider the specified string to be the current contents of the command line.
- use \r instead of \n
- ncurses
TUI APplication
- dialog
- –msgbox
- –yesno
- –infobox
- –textbox
- –inputbox
- –menu
- –guage
zenity
Terminals offer control sequences to control color, font, cursor position and more
Terminal interprets escape sequences
echo -n first sleep 1 echo -ne "\rsecond" echo for f in (seq 0 100) printf '%s\r' (string repeat -n $f -- '#') sleep 0.01s end for i in (seq 9) echo -n $i\b sleep 0.5s end for i in (seq 0 10 100) echo $i | dialog --guage "Working..." 10 35 sleep 0.5s end ls (zenity --file-selection --directory)
tracking a process in linux?
top
and htop
commands
- htop
- interactive process manager
- entire logic for gathering process data is based on the
/proc
filesystem - UI uses
ncurses
only
other solutions
- [ top + awk ] = to a graphing tool
- sysdig inspector
free
command- pipe output to python script *
Questions
- write a vue.js based terminal app?1
Footnotes
[^2]: