From 047833653486ac769a789d50d94ec76b2102d505 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 1 Dec 2016 14:49:09 +0100 Subject: [PATCH] sys.sh --- etc/profile.d/sys.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/etc/profile.d/sys.sh b/etc/profile.d/sys.sh index 9e5a2415..5145827a 100644 --- a/etc/profile.d/sys.sh +++ b/etc/profile.d/sys.sh @@ -1,10 +1,17 @@ +case "$OSTYPE" in + linux*) [ 1 ] ;; + *) return ;; +esac + sys_is_vm() { grep -q ^flags.*\ hypervisor /proc/cpuinfo && echo "This machine is a VM" } sys_watch() { + local opt="$@" + [ -z "$opt" ] && opt="-d" export -f sys_activity - watch -d bash -c "sys_activity" + watch --no-title $opt bash -c "sys_activity" } sys_activity() { -- 2.47.3