aboutsummaryrefslogtreecommitdiff
path: root/modules/uptime
diff options
context:
space:
mode:
authorBaitinq <30861839+Baitinq@users.noreply.github.com>2020-10-20 11:08:47 +0100
committerGitHub <noreply@github.com>2020-10-20 11:08:47 +0100
commit71f3fd8a776208df0787976e0be720ee8cfe0cf8 (patch)
treee4b71d79b0a24b12002a07214399d7e032ce0dbd /modules/uptime
parent8f1feacf875ba299fa415ab6927320409359b0fd (diff)
parent10453b8910890d90055ecf03567f950232710684 (diff)
Merge pull request #18 from Baitinq/master
Added ram percentage module
Diffstat (limited to 'modules/uptime')
-rwxr-xr-xmodules/uptime13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/uptime b/modules/uptime
new file mode 100755
index 0000000..2c771d4
--- /dev/null
+++ b/modules/uptime
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# Prints the total ram and used ram in Mb
+
+PREFIX=''
+
+get_uptime()
+{
+ UPTIME=$(uptime | sed 's/.*up \([^,]*\), .*/\1/')
+ echo "$PREFIX$UPTIME"
+}
+
+get_uptime