[Pkg-sysvinit-devel] Bug#385050: Fwd: Re: initscripts: TMPTIME cleanup doesn't work in /tmp

Ritesh Raj Sarraf rrs at researchut.com
Thu Oct 12 12:03:22 UTC 2006


I think I'm getting it clear.

ls -lu shows the atime for files/folders. Now, if I do a ls -lu on /tmp, this 
is what I get:

rrs at geeKISSexy:/tmp$ ls -lu
total 81600
-rw-r--r-- 1 rrs  rrs      24738 2006-10-09 19:48 bookmarks.html
-rw-r--r-- 1 rrs  rrs        902 2006-10-12 17:08 bootclean
-rw-r--r-- 1 root root      4374 2006-10-12 16:57 cisco_oops
-rw------- 1 rrs  rrs   10379264 2006-10-12 16:57 core.11599
-rw------- 1 rrs  rrs   10387456 2006-10-12 16:57 core.11664
drwxr-xr-x 3 rrs  rrs       4096 2006-10-12 17:09 eric4-snapshot-20061009/
drwxr-xr-x 3 rrs  rrs       4096 2006-10-12 17:09 features/
drwx------ 2 rrs  rrs       4096 2006-10-12 17:09 gconfd-rrs/
drwx------ 2 rrs  rrs       4096 2006-10-12 17:09 gpg-1CpRrx/
drwx------ 2 rrs  rrs       4096 2006-10-12 17:09 gpg-MPyyzV/
drwx------ 2 rrs  rrs       4096 2006-10-12 17:09 gpg-RaEGbO/
drwx------ 2 rrs  rrs       4096 2006-10-12 17:09 gpg-uEXGHt/
drwxr-xr-x 2 rrs  rrs       4096 2006-10-12 17:09 hsperfdata_rrs/
drwxr-xr-x 5 rrs  users     4096 2006-10-12 17:09 ipw3945-1.1.0/
-rw-r--r-- 1 root root    196361 2006-10-08 20:47 ipw3945-1.1.0.tgz
-rw-r--r-- 1 rrs  rrs   27607606 2006-10-11 19:07 
kdepim-doc_4%3a3.5.5-1_all.deb
drwx------ 2 root root      4096 2006-10-12 17:09 kde-root/
drwx------ 3 rrs  rrs       4096 2006-10-12 17:09 kde-rrs/
drwx------ 3 root root      4096 2006-10-12 17:09 ksocket-root/
drwx------ 3 rrs  rrs       4096 2006-10-12 17:09 ksocket-rrs/
drwxr-xr-x 2 rrs  rrs       4096 2006-10-12 17:09 luvcview-20060920/
drwx------ 2 rrs  rrs       4096 2006-10-12 17:09 orbit-rrs/
drwxr-xr-x 4 rrs  rrs       4096 2006-10-12 17:09 plugins/
drwxr-xr-x 3 rrs  rrs       4096 2006-10-12 17:09 pypt-offline-temp/
-rw-r--r-- 1 rrs  rrs   52575786 2006-10-11 19:07 pypt-offline-upgrade.zip
-rw-r--r-- 1 rrs  rrs      15334 2006-10-12 16:57 quickcam.jpg
drwx------ 2 rrs  rrs       4096 2006-10-12 17:09 ssh-rjzJGe5820/
-r-------- 1 rrs  rrs        218 2006-10-12 16:57 tmp1bc4a8a1.tmp
-r-------- 1 rrs  rrs        218 2006-10-12 16:57 tmp20fe046a.tmp
-r-------- 1 rrs  rrs       3308 2006-10-12 16:57 tmp28bbd34b.tmp
-r-------- 1 rrs  rrs       1051 2006-10-12 16:57 tmp3089ec28.tmp
-r-------- 1 rrs  rrs        951 2006-10-12 16:57 tmp37972643.tmp
-r-------- 1 rrs  rrs        218 2006-10-12 16:57 tmp3c054c03.tmp
-r-------- 1 rrs  rrs       3206 2006-10-12 17:12 tmp511627d7.tmp
-r-------- 1 rrs  rrs        951 2006-10-12 16:57 tmp54e7fd00.tmp
-r-------- 1 rrs  rrs       1051 2006-10-12 16:57 tmp5a7feee5.tmp
-r-------- 1 rrs  rrs       1051 2006-10-12 16:57 tmp5db1bab0.tmp
-r-------- 1 rrs  rrs        218 2006-10-12 16:57 tmp6d404aba.tmp
-r-------- 1 rrs  rrs       3206 2006-10-12 16:57 tmp6f52f5b6.tmp
-r-------- 1 rrs  rrs       3228 2006-10-12 16:57 tmp77d1feac.tmp
-r-------- 1 rrs  rrs       1051 2006-10-12 16:57 tmp7d37995d.tmp
-r-------- 1 rrs  rrs        218 2006-10-12 16:57 tmp7e73d1e2.tmp
-rw------- 1 root root         0 2006-10-12 16:51 tmp.AADKG19651
-rw-r--r-- 1 root root     37000 2006-10-12 16:57 uvcvideo.ko
drwxr-xr-x 2  884   201     4096 2006-10-12 17:09 vmware-any-any-update104/
drwxr-xr-x 8 root root      4096 2006-10-12 17:09 vmware-distrib/
drwx------ 2 rrs  rrs       4096 2006-10-12 17:09 vmware-rrs/
drwxr-xr-x 2  884   201     4096 2006-10-12 17:09 vmware-tools-any-update2/
drwxr-xr-x 3  503 uucp      4096 2006-10-12 17:09 vpnclient/
-rw------- 1 rrs  rrs       1365 2006-10-12 16:58 zmann8cH1i


Most files have got the atime of 12/10/2006. That should be because once I use 
the Konqueror file manager to view /tmp, it would be accessing the 
files/folders to extract the metadata.

If what I've understood is correct, shouldn't we implement something else in 
bootclean.sh because desktop users will keep browsing files/folders using a 
file manager ?

Thanks,
Ritesh

----------  Forwarded Message  ----------

Subject: Re: initscripts: TMPTIME cleanup doesn't work in /tmp
Date: Thursday 12 October 2006 17:11
From: Ritesh Raj Sarraf <rrs at researchut.com>
To: Petter Reinholdtsen <pere at hungry.com>
Cc: Andreas Metzler <ametzler at debian.org>, 385050 at bugs.debian.org

Hi,

I think my bug report is invalid.
But before doing a close I'd like to ask a small question.

I was going through bootclean.sh file to see how it worked.

This is what I think is the main part that does the cleanup

        if [ "$TMPTIME" = 0 ]
        then
                TEXPR=""
                DEXPR=""
        else
                TEXPR="-mtime +$TMPTIME -ctime +$TMPTIME -atime +$TMPTIME"
                DEXPR="-mtime +$TMPTIME -ctime +$TMPTIME"
        fi

        EXCEPT='! -name .
                ! ( -path ./lost+found -uid 0 )
                ! ( -path ./quota.user -uid 0 )
                ! ( -path ./aquota.user -uid 0 )
                ! ( -path ./quota.group -uid 0 )
                ! ( -path ./aquota.group -uid 0 )
                ! ( -path ./.journal -uid 0 )
                ! ( -path ./.clean -uid 0 )
                ! ( -path './...security*' -uid 0 )'

        mkflagfile /tmp/.clean || return 1

        report_err()
        {
                if [ "$VERBOSE" = no ]
                then
                        log_failure_msg "bootclean: Failure cleaning /tmp."
                else
                        log_action_end_msg 1 "bootclean: Failure
cleaning /tmp"
                fi
        }

        #
        # First remove all old files...
        # (Use xargs here so that only one additional process gets created)
        #
        find . -depth -xdev $TEXPR $EXCEPT ! -type d \
                -print0 | xargs -0r rm -f -- \

                || { report_err ; return 1 ; }

Assuming a TMPCLEAN value of 3 days, I tried the following on my laptop:
geeKISSexy:/tmp# find . -depth -xdev -mtime +3 -ctime +3
./ksocket-rrs/secret-cookie
./zmann8cH1i
./plugins
./features

Where are there are many files/folders older than 3 days. I understand that
they aren't listed here because their access time would be lesser than 3
days.

My only question is is under what criteria is the access time for a
file/folder altered ? If I browse the /tmp folder using the Konqueror File
Manager, Is it going to alter the access time for the files/folders
under /tmp ?

Thanks,
Ritesh

On Wednesday 06 September 2006 18:00, you wrote:
> [Ritesh Raj Sarraf]
>
> > You can notice that there are many files which are older than 5
> > days, but they aren't cleaned.
>
> Are you expecting TMPTIME to have effect on an ongoing basis, aka to
> make sure /tmp/ only have files newer than 5 days old?
>
> The TMPTIME value only affect the behaviour during boot.  If you want
> something that clean /tmp/ daily, please check out some of the
> packages to do that, for example tmpreaper.  If the documentation for
> TMPTIME fail to make this clear, how can we change the text to make it
> clearer?
>
> If your problem is that the files are not cleaned during boot, please
> try to run 'sh -x /etc/init.d/bootclean' and submit the output here.
>
> Friendly,

--
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
"Stealing logic from one person is plagiarism, stealing from many is
research."
"The great are those who achieve the impossible, the petty are those who
cannot - rrs"

-------------------------------------------------------

-- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
"Stealing logic from one person is plagiarism, stealing from many is 
research."
"The great are those who achieve the impossible, the petty are those who 
cannot - rrs"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20061012/5de878cf/attachment.pgp


More information about the Pkg-sysvinit-devel mailing list