[IMP] elab-monitor.sh : remove -h (human) flag to retrieve raw data
This commit is contained in:
@@ -35,42 +35,42 @@ if [[ "$SSH_ORIGINAL_COMMAND" =~ [\&\(\{\;\<\>\`\$\}] ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
disk_size() {
|
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"
|
echo "$val"
|
||||||
}
|
}
|
||||||
|
|
||||||
disk_available() {
|
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"
|
echo "$val"
|
||||||
}
|
}
|
||||||
|
|
||||||
disk_used() {
|
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"
|
echo "$val"
|
||||||
}
|
}
|
||||||
|
|
||||||
disk_used_percent() {
|
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"
|
echo "$val"
|
||||||
}
|
}
|
||||||
|
|
||||||
disk_available_percent() {
|
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"
|
echo "$val"
|
||||||
}
|
}
|
||||||
|
|
||||||
memory_size() {
|
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"
|
echo "$val"
|
||||||
}
|
}
|
||||||
|
|
||||||
memory_available() {
|
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"
|
echo "$val"
|
||||||
}
|
}
|
||||||
|
|
||||||
memory_used() {
|
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"
|
echo "$val"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user