“echo 3 > /proc/sys/vm/drop_caches” - Permission denied as root The 2019 Stack Overflow...
Looking for Correct Greek Translation for Heraclitus
Button changing it's text & action. Good or terrible?
Can one be advised by a professor who is very far away?
Why was M87 targetted for the Event Horizon Telescope instead of Sagittarius A*?
Resizing object distorts it (Illustrator CC 2018)
Why is the Constellation's nose gear so long?
Why can Shazam fly?
Falsification in Math vs Science
What tool would a Roman-age civilization have for the breaking of silver and other metals into dust?
Can you compress metal and what would be the consequences?
Why isn't the circumferential light around the M87 black hole's event horizon symmetric?
Did Section 31 appear in Star Trek: The Next Generation?
What to do when moving next to a bird sanctuary with a loosely-domesticated cat?
Is "plugging out" electronic devices an American expression?
Does a dangling wire really electrocute me if I'm standing in water?
Return to UK after having been refused entry years ago
Pokemon Turn Based battle (Python)
Apparent duplicates between Haynes service instructions and MOT
Time travel alters history but people keep saying nothing's changed
How to type this arrow in math mode?
Why didn't the Event Horizon Telescope team mention Sagittarius A*?
How to support a colleague who finds meetings extremely tiring?
How to check whether the reindex working or not in Magento?
Can we generate random numbers using irrational numbers like π and e?
“echo 3 > /proc/sys/vm/drop_caches” - Permission denied as root
The 2019 Stack Overflow Developer Survey Results Are InLinux empty buffer cache command permission deniedSetting /proc/sys/vm/drop_caches to clear cache/proc/sys vs /sys/modules/mod/parameterroot permission denied on /proc/1/exeWhat memory is not used by processes and freed by `echo 3 > /proc/sys/vm/drop_caches`?Which Linux capability do I need in order to write to /proc/sys/vm/drop_caches?switch user to sudo su root and connect the fttp get the file in local machine and unzipBackup: /proc /sysHow to enable quota on CENTOS 6.9 virtuozzo VPS?Can I lose files if I flush the cache (echo 3> /proc/sys/vm/drop_caches)?/proc/sys/vm/drop_caches values
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I am currently having some issues with the cache. It is a little too much right now so I wanted to clear it. I googled and found this little command: sync && echo 3 > /proc/sys/vm/drop_caches
.
I am logged in as root over SSH (not using sudo). These are the attempts I made:
root@server: ~ # ll /proc/sys/vm/drop_caches
-rw-r--r-- 1 root root 0 15. Jan 20:21 /proc/sys/vm/drop_caches
root@server: ~ # echo 3 > /proc/sys/vm/drop_caches
-bash: /proc/sys/vm/drop_caches: Permission denied
root@server: ~ # sudo su -c "echo 3 > /proc/sys/vm/drop_caches"
bash: /proc/sys/vm/drop_caches: Permission denied
root@server: ~ # echo 3 | sudo tee /proc/sys/vm/drop_caches
tee: /proc/sys/vm/drop_caches: Permission denied
3
It is a remote machine running Debian. As far as I know there are some vCores in this machine and it uses Virtuozzo for the virtualization.
I really just want to clear the cache (So I can only access it using SSH).
I also tried registering this as a cronjob. But it simply fails too!
linux permissions virtualization proc openvz
|
show 4 more comments
I am currently having some issues with the cache. It is a little too much right now so I wanted to clear it. I googled and found this little command: sync && echo 3 > /proc/sys/vm/drop_caches
.
I am logged in as root over SSH (not using sudo). These are the attempts I made:
root@server: ~ # ll /proc/sys/vm/drop_caches
-rw-r--r-- 1 root root 0 15. Jan 20:21 /proc/sys/vm/drop_caches
root@server: ~ # echo 3 > /proc/sys/vm/drop_caches
-bash: /proc/sys/vm/drop_caches: Permission denied
root@server: ~ # sudo su -c "echo 3 > /proc/sys/vm/drop_caches"
bash: /proc/sys/vm/drop_caches: Permission denied
root@server: ~ # echo 3 | sudo tee /proc/sys/vm/drop_caches
tee: /proc/sys/vm/drop_caches: Permission denied
3
It is a remote machine running Debian. As far as I know there are some vCores in this machine and it uses Virtuozzo for the virtualization.
I really just want to clear the cache (So I can only access it using SSH).
I also tried registering this as a cronjob. But it simply fails too!
linux permissions virtualization proc openvz
1
Are you running this as root or are you usingsudo
?
– terdon♦
Jan 15 '14 at 19:52
2
I am running this as root. But sudo also fails.
– BrainStone
Jan 15 '14 at 19:53
Does not work either. Already tried it. Same error message.
– BrainStone
Jan 15 '14 at 19:55
See the slm's A on this question, it might help.
– Risto Salminen
Jan 15 '14 at 19:58
This is extremely unlikely, but you never know, does/proc/sys/vm/drop_caches
actually exist?
– terdon♦
Jan 15 '14 at 20:02
|
show 4 more comments
I am currently having some issues with the cache. It is a little too much right now so I wanted to clear it. I googled and found this little command: sync && echo 3 > /proc/sys/vm/drop_caches
.
I am logged in as root over SSH (not using sudo). These are the attempts I made:
root@server: ~ # ll /proc/sys/vm/drop_caches
-rw-r--r-- 1 root root 0 15. Jan 20:21 /proc/sys/vm/drop_caches
root@server: ~ # echo 3 > /proc/sys/vm/drop_caches
-bash: /proc/sys/vm/drop_caches: Permission denied
root@server: ~ # sudo su -c "echo 3 > /proc/sys/vm/drop_caches"
bash: /proc/sys/vm/drop_caches: Permission denied
root@server: ~ # echo 3 | sudo tee /proc/sys/vm/drop_caches
tee: /proc/sys/vm/drop_caches: Permission denied
3
It is a remote machine running Debian. As far as I know there are some vCores in this machine and it uses Virtuozzo for the virtualization.
I really just want to clear the cache (So I can only access it using SSH).
I also tried registering this as a cronjob. But it simply fails too!
linux permissions virtualization proc openvz
I am currently having some issues with the cache. It is a little too much right now so I wanted to clear it. I googled and found this little command: sync && echo 3 > /proc/sys/vm/drop_caches
.
I am logged in as root over SSH (not using sudo). These are the attempts I made:
root@server: ~ # ll /proc/sys/vm/drop_caches
-rw-r--r-- 1 root root 0 15. Jan 20:21 /proc/sys/vm/drop_caches
root@server: ~ # echo 3 > /proc/sys/vm/drop_caches
-bash: /proc/sys/vm/drop_caches: Permission denied
root@server: ~ # sudo su -c "echo 3 > /proc/sys/vm/drop_caches"
bash: /proc/sys/vm/drop_caches: Permission denied
root@server: ~ # echo 3 | sudo tee /proc/sys/vm/drop_caches
tee: /proc/sys/vm/drop_caches: Permission denied
3
It is a remote machine running Debian. As far as I know there are some vCores in this machine and it uses Virtuozzo for the virtualization.
I really just want to clear the cache (So I can only access it using SSH).
I also tried registering this as a cronjob. But it simply fails too!
linux permissions virtualization proc openvz
linux permissions virtualization proc openvz
edited Jun 30 '14 at 18:36
Tshepang
26.5k72187265
26.5k72187265
asked Jan 15 '14 at 19:42
BrainStoneBrainStone
1,07371943
1,07371943
1
Are you running this as root or are you usingsudo
?
– terdon♦
Jan 15 '14 at 19:52
2
I am running this as root. But sudo also fails.
– BrainStone
Jan 15 '14 at 19:53
Does not work either. Already tried it. Same error message.
– BrainStone
Jan 15 '14 at 19:55
See the slm's A on this question, it might help.
– Risto Salminen
Jan 15 '14 at 19:58
This is extremely unlikely, but you never know, does/proc/sys/vm/drop_caches
actually exist?
– terdon♦
Jan 15 '14 at 20:02
|
show 4 more comments
1
Are you running this as root or are you usingsudo
?
– terdon♦
Jan 15 '14 at 19:52
2
I am running this as root. But sudo also fails.
– BrainStone
Jan 15 '14 at 19:53
Does not work either. Already tried it. Same error message.
– BrainStone
Jan 15 '14 at 19:55
See the slm's A on this question, it might help.
– Risto Salminen
Jan 15 '14 at 19:58
This is extremely unlikely, but you never know, does/proc/sys/vm/drop_caches
actually exist?
– terdon♦
Jan 15 '14 at 20:02
1
1
Are you running this as root or are you using
sudo
?– terdon♦
Jan 15 '14 at 19:52
Are you running this as root or are you using
sudo
?– terdon♦
Jan 15 '14 at 19:52
2
2
I am running this as root. But sudo also fails.
– BrainStone
Jan 15 '14 at 19:53
I am running this as root. But sudo also fails.
– BrainStone
Jan 15 '14 at 19:53
Does not work either. Already tried it. Same error message.
– BrainStone
Jan 15 '14 at 19:55
Does not work either. Already tried it. Same error message.
– BrainStone
Jan 15 '14 at 19:55
See the slm's A on this question, it might help.
– Risto Salminen
Jan 15 '14 at 19:58
See the slm's A on this question, it might help.
– Risto Salminen
Jan 15 '14 at 19:58
This is extremely unlikely, but you never know, does
/proc/sys/vm/drop_caches
actually exist?– terdon♦
Jan 15 '14 at 20:02
This is extremely unlikely, but you never know, does
/proc/sys/vm/drop_caches
actually exist?– terdon♦
Jan 15 '14 at 20:02
|
show 4 more comments
6 Answers
6
active
oldest
votes
I am logged in as root over SSH...It is a remote machine running Debian.
Is it actually a remote machine, or a just a remote system? If this is a VPS slice somewhere, (at least some forms of) OS virtualization (e.g. openVZ) won't permit this from within the container. You don't run the machine, you just run your slice.
1
There is like no way???
– BrainStone
Jan 15 '14 at 20:09
1
Probably not, since there wouldn't be much point in not permitting it if there were alternate methods that worked.
– goldilocks
Jan 15 '14 at 20:11
2
@BrainStone - I use OpenVZ, it's not possible!
– slm♦
Jan 15 '14 at 21:42
add a comment |
sudo
has to cover whole the redirection so it can be completely executed by root:
$ sudo sh -c "/usr/bin/echo 3 > /proc/sys/vm/drop_caches"
5
this actually worked for me (with the right binary location for echo)
– orm
Nov 5 '14 at 19:59
in OpenVZ not work
– shilovk
Mar 3 '15 at 16:03
1
alternatively, you could use tee instead:echo 3 | sudo tee /proc/sys/vm/drop_caches
– mchid
Dec 23 '15 at 0:09
1
@mchid, consider adding your comment as an answer. It also worked for me on Azure VM.
– Erik Shilts
Jan 26 '17 at 22:04
It's root already, see # at the beginning of line. Issue with sudo is worth noting, but for another question.
– Alexei Martianov
Mar 18 '18 at 7:31
add a comment |
This is normal behavior under OS-level virtualization. This can only be executed by someone with root access to the hardware node.
With for example OpenVZ, you don't get your own kernel instance and as such, are restricted from performing commands like this.
All share the same page cache, so to drop caches of only your instance, the kernel must check if the page belongs to you and if the other instances aren't using this page too.
With another virtualization technique like KVM or Xen this might be working.
1
So I could/should/must contact my hoster to clear the cache for me? And how do I find out what "virtualisation technique" my system is on?
– BrainStone
Jan 15 '14 at 20:15
Yes, you may not come around this...
– chaos
Jan 15 '14 at 20:18
I am not shure if this is right. I am running some vm's at aws and Xen and i am able to drop_caches.
– user55518
Jan 15 '14 at 20:51
2
The difference is between OS virtualization (OpenVZ, LXC) and platform virtualization (QEMU, Xen), both of which have advantages and disavantages vs. the other.
– goldilocks
Jan 15 '14 at 21:52
1
@bersch Xen uses an own kernel for VMs. OpenVZ does not. You can think of OpenVZ like a better "chroot".
– Nils
Jan 20 '14 at 11:49
|
show 2 more comments
You can use echo
piped to sudo tee
to allow the proper permission needed when you need to echo as root.
echo 3 | sudo tee /proc/sys/vm/drop_caches
Use tee --help
to list more options.
add a comment |
sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
This command work for me without /usr/bin/echo
in mchid answer. It was giving error sh: 1: /usr/bin/echo: not found
. So used only 'echo'
add a comment |
I had the same problem when I tried to use sudo like this:
sudo echo 1 > /proc/sys/vm/overcommit_memory
My solution was to temporarily switch to root. Obiously, that permission has to be enabled on your system:
sudo su - #temporarily switch to root user
echo 1 > /proc/sys/vm/overcommit_memory
exit # Exit as root.
add a comment |
protected by Stephen Kitt 14 hours ago
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
I am logged in as root over SSH...It is a remote machine running Debian.
Is it actually a remote machine, or a just a remote system? If this is a VPS slice somewhere, (at least some forms of) OS virtualization (e.g. openVZ) won't permit this from within the container. You don't run the machine, you just run your slice.
1
There is like no way???
– BrainStone
Jan 15 '14 at 20:09
1
Probably not, since there wouldn't be much point in not permitting it if there were alternate methods that worked.
– goldilocks
Jan 15 '14 at 20:11
2
@BrainStone - I use OpenVZ, it's not possible!
– slm♦
Jan 15 '14 at 21:42
add a comment |
I am logged in as root over SSH...It is a remote machine running Debian.
Is it actually a remote machine, or a just a remote system? If this is a VPS slice somewhere, (at least some forms of) OS virtualization (e.g. openVZ) won't permit this from within the container. You don't run the machine, you just run your slice.
1
There is like no way???
– BrainStone
Jan 15 '14 at 20:09
1
Probably not, since there wouldn't be much point in not permitting it if there were alternate methods that worked.
– goldilocks
Jan 15 '14 at 20:11
2
@BrainStone - I use OpenVZ, it's not possible!
– slm♦
Jan 15 '14 at 21:42
add a comment |
I am logged in as root over SSH...It is a remote machine running Debian.
Is it actually a remote machine, or a just a remote system? If this is a VPS slice somewhere, (at least some forms of) OS virtualization (e.g. openVZ) won't permit this from within the container. You don't run the machine, you just run your slice.
I am logged in as root over SSH...It is a remote machine running Debian.
Is it actually a remote machine, or a just a remote system? If this is a VPS slice somewhere, (at least some forms of) OS virtualization (e.g. openVZ) won't permit this from within the container. You don't run the machine, you just run your slice.
edited Jan 15 '14 at 20:12
answered Jan 15 '14 at 20:06
goldilocksgoldilocks
63.4k17157213
63.4k17157213
1
There is like no way???
– BrainStone
Jan 15 '14 at 20:09
1
Probably not, since there wouldn't be much point in not permitting it if there were alternate methods that worked.
– goldilocks
Jan 15 '14 at 20:11
2
@BrainStone - I use OpenVZ, it's not possible!
– slm♦
Jan 15 '14 at 21:42
add a comment |
1
There is like no way???
– BrainStone
Jan 15 '14 at 20:09
1
Probably not, since there wouldn't be much point in not permitting it if there were alternate methods that worked.
– goldilocks
Jan 15 '14 at 20:11
2
@BrainStone - I use OpenVZ, it's not possible!
– slm♦
Jan 15 '14 at 21:42
1
1
There is like no way???
– BrainStone
Jan 15 '14 at 20:09
There is like no way???
– BrainStone
Jan 15 '14 at 20:09
1
1
Probably not, since there wouldn't be much point in not permitting it if there were alternate methods that worked.
– goldilocks
Jan 15 '14 at 20:11
Probably not, since there wouldn't be much point in not permitting it if there were alternate methods that worked.
– goldilocks
Jan 15 '14 at 20:11
2
2
@BrainStone - I use OpenVZ, it's not possible!
– slm♦
Jan 15 '14 at 21:42
@BrainStone - I use OpenVZ, it's not possible!
– slm♦
Jan 15 '14 at 21:42
add a comment |
sudo
has to cover whole the redirection so it can be completely executed by root:
$ sudo sh -c "/usr/bin/echo 3 > /proc/sys/vm/drop_caches"
5
this actually worked for me (with the right binary location for echo)
– orm
Nov 5 '14 at 19:59
in OpenVZ not work
– shilovk
Mar 3 '15 at 16:03
1
alternatively, you could use tee instead:echo 3 | sudo tee /proc/sys/vm/drop_caches
– mchid
Dec 23 '15 at 0:09
1
@mchid, consider adding your comment as an answer. It also worked for me on Azure VM.
– Erik Shilts
Jan 26 '17 at 22:04
It's root already, see # at the beginning of line. Issue with sudo is worth noting, but for another question.
– Alexei Martianov
Mar 18 '18 at 7:31
add a comment |
sudo
has to cover whole the redirection so it can be completely executed by root:
$ sudo sh -c "/usr/bin/echo 3 > /proc/sys/vm/drop_caches"
5
this actually worked for me (with the right binary location for echo)
– orm
Nov 5 '14 at 19:59
in OpenVZ not work
– shilovk
Mar 3 '15 at 16:03
1
alternatively, you could use tee instead:echo 3 | sudo tee /proc/sys/vm/drop_caches
– mchid
Dec 23 '15 at 0:09
1
@mchid, consider adding your comment as an answer. It also worked for me on Azure VM.
– Erik Shilts
Jan 26 '17 at 22:04
It's root already, see # at the beginning of line. Issue with sudo is worth noting, but for another question.
– Alexei Martianov
Mar 18 '18 at 7:31
add a comment |
sudo
has to cover whole the redirection so it can be completely executed by root:
$ sudo sh -c "/usr/bin/echo 3 > /proc/sys/vm/drop_caches"
sudo
has to cover whole the redirection so it can be completely executed by root:
$ sudo sh -c "/usr/bin/echo 3 > /proc/sys/vm/drop_caches"
edited Jan 15 at 14:58
Wrzlprmft
1035
1035
answered Aug 5 '14 at 6:50
rasty.grasty.g
40346
40346
5
this actually worked for me (with the right binary location for echo)
– orm
Nov 5 '14 at 19:59
in OpenVZ not work
– shilovk
Mar 3 '15 at 16:03
1
alternatively, you could use tee instead:echo 3 | sudo tee /proc/sys/vm/drop_caches
– mchid
Dec 23 '15 at 0:09
1
@mchid, consider adding your comment as an answer. It also worked for me on Azure VM.
– Erik Shilts
Jan 26 '17 at 22:04
It's root already, see # at the beginning of line. Issue with sudo is worth noting, but for another question.
– Alexei Martianov
Mar 18 '18 at 7:31
add a comment |
5
this actually worked for me (with the right binary location for echo)
– orm
Nov 5 '14 at 19:59
in OpenVZ not work
– shilovk
Mar 3 '15 at 16:03
1
alternatively, you could use tee instead:echo 3 | sudo tee /proc/sys/vm/drop_caches
– mchid
Dec 23 '15 at 0:09
1
@mchid, consider adding your comment as an answer. It also worked for me on Azure VM.
– Erik Shilts
Jan 26 '17 at 22:04
It's root already, see # at the beginning of line. Issue with sudo is worth noting, but for another question.
– Alexei Martianov
Mar 18 '18 at 7:31
5
5
this actually worked for me (with the right binary location for echo)
– orm
Nov 5 '14 at 19:59
this actually worked for me (with the right binary location for echo)
– orm
Nov 5 '14 at 19:59
in OpenVZ not work
– shilovk
Mar 3 '15 at 16:03
in OpenVZ not work
– shilovk
Mar 3 '15 at 16:03
1
1
alternatively, you could use tee instead:
echo 3 | sudo tee /proc/sys/vm/drop_caches
– mchid
Dec 23 '15 at 0:09
alternatively, you could use tee instead:
echo 3 | sudo tee /proc/sys/vm/drop_caches
– mchid
Dec 23 '15 at 0:09
1
1
@mchid, consider adding your comment as an answer. It also worked for me on Azure VM.
– Erik Shilts
Jan 26 '17 at 22:04
@mchid, consider adding your comment as an answer. It also worked for me on Azure VM.
– Erik Shilts
Jan 26 '17 at 22:04
It's root already, see # at the beginning of line. Issue with sudo is worth noting, but for another question.
– Alexei Martianov
Mar 18 '18 at 7:31
It's root already, see # at the beginning of line. Issue with sudo is worth noting, but for another question.
– Alexei Martianov
Mar 18 '18 at 7:31
add a comment |
This is normal behavior under OS-level virtualization. This can only be executed by someone with root access to the hardware node.
With for example OpenVZ, you don't get your own kernel instance and as such, are restricted from performing commands like this.
All share the same page cache, so to drop caches of only your instance, the kernel must check if the page belongs to you and if the other instances aren't using this page too.
With another virtualization technique like KVM or Xen this might be working.
1
So I could/should/must contact my hoster to clear the cache for me? And how do I find out what "virtualisation technique" my system is on?
– BrainStone
Jan 15 '14 at 20:15
Yes, you may not come around this...
– chaos
Jan 15 '14 at 20:18
I am not shure if this is right. I am running some vm's at aws and Xen and i am able to drop_caches.
– user55518
Jan 15 '14 at 20:51
2
The difference is between OS virtualization (OpenVZ, LXC) and platform virtualization (QEMU, Xen), both of which have advantages and disavantages vs. the other.
– goldilocks
Jan 15 '14 at 21:52
1
@bersch Xen uses an own kernel for VMs. OpenVZ does not. You can think of OpenVZ like a better "chroot".
– Nils
Jan 20 '14 at 11:49
|
show 2 more comments
This is normal behavior under OS-level virtualization. This can only be executed by someone with root access to the hardware node.
With for example OpenVZ, you don't get your own kernel instance and as such, are restricted from performing commands like this.
All share the same page cache, so to drop caches of only your instance, the kernel must check if the page belongs to you and if the other instances aren't using this page too.
With another virtualization technique like KVM or Xen this might be working.
1
So I could/should/must contact my hoster to clear the cache for me? And how do I find out what "virtualisation technique" my system is on?
– BrainStone
Jan 15 '14 at 20:15
Yes, you may not come around this...
– chaos
Jan 15 '14 at 20:18
I am not shure if this is right. I am running some vm's at aws and Xen and i am able to drop_caches.
– user55518
Jan 15 '14 at 20:51
2
The difference is between OS virtualization (OpenVZ, LXC) and platform virtualization (QEMU, Xen), both of which have advantages and disavantages vs. the other.
– goldilocks
Jan 15 '14 at 21:52
1
@bersch Xen uses an own kernel for VMs. OpenVZ does not. You can think of OpenVZ like a better "chroot".
– Nils
Jan 20 '14 at 11:49
|
show 2 more comments
This is normal behavior under OS-level virtualization. This can only be executed by someone with root access to the hardware node.
With for example OpenVZ, you don't get your own kernel instance and as such, are restricted from performing commands like this.
All share the same page cache, so to drop caches of only your instance, the kernel must check if the page belongs to you and if the other instances aren't using this page too.
With another virtualization technique like KVM or Xen this might be working.
This is normal behavior under OS-level virtualization. This can only be executed by someone with root access to the hardware node.
With for example OpenVZ, you don't get your own kernel instance and as such, are restricted from performing commands like this.
All share the same page cache, so to drop caches of only your instance, the kernel must check if the page belongs to you and if the other instances aren't using this page too.
With another virtualization technique like KVM or Xen this might be working.
edited Jan 15 '14 at 22:06
terdon♦
134k33269449
134k33269449
answered Jan 15 '14 at 20:14
chaoschaos
36.2k977120
36.2k977120
1
So I could/should/must contact my hoster to clear the cache for me? And how do I find out what "virtualisation technique" my system is on?
– BrainStone
Jan 15 '14 at 20:15
Yes, you may not come around this...
– chaos
Jan 15 '14 at 20:18
I am not shure if this is right. I am running some vm's at aws and Xen and i am able to drop_caches.
– user55518
Jan 15 '14 at 20:51
2
The difference is between OS virtualization (OpenVZ, LXC) and platform virtualization (QEMU, Xen), both of which have advantages and disavantages vs. the other.
– goldilocks
Jan 15 '14 at 21:52
1
@bersch Xen uses an own kernel for VMs. OpenVZ does not. You can think of OpenVZ like a better "chroot".
– Nils
Jan 20 '14 at 11:49
|
show 2 more comments
1
So I could/should/must contact my hoster to clear the cache for me? And how do I find out what "virtualisation technique" my system is on?
– BrainStone
Jan 15 '14 at 20:15
Yes, you may not come around this...
– chaos
Jan 15 '14 at 20:18
I am not shure if this is right. I am running some vm's at aws and Xen and i am able to drop_caches.
– user55518
Jan 15 '14 at 20:51
2
The difference is between OS virtualization (OpenVZ, LXC) and platform virtualization (QEMU, Xen), both of which have advantages and disavantages vs. the other.
– goldilocks
Jan 15 '14 at 21:52
1
@bersch Xen uses an own kernel for VMs. OpenVZ does not. You can think of OpenVZ like a better "chroot".
– Nils
Jan 20 '14 at 11:49
1
1
So I could/should/must contact my hoster to clear the cache for me? And how do I find out what "virtualisation technique" my system is on?
– BrainStone
Jan 15 '14 at 20:15
So I could/should/must contact my hoster to clear the cache for me? And how do I find out what "virtualisation technique" my system is on?
– BrainStone
Jan 15 '14 at 20:15
Yes, you may not come around this...
– chaos
Jan 15 '14 at 20:18
Yes, you may not come around this...
– chaos
Jan 15 '14 at 20:18
I am not shure if this is right. I am running some vm's at aws and Xen and i am able to drop_caches.
– user55518
Jan 15 '14 at 20:51
I am not shure if this is right. I am running some vm's at aws and Xen and i am able to drop_caches.
– user55518
Jan 15 '14 at 20:51
2
2
The difference is between OS virtualization (OpenVZ, LXC) and platform virtualization (QEMU, Xen), both of which have advantages and disavantages vs. the other.
– goldilocks
Jan 15 '14 at 21:52
The difference is between OS virtualization (OpenVZ, LXC) and platform virtualization (QEMU, Xen), both of which have advantages and disavantages vs. the other.
– goldilocks
Jan 15 '14 at 21:52
1
1
@bersch Xen uses an own kernel for VMs. OpenVZ does not. You can think of OpenVZ like a better "chroot".
– Nils
Jan 20 '14 at 11:49
@bersch Xen uses an own kernel for VMs. OpenVZ does not. You can think of OpenVZ like a better "chroot".
– Nils
Jan 20 '14 at 11:49
|
show 2 more comments
You can use echo
piped to sudo tee
to allow the proper permission needed when you need to echo as root.
echo 3 | sudo tee /proc/sys/vm/drop_caches
Use tee --help
to list more options.
add a comment |
You can use echo
piped to sudo tee
to allow the proper permission needed when you need to echo as root.
echo 3 | sudo tee /proc/sys/vm/drop_caches
Use tee --help
to list more options.
add a comment |
You can use echo
piped to sudo tee
to allow the proper permission needed when you need to echo as root.
echo 3 | sudo tee /proc/sys/vm/drop_caches
Use tee --help
to list more options.
You can use echo
piped to sudo tee
to allow the proper permission needed when you need to echo as root.
echo 3 | sudo tee /proc/sys/vm/drop_caches
Use tee --help
to list more options.
answered Jan 29 '17 at 16:59
mchidmchid
8391917
8391917
add a comment |
add a comment |
sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
This command work for me without /usr/bin/echo
in mchid answer. It was giving error sh: 1: /usr/bin/echo: not found
. So used only 'echo'
add a comment |
sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
This command work for me without /usr/bin/echo
in mchid answer. It was giving error sh: 1: /usr/bin/echo: not found
. So used only 'echo'
add a comment |
sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
This command work for me without /usr/bin/echo
in mchid answer. It was giving error sh: 1: /usr/bin/echo: not found
. So used only 'echo'
sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
This command work for me without /usr/bin/echo
in mchid answer. It was giving error sh: 1: /usr/bin/echo: not found
. So used only 'echo'
answered Oct 16 '18 at 11:47
ascii_walkerascii_walker
1113
1113
add a comment |
add a comment |
I had the same problem when I tried to use sudo like this:
sudo echo 1 > /proc/sys/vm/overcommit_memory
My solution was to temporarily switch to root. Obiously, that permission has to be enabled on your system:
sudo su - #temporarily switch to root user
echo 1 > /proc/sys/vm/overcommit_memory
exit # Exit as root.
add a comment |
I had the same problem when I tried to use sudo like this:
sudo echo 1 > /proc/sys/vm/overcommit_memory
My solution was to temporarily switch to root. Obiously, that permission has to be enabled on your system:
sudo su - #temporarily switch to root user
echo 1 > /proc/sys/vm/overcommit_memory
exit # Exit as root.
add a comment |
I had the same problem when I tried to use sudo like this:
sudo echo 1 > /proc/sys/vm/overcommit_memory
My solution was to temporarily switch to root. Obiously, that permission has to be enabled on your system:
sudo su - #temporarily switch to root user
echo 1 > /proc/sys/vm/overcommit_memory
exit # Exit as root.
I had the same problem when I tried to use sudo like this:
sudo echo 1 > /proc/sys/vm/overcommit_memory
My solution was to temporarily switch to root. Obiously, that permission has to be enabled on your system:
sudo su - #temporarily switch to root user
echo 1 > /proc/sys/vm/overcommit_memory
exit # Exit as root.
edited 21 hours ago
muru
37.4k589164
37.4k589164
answered Dec 4 '18 at 16:31
thebiggestlebowskithebiggestlebowski
1011
1011
add a comment |
add a comment |
protected by Stephen Kitt 14 hours ago
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
1
Are you running this as root or are you using
sudo
?– terdon♦
Jan 15 '14 at 19:52
2
I am running this as root. But sudo also fails.
– BrainStone
Jan 15 '14 at 19:53
Does not work either. Already tried it. Same error message.
– BrainStone
Jan 15 '14 at 19:55
See the slm's A on this question, it might help.
– Risto Salminen
Jan 15 '14 at 19:58
This is extremely unlikely, but you never know, does
/proc/sys/vm/drop_caches
actually exist?– terdon♦
Jan 15 '14 at 20:02