summaryrefslogtreecommitdiff
path: root/ckcptime.sh
diff options
context:
space:
mode:
authorwukong <wukong@longaeva>2025-11-22 00:02:20 -0800
committerwukong <wukong@longaeva>2025-11-22 00:02:20 -0800
commite9d3488a9ef1a1b5bf8e75afc719b3cce68b9853 (patch)
tree57e82d152261d445bdfc69b91d611d86236103a9 /ckcptime.sh
initial commit. ckt0.awk is launched from ckt0.sh with state stored in a shell variable.
Diffstat (limited to 'ckcptime.sh')
-rw-r--r--ckcptime.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/ckcptime.sh b/ckcptime.sh
new file mode 100644
index 0000000..079faa6
--- /dev/null
+++ b/ckcptime.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env sh
+
+# estimate sytem boot time
+
+# [debug] enable execution tracing
+#set -x
+set -e
+
+# raw input data
+#date +%s
+#sysctl kern.cp_time | awk -F= '{print($0)}'
+
+#printf "sec\n" | column -t
+for N in $(seq 0 45) ; do
+ #printf "${N} ${t0_est}\n" | column -t
+ awk -f ckcptime.awk
+ sleep $( awk 'BEGIN {print( rand()^2.0 + 1.0 )}' )
+done
+
+# [debug] disable execution tracing
+set +x