Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yakaviuk/7596c58e805503fa161474a50cba94d9 to your computer and use it in GitHub Desktop.
Save yakaviuk/7596c58e805503fa161474a50cba94d9 to your computer and use it in GitHub Desktop.
bash script for unix
#!/bin/bash
a=`free -m | grep Mem | awk '{print $3}'`
b=`date | awk '{print $2,$3,$4}'`
c=`cat /proc/loadavg`
echo $a $b >> /home/user/ram_monitoring
echo $b $c >> /home/user/cpu_monitoring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment