views:

75

answers:

1

Hi

i have the output of cat /proc/loadavg and /proc/meminfo MemFree: 1191220 kB

i need a to know who will i get a script to get then added in a logfile every 5 mins.

eg: CPU; Mem;

10.0;   1191220

and so on so the next entry will be below that

eg: CPU; Mem

10.0;      1191220
5.0;        2229882

Thanks in advance

A: 

First you will need to write a shell script which execute loadavg and meminfo and add there output into your desired log file. Now you can get this script repeatedly executed by cron by setting up a cron task. To setup cron task you will need to add entry into /etc/crontab. For details you can consult man entries for cron and crontab.

Also I think this questions is more suited to serverfault.com

binW