diff --git a/memlog/GNUmakefile b/memlog/GNUmakefile new file mode 100644 index 0000000..063dbba --- /dev/null +++ b/memlog/GNUmakefile @@ -0,0 +1,12 @@ +include GNUmakevars + +BINDIR=/usr/local/sbin + +include GNUmakerules + +memlog: + +install: $(BINDIR)/memlog + +clean: + : diff --git a/memlog/memlog b/memlog/memlog new file mode 100644 index 0000000..3fc48b6 --- /dev/null +++ b/memlog/memlog @@ -0,0 +1,7 @@ +#!/bin/sh +now=`/bin/date '+%Y-%m-%dT%H:%M:%S'` +egrep -i '^[a-z]+: +[0-9]+ kB$' /proc/meminfo |\ +while read a +do + echo "$now $a" +done >> /var/log/memlog