Score:-2

lsof shows that .xsession-errors' deleted files chews up all disk space

cn flag

I configured a cronjob that truncates the ~/.xsession-errors file because it was chewing up all disk space. This keeps the file smaller than 500K. The disk space is still being filled.

lsof +L1 | grep deleted shows many instances of xsession-errors deleted items that will fill all disk space. Only a reboot seems to clear this.

What could be the cause?

Score:1
cn flag

Thanks for the advice. I found what was writing to the .xsession-errors file. kpatient ver. 19 has a bug that fills up the disk. Ver 21 fixes that.

Score:0
it flag

Even though you have reset the filesystem's idea of the file size, the program that has ~/.xsession-errors open has no way of knowing this. It's against the Way of Filesystem to actually delete a file (and free the space) while any process has it open. This lets the logging program simply "write the next block", rather than "open the file;position to End. Read partially filled block;Write the data;Close the file" EVERY time a line of information is logged

Read the man page for the program, some programs will reset log files on receipt of a signal, others have to be killed and restarted.

How are you starting and stopping your X server? It looks you're leaving X processes lying around, with log files open. Look at ps -ef.

You can use fuser to send signals to reluctant processes.

Read man fuser pkill kill X ps;man -a signal

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.