From 7ed27bf0f1dedb7616c807ee13bd0870ed5c6093 Mon Sep 17 00:00:00 2001 From: Adel Noureddine Date: Thu, 11 Jul 2024 16:00:47 +0200 Subject: [PATCH 1/2] Fix updating PID list of monitored application --- src/cpu_stat_app.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cpu_stat_app.adb b/src/cpu_stat_app.adb index 80daa0a..5c99fff 100644 --- a/src/cpu_stat_app.adb +++ b/src/cpu_stat_app.adb @@ -70,10 +70,11 @@ package body CPU_STAT_App is Command : String := "pidof " & To_String (App_Data.App_Name); Args : Argument_List_Access; Status : aliased Integer; - Subs : String_Split.Slice_Set; -- Used to slice the read data from stat file + Subs : String_Split.Slice_Set; -- Used to slice the read data from PID list Seps : constant String := " "; -- Seperator (space) for slicing string Slice_number_count : String_Split.Slice_Number; Loop_I : Integer; + Test : Integer; begin Args := Argument_String_To_List (Command); declare @@ -94,7 +95,7 @@ package body CPU_STAT_App is for I in 1 .. Slice_number_count loop Loop_I := Integer'Value (String_Split.Slice_Number'Image (I)); - App_Data.PID_Array(Loop_I) := Integer'Value (String_Split.Slice (Subs, 1)); + App_Data.PID_Array(Loop_I) := Integer'Value (String_Split.Slice (Subs, I)); end loop; end; exception From a5d3337af1871eaeb10ed174a319b85cb719417e Mon Sep 17 00:00:00 2001 From: Adel Noureddine Date: Thu, 11 Jul 2024 16:06:49 +0200 Subject: [PATCH 2/2] Prepare 1.0.4 --- alire.toml | 2 +- installer/aur/PKGBUILD | 2 +- installer/powerjoular.spec | 4 +++- release-version.sh | 2 +- src/help_info.adb | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/alire.toml b/alire.toml index 766b863..d9ee754 100644 --- a/alire.toml +++ b/alire.toml @@ -1,6 +1,6 @@ name = "powerjoular" description = "Monitoring the power consumption of multiple platforms and processes" -version = "1.0.3" +version = "1.0.4" authors = ["Adel Noureddine"] maintainers = ["Adel Noureddine "] diff --git a/installer/aur/PKGBUILD b/installer/aur/PKGBUILD index 9815adc..194fe75 100644 --- a/installer/aur/PKGBUILD +++ b/installer/aur/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Adel Noureddine pkgname=powerjoular -pkgver=1.0.3 +pkgver=1.0.4 pkgrel=1 pkgdesc="PowerJoular allows monitoring power consumption of multiple platforms and processes." arch=('x86_64' 'aarch64' 'armv7h') diff --git a/installer/powerjoular.spec b/installer/powerjoular.spec index c1ccaed..6ba05ac 100644 --- a/installer/powerjoular.spec +++ b/installer/powerjoular.spec @@ -1,5 +1,5 @@ Name: powerjoular -Version: 1.0.3 +Version: 1.0.4 Release: 1%{?dist} Summary: PowerJoular allows monitoring power consumption of multiple platforms and processes. @@ -22,6 +22,8 @@ install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/systemd/system/%{name}. %{_sysconfdir}/systemd/system/%{name}.service %changelog +* Wed Jul 11 2024 Adel Noureddine - 1.0.4-1 +- Hotfix for error in updating PID list for monitoring an application by name * Thu Jul 08 2024 Adel Noureddine - 1.0.3-1 - Hotfix for handle exceptions for invalid command line arguments * Thu Jul 08 2024 Adel Noureddine - 1.0.2-1 diff --git a/release-version.sh b/release-version.sh index 543181f..73232ed 100644 --- a/release-version.sh +++ b/release-version.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=1.0.3 +VERSION=1.0.4 # First cross compiler diff --git a/src/help_info.adb b/src/help_info.adb index 9a0c8f6..6cde9f6 100644 --- a/src/help_info.adb +++ b/src/help_info.adb @@ -14,7 +14,7 @@ with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; package body Help_Info is - Version_Number : constant String := "1.0.3"; + Version_Number : constant String := "1.0.4"; procedure Show_Help is begin