* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. faec72df5d9f18703bdcd5d655171558b671a4bc
@ 2021-07-14 8:23 Arne Fitzenreiter
0 siblings, 0 replies; only message in thread
From: Arne Fitzenreiter @ 2021-07-14 8:23 UTC (permalink / raw)
To: ipfire-scm
[-- Attachment #1: Type: text/plain, Size: 4238 bytes --]
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, next has been updated
via faec72df5d9f18703bdcd5d655171558b671a4bc (commit)
via 3212dcddbae64a36af3d82bb0bb555e410d533a4 (commit)
via 023f43ff404d133717afe403c3085567450c8445 (commit)
from 839bc5527a236db38ea234633e3cff1215259a97 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit faec72df5d9f18703bdcd5d655171558b671a4bc
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Wed Jul 14 10:20:23 2021 +0200
core159: add makegraphs and hddshutdown cronjob
Signed-off-by: Arne Fitzenreiter <arne_f(a)ipfire.org>
commit 3212dcddbae64a36af3d82bb0bb555e410d533a4
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Wed Jul 14 08:14:21 2021 +0200
crontab: dont run makegraphs and hddshutdown to the same time
Signed-off-by: Arne Fitzenreiter <arne_f(a)ipfire.org>
commit 023f43ff404d133717afe403c3085567450c8445
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Wed Jul 14 08:12:16 2021 +0200
makegraphs: fix status collection for hddshutdown
with kernel 5.10.x also the reading of s.m.a.r.t. data to update
the temperatur graphs is countet as disk read so update the stored
value after reading.
Signed-off-by: Arne Fitzenreiter <arne_f(a)ipfire.org>
-----------------------------------------------------------------------
Summary of changes:
config/cron/crontab | 2 +-
config/rootfiles/core/159/filelists/files | 1 +
config/rootfiles/core/159/update.sh | 5 +++++
src/scripts/makegraphs | 9 +++++++++
4 files changed, 16 insertions(+), 1 deletion(-)
Difference in files:
diff --git a/config/cron/crontab b/config/cron/crontab
index f1ac3666d..d94dd65c2 100644
--- a/config/cron/crontab
+++ b/config/cron/crontab
@@ -36,7 +36,7 @@ HOME=/
find /var/log/logwatch/ -ctime +${LOGWATCH_KEEP=56} -exec rm -f '{}' ';'
# hddshutdown
-*/30 * * * * /usr/local/bin/hddshutdown >/dev/null
+2,32 * * * * /usr/local/bin/hddshutdown >/dev/null
# connection-scheduler
*/5 * * * * /usr/local/bin/connscheduler timer > /dev/null
diff --git a/config/rootfiles/core/159/filelists/files b/config/rootfiles/core/159/filelists/files
index 0fa6cd7fb..a788f2c3b 100644
--- a/config/rootfiles/core/159/filelists/files
+++ b/config/rootfiles/core/159/filelists/files
@@ -2,3 +2,4 @@ etc/rc.d/init.d/firewall
etc/rc.d/init.d/leds
etc/rc.d/init.d/networking/functions.network
etc/rc.d/init.d/sysctl
+usr/local/bin/makegraphs
diff --git a/config/rootfiles/core/159/update.sh b/config/rootfiles/core/159/update.sh
index a6e93a606..9582c3ece 100644
--- a/config/rootfiles/core/159/update.sh
+++ b/config/rootfiles/core/159/update.sh
@@ -127,6 +127,11 @@ fi
/usr/local/bin/openvpnctrl -s
/usr/local/bin/openvpnctrl -sn2n
+# Update hddshutdown cronjob
+sed -e "s|^.*/usr/local/bin/hddshutdown.*$|2,32 * * * * \t/usr/local/bin/hddshutdown >/dev/null|g" \
+ -i /var/spool/cron/root.orig
+fcrontab -z
+
# remove lm_sensor config after collectd was started
# to reserch sensors at next boot with updated kernel
rm -f /etc/sysconfig/lm_sensors
diff --git a/src/scripts/makegraphs b/src/scripts/makegraphs
index f8f6f70a9..5bfb05d2a 100644
--- a/src/scripts/makegraphs
+++ b/src/scripts/makegraphs
@@ -137,4 +137,13 @@ foreach (@disks){
close(DATEI);
updatehdddata($disk);
+
+ if ( $diskstats eq $newdiskstats ) {
+ # update diskstat because read temp change the status
+ my $newdiskstats = `/usr/bin/iostat -d -t $disk | tail -2 | head -1 | awk '{ print \$5","\$6}'`;
+ chomp $newdiskstats;
+ open(DATEI, ">/var/run/hddstats-$array[$#array]") || die "Datei nicht gefunden";
+ print DATEI $newdiskstats;
+ close(DATEI);
+ }
}
hooks/post-receive
--
IPFire 2.x development tree
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-14 8:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 8:23 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. faec72df5d9f18703bdcd5d655171558b671a4bc Arne Fitzenreiter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox