• file delete

    From faeychild@2:250/1 to All on Tue Mar 8 23:30:34 2022


    One thing I notice is how long it can take to delete some files after an update.
    One in particular is "cpupower". It seems to take forever.

    So I was curious about what was happening. I though deleting was a
    matter of removing the inode.

    regards
    --
    faeychild
    Running plasmashell 5.20.4 on 5.15.25-desktop-1.mga8 kernel.
    Mageia release 8 (Official) for x86_64 installed via Mageia-8-x86_64-DVD.iso


    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Tue Mar 8 23:49:25 2022
    On Tue, 08 Mar 2022 18:30:34 -0500, faeychild <faeychild@nomail.afraid.org> wrote:
    One thing I notice is how long it can take to delete some files after an update.
    One in particular is "cpupower". It seems to take forever.
    So I was curious about what was happening. I though deleting was a
    matter of removing the inode.

    It's updating the files in /var/lib/rpm that keep track of things like which files
    are owned by which package. Whichever package is last to be deleted in a transaction
    will be the one that appears to be taking all of the time as it's updating the files
    for all of the packages in that transaction.

    Regards, Dave Hodgins

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Wed Mar 9 21:27:22 2022
    On 9/3/22 10:49, David W. Hodgins wrote:

    It's updating the files in /var/lib/rpm that keep track of things like
    which files
    are owned by which package. Whichever package is last to be deleted in a transaction
    will be the one that appears to be taking all of the time as it's
    updating the files
    for all of the packages in that transaction.

    Regards, Dave Hodgins


    thanks Dave.

    Just like the nvidia wrapper.
    The more kernels laying around the longer it takes



    --
    faeychild
    Running plasmashell 5.20.4 on 5.15.25-desktop-1.mga8 kernel.
    Mageia release 8 (Official) for x86_64 installed via Mageia-8-x86_64-DVD.iso


    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Wed Mar 9 22:00:59 2022
    On Wed, 09 Mar 2022 16:27:22 -0500, faeychild <faeychild@nomail.afraid.org> wrote:
    The more kernels laying around the longer it takes

    There are several scripts floating around to remove old kernels. I use the following ...

    $ cat /usr/local/sbin/oldkernelsrm
    #!/bin/bash
    # Set number of packages to keep. Must be 1 or greater
    declare -i NumberOfVersionsToKeep=2
    set -u
    ListInstalledPackages() {
    LatestPrefixStart="${LatestPrefix%%-*}"
    if [ "virtualbox" == "${LatestPrefixStart}" ] ; then
    PackagePrefix="virtualbox-kernel"
    elif [ "vboxadditions" == "${LatestPrefixStart}" ] ; then
    PackagePrefix="vboxadditions-kernel"
    elif [ "xtables" == "${LatestPrefixStart}" ] ; then
    PackagePrefix="xtables-addons-kernel"
    else
    PackagePrefix="$LatestPrefix"
    fi
    RpmOutputLines=($(rpm -qa $PackagePrefix-\[0-9\]*|sort -V))
    PackageCount=${#RpmOutputLines[@]}
    if (( $PackageCount > $NumberOfVersionsToKeep )) ; then
    LinesKeep=$(( $PackageCount - $NumberOfVersionsToKeep ))
    RemoveListNew=("$(printf "%s\n" "${RpmOutputLines[@]}"|head -n $LinesKeep)")
    RemoveList=(${RemoveList[@]-} ${RemoveListNew[@]})
    fi
    }
    ProcessLatest() {
    x="${LatestPackage%-*}" # strip last hyphen and following (removes rpm Release)
    x="${x%-*}" # strip last hyphen and following (removes rpm Version')
    LatestPrefix="${x%-*}" # strip last hyphen and following (removes '-latest')
    ListInstalledPackages
    }
    RemoveList=( )
    LatestPackagesList=($(rpm -qa *latest |grep -v perl-latest|sort))
    for LatestPackage in "${LatestPackagesList[@]}"; do
    ProcessLatest
    done
    if (( ${#RemoveList[@]} > 0 )) ; then
    urpme --wait-lock ${RemoveList[@]}
    fi
    exit

    After saving the above in the text file, don't forget to mark it executable.

    Regards, Dave Hodgins

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Thu Mar 10 20:28:24 2022
    On 10/3/22 09:00, David W. Hodgins wrote:


    After saving the above in the text file, don't forget to mark it
    executable.

    Regards, Dave Hodgins

    I see that it mentions virtualbox - a small complication.

    I used to do it the hard way with MCC, listing all the kernels and
    sorting carefully through the mess, triple quadruple checking.

    Until I discovered MCC could list just the installed files - the moment
    of stupid


    --
    faeychild
    Running plasmashell 5.20.4 on 5.15.25-desktop-1.mga8 kernel.
    Mageia release 8 (Official) for x86_64 installed via Mageia-8-x86_64-DVD.iso


    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Thu Mar 10 21:17:56 2022
    On Thu, 10 Mar 2022 15:28:24 -0500, faeychild <faeychild@nomail.afraid.org> wrote:
    On 10/3/22 09:00, David W. Hodgins wrote:
    After saving the above in the text file, don't forget to mark it
    executable.

    I see that it mentions virtualbox - a small complication.

    It handles any of the kernel related "latest" packages ...
    $ urpmq -y latest|grep kernel|sort -u
    kernel-desktop586-devel-latest
    kernel-desktop586-latest
    kernel-desktop-devel-latest
    kernel-desktop-latest
    kernel-linus-devel-latest
    kernel-linus-latest
    kernel-linus-source-latest
    kernel-server-devel-latest
    kernel-server-latest
    kernel-source-latest
    virtualbox-kernel-desktop-latest
    virtualbox-kernel-server-latest
    xtables-addons-kernel-desktop586-latest
    xtables-addons-kernel-desktop-latest
    xtables-addons-kernel-server-latest

    It has the exception logic needed to handle the differences in naming patterns between the kernels and the vb/xtables kernel packages.

    qa team members using it have to be careful to say no to the removal if it will uninstall any of the "latest" packages as the requires would no longer be met, such as when there have been several kernels installed without a corresponding kmod
    update, but other than that it works well. We have to wait till the kmod packages
    are updated too (kmod includes both the vb and xtables kernel packages).

    For regular users who do not install kernels from updates testing, it works fine
    at any time.

    I used to do it the hard way with MCC, listing all the kernels and
    sorting carefully through the mess, triple quadruple checking.
    Until I discovered MCC could list just the installed files - the moment
    of stupid

    :-)

    Regards, Dave Hodgins

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Fri Mar 11 08:23:55 2022
    On 11/3/22 08:17, David W. Hodgins wrote:

    $ urpmq -y latest|grep kernel|sort -u


    I sometimes lose awareness of just how many data lists are stored locally

    regards


    faeychild
    Running plasmashell 5.20.4 on 5.15.25-desktop-1.mga8 kernel.
    Mageia release 8 (Official) for x86_64 installed via Mageia-8-x86_64-DVD.iso


    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)