diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-05-01 11:18:44 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-05-01 11:18:44 +0100 |
commit | 2dc9e8a858b62830d15a8186fe575eb7903d2171 (patch) | |
tree | 24cabdc930f88d016db62b0f965667c07d08cfc3 /src/generator.ml | |
parent | ac286b26df1aabceca26dac66c325a3676ace4cc (diff) | |
download | libguestfs-2dc9e8a858b62830d15a8186fe575eb7903d2171.tar.gz libguestfs-2dc9e8a858b62830d15a8186fe575eb7903d2171.tar.xz libguestfs-2dc9e8a858b62830d15a8186fe575eb7903d2171.zip |
Added drop-caches command.
Diffstat (limited to 'src/generator.ml')
-rwxr-xr-x | src/generator.ml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/generator.ml b/src/generator.ml index bb550f1d..2ffe19da 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -1737,6 +1737,20 @@ recursively using the C<cp -a> command."); This moves a file from C<src> to C<dest> where C<dest> is either a destination filename or destination directory."); + ("drop_caches", (RErr, [Int "whattodrop"]), 90, [], + [InitEmpty, TestRun ( + [["drop_caches"; "3"]])], + "drop kernel page cache, dentries and inodes", + "\ +This instructs the guest kernel to drop its page cache, +and/or dentries and inode caches. The parameter C<whattodrop> +tells the kernel what precisely to drop, see +L<http://linux-mm.org/Drop_Caches> + +Setting C<whattodrop> to 3 should drop everything. + +This automatically calls L<sync(2)> before the operation, +so that the maximum guest memory is freed."); ] |