+++ /dev/null
-LC_ALL=C TZ=GMT ./sar -uw -f tests/data-cd -s 23:59:58 -e 00:00:00 > tests/out.sar-cd.tmp && diff -u tests/expected.sar-cd tests/out.sar-cd.tmp
--- /dev/null
+rm -f tests/data-cd.tmp
+rm -f tests/root
+ln -s root1 tests/root
+STEP=`TZ=GMT date --date="2019-05-01 23:59:57" +%s`
+TZ=GMT ./sadc --unix_time=${STEP} -S A_NULL,A_CPU,A_PCSW tests/data-cd.tmp 1 1 >/dev/null
+
+rm -f tests/root
+ln -s root2 tests/root
+STEP=`TZ=GMT date --date="2019-05-01 23:59:58" +%s`
+TZ=GMT ./sadc --unix_time=${STEP} -S A_NULL,A_CPU,A_PCSW tests/data-cd.tmp 1 1 >/dev/null
+
+rm -f tests/root
+ln -s root3 tests/root
+STEP=`TZ=GMT date --date="2019-05-01 23:59:59" +%s`
+TZ=GMT ./sadc --unix_time=${STEP} -S A_NULL,A_CPU,A_PCSW tests/data-cd.tmp 1 1 >/dev/null
+
+rm -f tests/root
+ln -s root4 tests/root
+STEP=`TZ=GMT date --date="2019-05-02 00:00:00" +%s`
+TZ=GMT ./sadc --unix_time=${STEP} -S A_NULL,A_CPU,A_PCSW tests/data-cd.tmp 1 1 >/dev/null
+
+rm -f tests/root
+ln -s root5 tests/root
+STEP=`TZ=GMT date --date="2019-05-02 00:00:01" +%s`
+TZ=GMT ./sadc --unix_time=${STEP} -S A_NULL,A_CPU,A_PCSW tests/data-cd.tmp 1 1 >/dev/null
--- /dev/null
+LC_ALL=C TZ=GMT ./sar -uw -f tests/data-cd.tmp -s 23:59:58 -e 00:00:00 > tests/out.sar-cd.tmp && diff -u tests/expected.sar-cd tests/out.sar-cd.tmp
[Done on root4. IDs are determined at run-time using ./dev/disk/by-id contents]
00906 LC_ALL=C TZ=GMT ./sar -dh -j SID -f tests/data.tmp > tests/out.sar-jSID.tmp
00908 LC_ALL=C TZ=GMT ./sar -F -j UUID -f tests/data.tmp > tests/out.sar-F-jUUID.tmp
-00910 LC_ALL=C TZ=GMT ./sar -uw -f tests/data-cd -s 23:59:58 -e 00:00:00 > tests/out.sar-cd.tmp
- [Testing options -s/-e on a file contents spanning two consecutive days]
- [Work only with very simple file contents (no LINUX RESTART or COMMENT records)]
- [Note: "11:00:00 PM" is "23:00:00" - "12:00:00 AM" is "00:00:00"]
00920 LC_ALL=C TZ=GMT ./sar -f tests/data.tmp -e 13:30 -z -n DEV -dp > tests/out.sar-z.tmp
00930 LC_ALL=C TZ=GMT ./sar -ur 0 > tests/out.sar-0.tmp
00940 LC_ALL=C TZ=GMT ./sar 1 2 > tests/out.sar.tmp
[CPU#8 - Last in list - online then offline]
01720 LC_ALL=C TZ=GMT ./sar -P ALL -u -n SOFT 2 3 > tests/out.sar-cpu8off.tmp
[CPU#8 - Last in list - already offline]
-
-===== Creating datax.tmp [RC....R..CR.RR..CC.]
+01750 5 x TZ=GMT ./sadc --unix-time=xxxxxxxx -S A_NULL,A_CPU,A_PCSW tests/data-cd 1 1
+ [Create data-cd.tmp [.....] spanning two consecutive days]
+01755 LC_ALL=C TZ=GMT ./sar -uw -f tests/data-cd -s 23:59:58 -e 00:00:00 > tests/out.sar-cd.tmp
+ [Testing options -s/-e on a file contents spanning two consecutive days]
+ [Work only with very simple file contents (no LINUX RESTART or COMMENT records)]
+ [Note: "11:00:00 PM" is "23:00:00" - "12:00:00 AM" is "00:00:00"]
01800 n x TZ=GMT ./sadc --unix_time=xxxxxxxxxx tests/datax.tmp (...)
+ [Creating datax.tmp [RC....R..CR.RR..CC.] ]
01810 LC_ALL=C TZ=GMT ./sar -C -P ALL -uw -n DEV -F -I 2,3 -f tests/datax.tmp > tests/out.sar-ext-hl.tmp
===== iostat tests (basic output)
+++ /dev/null
-rm -f tests/data-cd.new
-
-rm -f tests/root
-ln -s root1 tests/root
-./sadc --unix_time=1556755197 -S A_NULL,A_CPU,A_PCSW tests/data-cd.new 1 1 >/dev/null
-
-rm -f tests/root
-ln -s root2 tests/root
-./sadc --unix_time=1556755198 -S A_NULL,A_CPU,A_PCSW tests/data-cd.new 1 1 >/dev/null
-
-rm -f tests/root
-ln -s root3 tests/root
-./sadc --unix_time=1556755199 -S A_NULL,A_CPU,A_PCSW tests/data-cd.new 1 1 >/dev/null
-
-rm -f tests/root
-ln -s root4 tests/root
-./sadc --unix_time=1556755200 -S A_NULL,A_CPU,A_PCSW tests/data-cd.new 1 1 >/dev/null
-
-rm -f tests/root
-ln -s root5 tests/root
-./sadc --unix_time=1556755201 -S A_NULL,A_CPU,A_PCSW tests/data-cd.new 1 1 >/dev/null
-Linux 1.2.3-TEST (SYSSTAT.TEST) 05/01/19 _x86_64_ (8 CPU)
+Linux 1.2.3-TEST (SYSSTAT.TEST) 05/01/19 _x86_64_ (9 CPU)
23:59:58 CPU %user %nice %system %iowait %steal %idle
-23:59:59 all 2.28 0.00 1.93 0.50 0.00 95.29
-00:00:00 all 2.66 23.20 2.27 0.16 0.00 71.71
+23:59:59 all 2.28 0.00 1.93 0.48 0.00 95.31
+00:00:00 all 2.66 23.20 2.27 0.17 0.00 71.70
Average: all 2.52 14.28 2.14 0.29 0.00 80.78
23:59:58 proc/s cswch/s