Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package cpulimit for openSUSE:Factory checked in at 2023-05-02 16:19:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cpulimit (Old) and /work/SRC/openSUSE:Factory/.cpulimit.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cpulimit" Tue May 2 16:19:32 2023 rev:6 rq:1083988 version:2.9 Changes: -------- --- /work/SRC/openSUSE:Factory/cpulimit/cpulimit.changes 2023-01-08 21:25:42.567307681 +0100 +++ /work/SRC/openSUSE:Factory/.cpulimit.new.1533/cpulimit.changes 2023-05-02 16:24:17.319682718 +0200 @@ -1,0 +2,8 @@ +Thu Apr 27 22:28:50 UTC 2023 - Dirk Müller <[email protected]> + +- update to 2.9: + * When counting CPU cycles (jiffies) we now use + a "long" type instead of "int" to avoid running + out of space when tracking on-running processes. + +------------------------------------------------------------------- Old: ---- cpulimit-2.8.tar.gz New: ---- cpulimit-2.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cpulimit.spec ++++++ --- /var/tmp/diff_new_pack.cFShtb/_old 2023-05-02 16:24:17.711685042 +0200 +++ /var/tmp/diff_new_pack.cFShtb/_new 2023-05-02 16:24:17.715685066 +0200 @@ -2,7 +2,7 @@ # # spec file for package cpulimit # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ Name: cpulimit -Version: 2.8 +Version: 2.9 Release: 0 Summary: Limit the CPU Usage of a Process License: GPL-2.0-or-later ++++++ cpulimit-2.8.tar.gz -> cpulimit-2.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpulimit-2.8/CHANGELOG new/cpulimit-2.9/CHANGELOG --- old/cpulimit-2.8/CHANGELOG 2022-11-11 18:18:55.000000000 +0100 +++ new/cpulimit-2.9/CHANGELOG 2023-03-10 23:43:58.000000000 +0100 @@ -1,3 +1,9 @@ +========== Changes in 2.9 ================ + +* When counting CPU cycles (jiffies) we now use + a "long" type instead of "int" to avoid running + out of space when tracking on-running processes. + ========== Changes in 2.8 ================ * Made exit message when child signal is caught only show up diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpulimit-2.8/Makefile new/cpulimit-2.9/Makefile --- old/cpulimit-2.8/Makefile 2022-11-11 18:19:06.000000000 +0100 +++ new/cpulimit-2.9/Makefile 2023-03-10 23:41:22.000000000 +0100 @@ -1,4 +1,4 @@ -VERSION?=2.8 +VERSION?=2.9 PREFIX?=/usr CFLAGS?=-Wall -O2 CC?=clang diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpulimit-2.8/cpulimit.c new/cpulimit-2.9/cpulimit.c --- old/cpulimit-2.8/cpulimit.c 2022-11-11 18:15:02.000000000 +0100 +++ new/cpulimit-2.9/cpulimit.c 2023-03-10 23:41:03.000000000 +0100 @@ -390,12 +390,12 @@ #ifdef FREEBSD -int getjiffies(int pid) +long getjiffies(int pid) { kvm_t *my_kernel = NULL; struct kinfo_proc *process_data = NULL; int processes; - int my_jiffies = -1; + long my_jiffies = -1; my_kernel = kvm_open(0, 0, 0, O_RDONLY, "kvm_open"); if (! my_kernel) @@ -418,7 +418,7 @@ #ifdef LINUX //get jiffies count from /proc filesystem -int getjiffies(int pid) { +long getjiffies(int pid) { static char stat[20]; static char buffer[1024]; char *p; @@ -435,10 +435,10 @@ while (sp--) p=memchr(p+1,' ',sizeof(buffer)-(p-buffer)); //user mode jiffies - int utime=atoi(p+1); + long utime=atol(p+1); p=memchr(p+1,' ',sizeof(buffer)-(p-buffer)); //kernel mode jiffies - int ktime=atoi(p+1); + long ktime=atol(p+1); return utime+ktime; } // could not read info @@ -450,7 +450,7 @@ //process instant photo struct process_screenshot { struct timespec when; //timestamp - int jiffies; //jiffies count of the process + long jiffies; //jiffies count of the process int cputime; //microseconds of work from previous screenshot to current }; @@ -483,7 +483,7 @@ //let's advance front index and save the screenshot front=(front+1)%MEM_ORDER; - int j=getjiffies(pid); + long j=getjiffies(pid); if (j>=0) ps[front].jiffies=j; else return -1; //error: pid does not exist @@ -521,7 +521,7 @@ dtwork+=ps[i].cputime; i=(i+1)%MEM_ORDER; } while (i!=max); - int used=ps[front].jiffies-ps[tail].jiffies; + long used=ps[front].jiffies-ps[tail].jiffies; float usage=(used*1000000.0/HZ)/dtwork; pusage->workingrate=1.0*dtwork/dt; pusage->pcpu=usage*pusage->workingrate;
