Skip to content

Instantly share code, notes, and snippets.

View toelke's full-sized avatar

Philipp Riederer toelke

View GitHub Profile
#!/bin/bash -exu
newest_base_version=$(curl -s -l ftp://ftp.kernel.org/pub/linux/kernel/projects/rt/ | sort -V | tail -n 1)
newest_patch_file=$(curl -s -l ftp://ftp.kernel.org/pub/linux/kernel/projects/rt/$newest_base_version/older/ | grep .patch.xz | sort -V | tail -n 1)
newest_version=$(echo $newest_patch_file | cut -d- -f2- | cut -d- -f1)
git fetch git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git refs/tags/v$newest_version:refs/tags/v$newest_version
git reset --hard v$newest_version
root@fos4backup:~# iostat -x -k 1
Linux 4.9.0-6-amd64 (fos4backup) 06/20/2018 _x86_64_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
3.08 0.02 1.73 61.97 0.00 33.19
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sdi 0.00 0.30 0.04 0.22 1.42 3.29 35.65 0.00 8.85 10.03 8.63 4.35 0.12
sdj 0.00 0.00 19.54 10.62 242.86 21.40 17.52 0.34 11.19 16.64 1.16 5.44 16.40
sdk 0.00 0.00 19.50 10.62 243.70 21.40 17.61 0.32 10.62 15.88 0.96 5.33 16.06
root@fos4backup:~# iostat -x -k 1
Linux 4.9.0-6-amd64 (fos4backup) 06/20/2018 _x86_64_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
3.08 0.02 1.73 61.98 0.00 33.19
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sdi 0.00 0.30 0.04 0.22 1.42 3.29 35.64 0.00 8.85 10.03 8.63 4.36 0.12
sdj 0.00 0.00 19.54 10.62 242.85 21.45 17.52 0.34 11.19 16.64 1.16 5.44 16.40
sdk 0.00 0.00 19.50 10.62 243.68 21.44 17.61 0.32 10.62 15.89 0.96 5.33 16.06