2021-11-04 18:23:33
This commit is contained in:
Binary file not shown.
@@ -6,7 +6,7 @@
|
||||
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2021/11/04 12:36:53 by gbaconni #+# #+# #
|
||||
# Updated: 2021/11/04 18:21:35 by gbaconni ### lausanne.ch #
|
||||
# Updated: 2021/11/04 18:23:28 by gbaconni ### lausanne.ch #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
@@ -31,12 +31,12 @@ ft_memory ()
|
||||
ft_disk ()
|
||||
{
|
||||
df --total -Bm -T -l -x tmpfs -x devtmpfs \
|
||||
| awk '/^total/ { total=int($3); used=int($4); pcent=int($6) } END { printf "#Disk Usage: %d/%dGb (%.2f%%)\n", used, total / 1000, pcent; }'
|
||||
| awk '/^total/ { total=int($3); used=int($4); pcent=int($6) } END { printf "#Disk Usage: %d/%dGb (%.0f%%)\n", used, total / 1000, pcent; }'
|
||||
}
|
||||
|
||||
ft_load ()
|
||||
{
|
||||
top -b -n 1 | awk '/^%Cpu/ { usage=$2+$4; } END {printf "#CPU load: %d%%\n", usage; }'
|
||||
top -b -n 1 | awk '/^%Cpu/ { usage=$2+$4; } END {printf "#CPU load: %.1f%%\n", usage; }'
|
||||
}
|
||||
|
||||
ft_lastboot ()
|
||||
|
||||
Reference in New Issue
Block a user