ref: 1c30e3934527639deeb8444f52c5cd6791d3aa59
parent: 6de16f7cc10b1f71169d7e119c8306f5d6e0be07
author: sl <sl@x1yg3>
date: Sun Jul 6 18:29:34 EDT 2025
add hstats
--- a/INDEX
+++ b/INDEX
@@ -28,6 +28,7 @@
gaff - rcpu to or rimport from gaff.inri.net
getspamhaus - download https://www.spamhaus.org/drop/drop.txt to /mail/lib/spamhaus
h - For reading text from bad websites on my phone.
+hstats - Print simple stats sl want's to know about.
img - upload an image to http://img.stanleylieber.com
n700 - Set preferred X11 mouse acceleration for Lenovo N700 wireless mouse.
nauth - rcpu to or rimport from auth.inri.net
--- /dev/null
+++ b/hstats
@@ -1,0 +1,26 @@
+#!/bin/rc
+# Print simple stats sl want's to know about.
+# 2024-03-01T12:26:55-05:00
+rfork en
+msg=`{date | awk '{print $1 " " $2 " " $3 " " substr($4, 1, length($4)-3)}'}+if(test -f /dev/cputempw){+ ct=`{cat /dev/cputemp | sed 's/±.//g'}+ if(! ~ $#ct 0)
+ msg=`{echo -n $"msg '|' c; echo $"ct}+}
+if(test -d /mnt/apm/battery){+ bt=`{sed 1q /mnt/apm/battery | awk '{print $2}'}+ if(! ~ $#bt 0)
+ msg=`{echo -n $"msg '|' b; echo $"bt}+}
+if(test -d /mail/fs/mbox){+ mb=`{ls /mail/fs/mbox | grep -v ctl | wc -l}+ if(! ~ $#mb 0)
+ msg=`{echo -n $"msg '|' m; echo $"mb}+}
+if(test -d $read/src){+ rm=`{ls -p $read/src | sort -n | tail -1}+ if(! ~ $#rm 0)
+ msg=`{echo -n $"msg '|' r ; echo $"rm}+}
+echo $"msg $"rmsg $"tmsg
--
⑨