#!/bin/sh echo -n "^c#b8bb26^ " case $(hostname -s) in mother|po-rbo) free | sed -n '2p' | awk '{print int(100 - ($7 * 100 / $2))"%"}' ;; mars) sysctl -n hw.physmem \ hw.pagesize \ vm.stats.vm.v_inactive_count \ vm.stats.vm.v_free_count \ vm.stats.vm.v_cache_count | xargs | awk '{printf ("%2.2fG/%2.2fG\n", ($1 / (1024 ^ 3)) - (($3 + $4 + $5) * $2 / (1024 ^ 3)), ($1 / (1024 ^ 3)))}' ;; esac