Admin-Ahead Community

Linux => General Linux => Topic started by: vichithrakumart on February 17, 2018, 01:16:10 am

Title: Python script to check the RAM status continously
Post by: vichithrakumart on February 17, 2018, 01:16:10 am
About the script:
------------------------------------------
This script is helpful when we need to check the RAM status continuously.  It will show the ram status in 2 -second interval.

Script:

!/usr/bin/env python
#RAM STATUS CHECKER
import sys
import subprocess
import time
starttime=time.time()
while True:
        print "----------RAM STATUS------------"
        subprocess.call(["free","-m"])
        time.sleep(2)