Board index Other Hangar talk

Linux "cups" log file heartache

Talk about (almost) anything, as long as it is no serious FlightGear talk and does not fit in the other subforums.
Forum rules
Please refrain from discussing politics.

Linux "cups" log file heartache

Postby wlbragg » Thu Jun 15, 2017 5:57 am

I just spent the better part of a day troubleshooting my Debian "stretch" install. A "CUPS" log file (66gig) caused a major problem trying to boot after a thunderstorm knocked out our power last night. I guess it ate up my entire free space on my solid state drive. Once I found it and deleted it I was able to get back in and repair the damage.
Don't have the foggiest idea how it got so large, or what cups is for for all that matters.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 3783
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Linux "cups" log file heartache

Postby Ovazor » Thu Jun 15, 2017 7:08 am

Cups is the printing system, so the log files contain data related on printers and print jobs. Maybe there is some error that gets logged again and again?

There should be a file /etc/cups/cupsd.conf , where you can set the value MaxLogSize to limit the sizes of log files
Ovazor
 
Posts: 32
Joined: Wed Feb 12, 2014 6:53 am
Location: Finland
Callsign: OH-OVA
Version: 2017.3.0
OS: OpenSUSE LEap 42.3

Re: Linux "cups" log file heartache

Postby wlbragg » Thu Jun 15, 2017 5:07 pm

Thank you, I really need this. I woke up this morning again to a broken cpu. Overnight night cups logged another 56gig if error messages. I need to find out what's broke but in the mean time limiting the size will help. I'm running on a solid state drive and I am afraid all this writing is going to damage it.

Unfortunately, the config file shows this

Code: Select all
# Deactivate CUPS' internal logrotating, as we provide a better one, especially
# LogLevel debug2 gets usable now
MaxLogSize 0


I'm not sure what "A better one" means. However the log in question is the error_log. But it is the locked log file (either needs to be root, or I don't know).

I deleted the log in order to boot. By the time I went to the log to see if it changed it was already 18gig. I tried a root mouspad to view the log but it hung. I am kind of stumped as to how to read the log file.

The bootup process hangs at
Code: Select all
Started update UTMP about System Runlevel Changes


So my startup consists of alt+f1 to terminal at the hangup, login to wayne and run startx to GUI.

Kind of a cluster-#$$%.

I'm still researching the UTMP hangup but it is inconclusive so far.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 3783
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Linux "cups" log file heartache

Postby wlbragg » Thu Jun 15, 2017 7:26 pm

Well the cups problem was a file permission issue which I fixed. That makes me a bit nervous though that there is some serious degradation of system file permissions.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 3783
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Linux "cups" log file heartache

Postby Ovazor » Fri Jun 16, 2017 11:42 am

Set a value for the MaxLogSize - 0 means "unlimited". Try e.g. 10m
Ovazor
 
Posts: 32
Joined: Wed Feb 12, 2014 6:53 am
Location: Finland
Callsign: OH-OVA
Version: 2017.3.0
OS: OpenSUSE LEap 42.3

Re: Linux "cups" log file heartache

Postby wlbragg » Fri Jun 16, 2017 5:16 pm

Thanks for explaining that, it was worded such that I thought that line was disabling the internal logrotating and they are using something else.

Unfortunately, changing the log size in this case would not have fixed the problem. I would have ended up with a billion small logs, until I ran out of space. But still worth knowing how it work.

I could literally watch the log file size grow it was erring so fast. I think it took several hours to eat all the free space.

My system is stable for now, I'll reinstall in a week or so after "stretch" is made the next release.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 3783
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640


Return to Hangar talk

Who is online

Users browsing this forum: No registered users and 3 guests