Results 1 to 6 of 6

Thread: Clear Memory Buffer using script in Linux

  1. #1
    Join Date
    Nov 2009
    Posts
    39

    Clear Memory Buffer using script in Linux

    Hello sir !

    I have very simple question in my mind related to scripting in Linux.I am using oracle database and need to clear the memory buffer after specified interval.would you tell me which command is being used to clear the buffer memory.I want to specify a created script which contains this code and get execute automatically when the buffer size reached at its maximum.How would I do it .
    Last edited by Ainsley; 16-02-2010 at 04:47 PM.

  2. #2
    Join Date
    Apr 2008
    Posts
    3,295

    Clearing Memory Buffer

    Clearing Memory Buffer

    The Linux provides a good memory management features with the cache memory feature.If you have more space of RAM and getting very slow processing during start up of database.Then it may be happen,you wouldn't configure the cache memory and the cache are being stored on the RAM and the startup files are also loaded on RAM.

    In this case,the RAM get failed to execute processes at proper time.You can clear the occupied memory buffers using the following command :

    Code:
    sync; echo 3 > /proc/sys/vm/drop_caches

  3. #3
    Join Date
    Nov 2005
    Posts
    3,026

    Setting time interval using crontab

    Setting time interval using crontab:

    If you want to use the command at proper specified time,you can do it using crontab utility of linux which is very easily to use.You have to specify the exact time and date of execution.The crontab utility is used to execute job according to time interval.To perform a job in crontab is followed by this procedure,You need to edit the crontab file using the below command :
    $ crontab -e
    The syntax of crontab would be in this format

    1 2 3 4 5 /path/to/command arg1 arg2
    where 1:Minute,2: Hours (0-23),3: Day (0-31),4: Month (0-12),5: Day of the week(0-7) and next follow the command subscriptions

    To perform the job,you need follow this way of time interval according to set up the job.

  4. #4
    Join Date
    May 2008
    Posts
    2,680

    Clear Memory Buffer using crontab job

    Clear Memory Buffer using crontab job :

    The procedure of clearing memory buffer,you can use crontab utility with time interval. An example is given in which I am going to set the time interval of executing the command permanently.

    Code:
    15 14 1 * * echo 3 > /proc/sys/vm/drop_caches
    This statement in the crontab file would be Run at 2:15pm on the first of every month means the corresponding command would execute automatically to clear the buffer at specified time.

  5. #5
    Dr. V Guest

    Creating basic script in linux

    Creating basic script in linux :

    The shell script is a program which is written in shell programming language and executed by a shell process.It is useful for performing automatic task with the reference of your file.

    I am going to create a script in the following procedure :

    open a text editor (but not a word processor) like gedit or vi and type some shell contents which will print "Hello world ".

    Code:
     #!/bin/bash
        clear
        echo "Good morning, world."
    Save this file with the .sh extension and execute it on the prompt with the path specified and change the permission setting otherwise cause some error.

  6. #6
    Join Date
    Jan 2008
    Posts
    3,388

    Clear Memory Buffer using script in Linux

    Clear Memory Buffer using script

    You can specify the name of file in the command section on crontab job list.specify the time and locate the path of file which you want to execute.
    Create a script and write the code of clearing buffer memory and put it with the time as an argument.

    The code would be as follows :

    15 14 1 * * <Path of the script file name>

Similar Threads

  1. Mouse wheel volume control and video buffer in Linux VLC
    By Montana in forum Windows Software
    Replies: 8
    Last Post: 26-09-2010, 02:59 AM
  2. Replies: 3
    Last Post: 10-05-2010, 12:14 AM
  3. Setting depth buffer (z buffer) size (16bit / 24bit)
    By NewComer in forum Monitor & Video Cards
    Replies: 4
    Last Post: 08-04-2010, 05:47 AM
  4. How To Clear Your Computer Memory
    By Jannat in forum Tips & Tweaks
    Replies: 3
    Last Post: 15-06-2009, 10:47 PM
  5. How do I increase my Buffer Cache Memory
    By John John in forum Windows XP Support
    Replies: 1
    Last Post: 06-07-2007, 06:13 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,568,142.42584 seconds with 16 queries