[c-nsp] N5K (vm.drop_caches)

Andrew Miehs andrew at 2sheds.de
Tue May 14 08:38:46 EDT 2013


For some reason the box ran the "/sbin/sysctl -q -w vm.drop_caches=3"
command - but I have no idea if it was in relation to a low memory
situation, or whether it is part of a cronjob. I would assume the first as
otherwise everyone would be seeing this...



On Tue, May 14, 2013 at 10:24 PM, Manu Chao <linux.yahoo at gmail.com> wrote:

> Thanks Andrew
>
> but NX(OS) is running on top of a specific modified linux kernel we do not
> have access :(
>
> sync is not available and echo commands doesn't help (error could not open
> temporary file):
>
> N5K# echo 1 > /proc/sys/vm/drop_caches
> 1
> Error: could not open temporary file /bootflash/proc/sys/vm/drop_caches
> (errno=2)Error: could not open temporary file /bootflash/pro
> c/sys/vm/drop_caches (errno=2)
>
> N5K# echo 2 > /proc/sys/vm/drop_caches
> 2
> Error: could not open temporary file /bootflash/proc/sys/vm/drop_caches
> (errno=2)Error: could not open temporary file /bootflash/pro
> c/sys/vm/drop_caches (errno=2)
>
> N5K# echo 3 > /proc/sys/vm/drop_caches
> 3
> Error: could not open temporary file /bootflash/proc/sys/vm/drop_caches
> (errno=2)Error: could not open temporary file /bootflash/pro
> c/sys/vm/drop_caches (errno=2)
>
> :(
>
>
> On Tue, May 14, 2013 at 12:44 PM, Andrew Miehs <andrew at 2sheds.de> wrote:
>
>> Google is your friend...
>>
>> https://www.kernel.org/doc/Documentation/sysctl/vm.txt
>>
>>
>> drop_caches
>>
>> Writing to this will cause the kernel to drop clean caches, dentries and
>> inodes from memory, causing that memory to become free.
>>
>> To free pagecache:
>> 	echo 1 > /proc/sys/vm/drop_caches
>> To free dentries and inodes:
>> 	echo 2 > /proc/sys/vm/drop_caches
>> To free pagecache, dentries and inodes:
>> 	echo 3 > /proc/sys/vm/drop_caches
>>
>> As this is a non-destructive operation and dirty objects are not freeable, the
>> user should run `sync' first.
>>
>>
>>
>> On Tue, May 14, 2013 at 7:55 PM, Manu Chao <linux.yahoo at gmail.com> wrote:
>>
>>> Any idea about this vm.drop.cache syslog message on Nexus 5548:
>>>
>>>
>>> %AUTHPRIV-5-SYSTEM_MSG:     root : TTY=console ;
>>> PWD=/var/sysmgr/sysmgr-subproc ; USER=root ; COMMAND=/sbin/sysctl -q -w
>>> vm.drop_caches=3 - sudo
>>>
>>>
>>> Any help will be appreciate
>>> _______________________________________________
>>> cisco-nsp mailing list  cisco-nsp at puck.nether.net
>>> https://puck.nether.net/mailman/listinfo/cisco-nsp
>>> archive at http://puck.nether.net/pipermail/cisco-nsp/
>>>
>>
>>
>


More information about the cisco-nsp mailing list