From 802b722726f754bb66847c88149dab4d80bf3195 Mon Sep 17 00:00:00 2001 From: Boris Gallet Date: Tue, 23 Apr 2024 11:08:38 +0200 Subject: [PATCH] [IMP] elab-monitor.sh : remove -h (human) flag to retrieve raw data --- elab-monitor.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/elab-monitor.sh b/elab-monitor.sh index 03caa4a..576bb5f 100644 --- a/elab-monitor.sh +++ b/elab-monitor.sh @@ -35,42 +35,42 @@ if [[ "$SSH_ORIGINAL_COMMAND" =~ [\&\(\{\;\<\>\`\$\}] ]]; then fi disk_size() { - val=$(df -h | awk '/\/$/ {print $2}') # Retrieves the total disk size of the root filesystem + val=$(df | awk '/\/$/ {print $2}') # Retrieves the total disk size of the root filesystem echo "$val" } disk_available() { - val=$(df -h | awk '/\/$/ {print $4}') # Retrieves the available disk space of the root filesystem + val=$(df | awk '/\/$/ {print $4}') # Retrieves the available disk space of the root filesystem echo "$val" } disk_used() { - val=$(df -h | awk '/\/$/ {print $3}') # Retrieves the used disk space of the root filesystem + val=$(df | awk '/\/$/ {print $3}') # Retrieves the used disk space of the root filesystem echo "$val" } disk_used_percent() { - val=$(df -h | awk '/\/$/ {print $5}') # Retrieves the percentage of used disk space of the root filesystem + val=$(df | awk '/\/$/ {print $5}') # Retrieves the percentage of used disk space of the root filesystem echo "$val" } disk_available_percent() { - val=$(df -h | awk '/\/$/ {print $4}') # Retrieves the percentage of available disk space of the root filesystem + val=$(df | awk '/\/$/ {print $4}') # Retrieves the percentage of available disk space of the root filesystem echo "$val" } memory_size() { - val=$(free -h | awk '/Mem:/ {print $2}') # Retrieves the total memory size + val=$(free | awk '/Mem:/ {print $2}') # Retrieves the total memory size echo "$val" } memory_available() { - val=$(free -h | awk '/Mem:/ {print $7}') # Retrieves the available memory + val=$(free | awk '/Mem:/ {print $7}') # Retrieves the available memory echo "$val" } memory_used() { - val=$(free -h | awk '/Mem:/ {print $3}') # Retrieves the used memory + val=$(free | awk '/Mem:/ {print $3}') # Retrieves the used memory echo "$val" }