Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Python script to check the RAM status continously  (Read 1072 times)

0 Members and 1 Guest are viewing this topic.

vichithrakumart

  • Guest
Python script to check the RAM status continously
« 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)