[K12OSN] Deleting Swap Files

Eric Harrison eharrison at mail.mesd.k12.or.us
Thu Mar 10 18:33:37 UTC 2005


Shawn Powers wrote:
> I just got a warning that my /var partition was almost full -- so I
> investigated, only to find 20GB of swapfiles...
>
> I use DHCP, and my many, many thin clients have made many, many
> swapfiles.  Is there a way to prune the old ones, without freaking out
> the "in use" ones?  Is there any way to tell what ones are in use?
>
> Thanks for any help,
> -Shawn
>


One possibility, which I have not tested yet, is to use tmpwatch to
automatically clean the unused swap files.


Try running this and see what it thinks should be deleted:

	/usr/sbin/tmpwatch --verbose --test 720 /var/opt/ltsp/swapfiles


I'll test this out later tonight and add it the ltsp packages if it
works as expected. All that needs to be done is a new shell script added
to /etc/cron.daily that runs that command (without the --verbose &
--test flags).

-Eric


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/k12osn/attachments/20050310/42b8bb6c/attachment.sig>


More information about the K12OSN mailing list