Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
vms:webdev:apache [2015/08/17 23:56] admin [Create the Shared www Folders] |
vms:webdev:apache [2017/03/31 15:13] (current) admin ↷ Links adapted because of a move operation |
||
|---|---|---|---|
| Line 242: | Line 242: | ||
| </code> | </code> | ||
| - | You need to install the VirtualBox Guest Additions, see the [[vms:django#install_virtualbox_guest_additions| Install VirtualBox Guest Additions]] section on this wiki. | + | You need to install the VirtualBox Guest Additions, see the [[vms:python:django#install_virtualbox_guest_additions| Install VirtualBox Guest Additions]] section on this wiki. |
| </WRAP> | </WRAP> | ||
| Line 552: | Line 552: | ||
| </code> | </code> | ||
| - | We could also have a cron script running all the time, avoiding the need of the manual launch of the //watch// command. | + | We could also have a bash script running an endless loop every second, avoiding the need of the manual launch of the //watch// command. To this purpose, we'll create a shell //**drop_caches.sh**// script file and put in an //**@reboot cron task**// (following commands assumed as root): |
| - | <code> | + | <code> |
| + | > nano /etc/init.d/drop_caches.sh | ||
| + | PASTE: | ||
| + | #!/bin/bash | ||
| + | sync; echo 3 > /proc/sys/vm/drop_caches | ||
| + | |||
| + | > chmod +x ~/scripts/drop_caches.sh | ||
| + | > crontab -e | ||
| + | |||
| + | PASTE: | ||
| + | @reboot /root/scripts/drop_caches.sh | ||
| + | |||
| + | > reboot | ||
| + | </code> | ||
| + | |||
| + | To make sure that the script is well running after reboot: | ||
| + | <code> | ||
| + | > ps aux | grep [c]aches | ||
| + | root 2260 0.0 0.0 4184 576 ? Ss 02:50 0:00 /bin/sh -c /root/scripts/drop_caches.sh | ||
| + | root 2266 0.3 0.1 10768 1412 ? S 02:50 0:00 /bin/bash /root/scripts/drop_caches.sh | ||
| </code> | </code> | ||