PDA

View Full Version : cups generating 17,500 temp files



daytooner
1st December 2014, 06:29 PM
Actually, cups is generating 117,500+ links to "/etc/cups/<printer name>.ppd. And it is not cleaning them up. This screws up bash, as well as a lot of other things, since there is no more temp space.

I can't find anything useful in any log file concerning this.

How can I stop cups from doing this?

TIA

ken

PS: Just noticed that used swap space jump to over 50%, and won't go back down (without reboot).

stevea
1st December 2014, 08:40 PM
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/890705

Pretty unlikely that you are trying to print either 17k or 117k files.
What do top or htop show for memory ? Who is eating your memory ?

daytooner
1st December 2014, 11:24 PM
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/890705

Pretty unlikely that you are trying to print either 17k or 117k files.
What do top or htop show for memory ? Who is eating your memory ?

Last check there was 242K+ sym links to the same ppd file. Pain in the butt to remove them.

As for usage: top is nemo, which is trying to thumbnail all of the files, I am guessing. It does this even when the files have been deleted. And swap is up to 60% and rising.

Saw the bug report. Seems to be the same. But didn't have any solution. Other than turn off the printer. Posted report in Fedora bugzilla as well.

thx,

ken

stevea
2nd December 2014, 03:01 AM
Yeah they did have a solution of sorts. They claimed some broken app was failing to remove the links.
Exclude nemo and move on down the list, or maybe use lsof to see what has any of the links opened.

daytooner
15th December 2014, 05:05 PM
Yeah they did have a solution of sorts. They claimed some broken app was failing to remove the links.
Exclude nemo and move on down the list, or maybe use lsof to see what has any of the links opened.

As far as I could tell, nothing was using any of the symlinks. And according to the various bugzillas, the problem had been fixed, and was making its way "upstream" to F19. That was quite some time ago.Could someone please try to push the latest version of cups into Fedora?

And as for removing the links (which is necessary as described earlier), I had to create a shell script that incrementally deleted small amounts of the links. Royal pain.

ken

dobbi
15th December 2014, 08:59 PM
Put a watch on the folder and see who is creating all those files, next trace the process doing it to see why.

http://www.cyberciti.biz/tips/linux-audit-files-to-see-who-made-changes-to-a-file.html

stevea
16th December 2014, 01:06 AM
Not the way I read it. Some printing app causes the creation of the file, then fails to do the cleanup. Obviously repeatedly. Unclear how a cups update can help.

watch won't help.

Auditd can be set up to track all the changes and the related processes, or you can use inotifywait (from inotify-utils package)