mirror of
https://github.com/munin-monitoring/muninlite.git
synced 2024-12-22 13:52:13 +01:00
Remove unnecessary "cat" operations
This commit is contained in:
parent
0600bbf113
commit
974b07a1af
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
config_memory() {
|
config_memory() {
|
||||||
MINFO=$(cat /proc/meminfo | sed 's/ \{1,\}/ /g;')
|
MINFO=$(sed 's/ \{1,\}/ /g;' /proc/meminfo)
|
||||||
MEMTOTAL=$(echo "$MINFO" | grep "^MemTotal:" | cut -d\ -f2)
|
MEMTOTAL=$(echo "$MINFO" | grep "^MemTotal:" | cut -d\ -f2)
|
||||||
PAGETABLES=$(echo "$MINFO" | grep "^PageTables:" | cut -d\ -f2)
|
PAGETABLES=$(echo "$MINFO" | grep "^PageTables:" | cut -d\ -f2)
|
||||||
SWAPCACHED=$(echo "$MINFO" | grep "^SwapCached:" | cut -d\ -f2)
|
SWAPCACHED=$(echo "$MINFO" | grep "^SwapCached:" | cut -d\ -f2)
|
||||||
|
@ -109,7 +109,7 @@ config_memory() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
fetch_memory() {
|
fetch_memory() {
|
||||||
MINFO=$(cat /proc/meminfo | sed 's/ \{1,\}/ /g;')
|
MINFO=$(sed 's/ \{1,\}/ /g;' /proc/meminfo)
|
||||||
MEMTOTAL=$(echo "$MINFO" | grep "^MemTotal:" | cut -d\ -f2)
|
MEMTOTAL=$(echo "$MINFO" | grep "^MemTotal:" | cut -d\ -f2)
|
||||||
MEMFREE=$(echo "$MINFO" | grep "^MemFree:" | cut -d\ -f2)
|
MEMFREE=$(echo "$MINFO" | grep "^MemFree:" | cut -d\ -f2)
|
||||||
BUFFERS=$(echo "$MINFO" | grep "^Buffers:" | cut -d\ -f2)
|
BUFFERS=$(echo "$MINFO" | grep "^Buffers:" | cut -d\ -f2)
|
||||||
|
|
Loading…
Reference in a new issue