para funcionar en suse tambien

master
fanta 3 years ago
parent 9eafafd134
commit f3b7a0c2f5

11
t10

@ -3,14 +3,13 @@ export LC_ALL=C bash
tHost="$(hostname)"
tTime="$(date +"%d/%m/%Y a las %H:%M:%S")"
tMemTotal="$(free -h | grep "Mem:" | awk '{print $2}')"
tMemUsed="$(free -h | grep "Mem:" | awk '{print $3}')"
tMemFree="$(free -h | grep "Mem:" | awk '{print $4}')"
tUptime="$(uptime -p)"
tMemTotal="$(free -m | grep "Mem:" | awk '{print $2}')"
tMemUsed="$(free -m | grep "Mem:" | awk '{print $3}')"
tMemFree="$(free -m | grep "Mem:" | awk '{print $4}')"
tLoadAverage="$(uptime | awk '{print $8,$9,$10}')"
echo -e "\n$tHost - $tTime - Uptime: $tUptime"
echo -e "RAM: $tMemUsed usados de $tMemTotal totales ($tMemFree libres)\nCPU Load Average: $tLoadAverage\n\n[+] Listado de Procesos top10 consumo de RAM:\n"
echo -e "\n$tHost - $tTime"
echo -e "RAM: $tMemUsed M usados de $tMemTotal M totales ($tMemFree M libres)\nCPU Load Average: $tLoadAverage\n\n[+] Listado de Procesos top10 consumo de RAM:\n"
ps -A --sort=-rss --format pid,user,pmem,rss,comm | head -10
echo -e "\nPor tanto el proceso en el top1 consumo RAM es:\n"
ps -A --sort=-rss --format pid,user,pmem,rss,command | head -2

Loading…
Cancel
Save