From: Nicolas Boisselier Date: Thu, 1 Dec 2016 13:49:09 +0000 (+0100) Subject: sys.sh X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=047833653486ac769a789d50d94ec76b2102d505;p=nb.git sys.sh --- 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() {