#!/bin/bash
# ------------------------------------------------------------------------------
# Copyright (c) 2011-2016 SUSE Linux GmbH, Nuernberg, Germany.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, contact SUSE Linux GmbH.
#
# ------------------------------------------------------------------------------
# meminfolog
#	log the meminfo with timestamp
# Author: L.Pinne.
# Version: 0.1 2011-10-21

D=$(date +"%F %T")
L=${1:-"/var/log/meminfo.log"}

cat /proc/meminfo | while read; do
	echo $D: $REPLY
done >>$L
#
