What is this?

Technical issues/questions of an intermediate or advanced nature.
User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

What is this?

Post#1 by Ed_P » 20 Sep 2023, 19:41

What is this old 27MB file and do I need to keep it?

Code: Select all

guest@porteus:~$ ls -on /var/cache/cups/*.dat
-rw------- 1 4 27272740 Jun 21  2021 /var/cache/cups/ppds.dat
guest@porteus:~$ 
]
Ed

roadie
Full of knowledge
Full of knowledge
Posts: 400
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

What is this?

Post#2 by roadie » 20 Sep 2023, 19:58

Ed_P,

I don't use a printer, and don't have that file, but I would think it might contain info on the ppd's that cups uses in order to run your printer. An easy way to find out is to move the file, or rename it, and try to print something.

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

What is this?

Post#3 by Ed_P » 20 Sep 2023, 20:07

roadie wrote:
20 Sep 2023, 19:58
An easy way to find out is to move the file, or rename it, and try to print something.
An excellent suggestion roadie. Thank you. :beer: I know it's not in Blaze's print module.
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

What is this?

Post#4 by Rava » 20 Sep 2023, 23:46

Moving or renaming it is a good way to test if a file is needed.

Much better approach compared to deleting it without any backup, only to realize you broke something.
Usually stuff in any kind of cache folder, even when it's /var/cache/ should be safe to delete (in theory), still: better safe than sorry.
Since people who code stuff do not need to follow a theory many will follow by default.
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

What is this?

Post#5 by Ed_P » 21 Sep 2023, 16:25

I renamed the file on the notebook's Porteus and the flashdrive's Porteus and was able to print with both. :good:

But where did it come from??
Rava wrote:
20 Sep 2023, 23:46
Moving or renaming it is a good way to test if a file is needed.
I agree and what I usually recommend to others.

Added in 1 minute 28 seconds:
notebook - the old backup one not the broken harddrive one.
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

What is this?

Post#6 by Rava » 21 Sep 2023, 18:19

Ed_P wrote:
21 Sep 2023, 16:26
But where did it come from??
It's a cache file. Temporarily created to make operation more smoothly.

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

What is this?

Post#7 by Ed_P » 21 Sep 2023, 20:00

Rava wrote:
21 Sep 2023, 18:19
Temporarily created
It was created in June 21 2021, hardly temporary. And by what? And why. It's 27MB! Print jobs are saved as job.cache and job.cache.0, the latter a text file, and are a whole lot smaller.

Code: Select all

# Job cache file for CUPS v2.4.2
# Written by cupsd
NextJobId 40
<Job 2>
State 9
Created 1625064689
Completed 1625064726
Priority 50
Username guest
Name PDF.js viewer
Destination HP-Officejet-Pro-8600
DestType 0
KOctets 800
NumFiles 1
File 1 application/pdf 0
</Job>
<Job 3>
State 9
Created 1625168257
Completed 1625168292
Priority 50
Username guest
Name FetchStatementandNotices.pdf
Destination HP-Officejet-Pro-8600
DestType 0
KOctets 105
NumFiles 1
File 1 application/pdf 0
</Job>
 :
 :
 and many more.

Code: Select all

guest@porteus:/var/cache/cups$ ls -lght
total 27M
-rw-r----- 1 lp   8.1K Dec 30  2022 job.cache
-rw-r----- 1 lp   8.1K Dec 28  2022 job.cache.O
-rw-r--r-- 1 root 2.8K Aug 13  2022 HP-Officejet-Pro-8600.data
-rw-r--r-- 1 root  245 Aug 13  2022 HP-Officejet-Pro-8600.strings
drwxrwxr-x 2 lp      3 May 26  2022 rss/
-rw------- 1 lp    27M Jun 21  2021 ppds.dat
guest@porteus:/var/cache/cups$ 
Added in 47 minutes 19 seconds:
PostScript Printer Description

PostScript Printer Description ("PPD") files describe the capabilities of each printer and are used by CUPS to support printer-specific features and intelligent filtering.
Where is the PPD file in CUPS?

CUPS clients usually read the current PPD file from the server every time a new print job is created. It is located in /usr/share/ppd/ or /usr/share/cups/model/ .
Well there are certainly many .ppd files in /usr/share/cups/model/. Most dated July 12 2022 with 2 dated 2013!

Added in 2 hours 55 minutes 32 seconds:
hmmmm With it renamed and not in my save.dat file I no longer have print options in the Admin menu. :hammer:

Added in 26 minutes 36 seconds:
But I was still able to print to my HP printer. :) :hmmm:
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

What is this?

Post#8 by Rava » 22 Sep 2023, 00:37

Ed_P wrote:
22 Sep 2023, 00:09
It was created in June 21 2021, hardly temporary. And by what? And why.
Best ask someone who knows the inner workings of CUPS better than me.
And if we do not have anyone on our PORT forum like that look for a CUPS forum or ask on stackoverflow :D
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

What is this?

Post#9 by Ed_P » 22 Sep 2023, 00:49

I think Blaze is our CUPS expert. :happy62: I'm wondering if the ppds.dat file is used to just install/configure a user's printer but not needed to print to it and could be a separate 07.5 module.
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

What is this?

Post#10 by Rava » 22 Sep 2023, 00:52

Ed_P wrote:
22 Sep 2023, 00:49
I think Blaze is our CUPS expert.
Indeed he is, he also created the scanning and printing modules.
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

What is this?

Post#11 by Ed_P » 04 Oct 2023, 22:15

From our :worthy: CUPS expert I have learned:
https://github.com/apple/cups/issues/3921 wrote: When requesting a list of the available PPDs ("lpinfo -m") cups-driverd at first reads the file /var/cache/cups/ppds.dat with PPD entries which it had already loaded on an earlier run.
and

Code: Select all

su
toor
/etc/rc.d/rc.cups stop
# Don't worry, the directory contents will be regenerated
rm -f /var/cache/cups/ppds.dat
/etc/rc.d/rc.cups start

Code: Select all

ls -on /var/cache/cups/
and

Code: Select all

su
toor 
lpinfo -m 
does indeed recreate the 28.2 MB /var/cache/cups/ppds.dat file. From where I have no idea. :unknown:
Ed

Post Reply