linux - awk shell script help -


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

I need to know which script I will get to add to the logfile every 5 minutes.

Example: CPU; Mam;

  10.0; 1191220  

and so on, the next entry will be below

Example: CPU; Mem

  10.0; 1191220 5.0; 2229882  

Thank you in advance

First you have to write a shell The script executes loadavg and meminfo and adds output to the desired log file there. Now you can set this code again and again by typing cron . You need to add the entry to / etc / crontab in order to set up cron job. For details, you can consult man entries for cron and cronatab.

Also I think this question is more favorable for serverfault.com


Comments