Procmon
Procmon.sh es una herramienta para ver procesos o tareas en segundo plano en tiempo real.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# Regular Colors
Black='\033[0;30m' # Black
Red='\033[0;31m' # Red
Green='\033[0;32m' # Green
Yellow='\033[0;33m' # Yellow
Blue='\033[0;34m' # Blue
Purple='\033[0;35m' # Purple
Cyan='\033[0;36m' # Cyan
White='\033[0;37m' # White
Gray='\033[1;30m' # Gray Light
GrayL='\e[37m' # Gray
EndC="\033[0m\e[0m" # End colour
echo
echo -e "${Blue} ┏━┓┏━┓┏━┓┏━╸┏┳┓┏━┓┏┓╻ ${EndC}"
echo -e "${Blue} ┣━┛┣┳┛┃ ┃┃ ┃┃┃┃ ┃┃┗┫ ${EndC}"
echo -e "${Blue} ╹ ╹┗╸┗━┛┗━╸╹ ╹┗━┛╹ ╹ ${EndC}"
echo
echo -e "${Blue}┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"
echo -e "┃ ${Cyan}Monitoreo de Procesos${Blue} ┃"
echo -e "┗━━━━━━━━━━━━━━━━━━━━━━━━━━━┛${EndC}"
# Ctrl+C
function ctrl_c(){
echo -e "\n\n${Red}[!] Saliendo ...${EndC}\n"
tput cnorm; exit 1
}
trap ctrl_c SIGINT
old_process=$(ps -eo user,command)
tput civis
while true; do
new_process=$(ps -eo user,command)
diff --color=always <(echo -e "$old_process") <(echo -e "$new_process") | grep "[\>\<]" | grep -vE "command|kworker|procmon"
old_process=$new_process
done
This post is licensed under CC BY 4.0 by the author.