1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
Description: <short summary of the patch>
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.
.
ruptime (1.8-3) unstable; urgency=medium
.
* d/ruptime.postinst: use absolute paths for ucf.
Author: Alex Myczko <[email protected]>
---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2024-11-06
--- ruptime-1.8.orig/ruptime
ruptime-1.8/ruptime
@@ -4,7 4,7 @@ export LC_ALL=C
d=$(basename "$0")
pgrep "$d -u" >/dev/null && exit 0
-# cd /usr/bin && for a in ruptime runame rhw rsw rnet rbench rdisk rload rac rboot rwho; do ln -sf ruptime $a; done
# cd /usr/bin && for a in ruptime runame rhw rsw rnet rbench rdisk rload rac rwho; do ln -sf ruptime $a; done
if [ -f /etc/ruptime/ruptime.conf ]; then
. /etc/ruptime/ruptime.conf
@@ -147,19 147,6 @@ done)
cpu=$(printf "CPU %.2f %s\n" $(echo $end2 - $start2 | bc) $cores)
u=$(printf "%-28s %s\n" "$k" "$mem $cpu" | openssl enc -A -a -aes-192-cbc -pbkdf2 -pass env:KEY -in - -out -)
;;
- rboot)
- r=0
- # logged in users
- liun=$(who |grep -v root | awk '{print $1}' |sort -u|wc -l)
- r=$((r liun))
- # screen or tmux sessions
- sotn=$(ps -ef |grep 'screen\|tmux' |grep -v grep | awk '{print $1 " " $NF}' |sort -u|wc -l)
- r=$((r sotn))
- # something is running
- cpu=$(uptime | sed s,.*:,,g | sed s/,//g|awk '{printf("%.0f\n",$(NF-2))}')
- r=$((r cpu))
- u=$(printf "%-28s %s\n" "$k" "users $liun screen/tmux $sotn CPU $cpu gore $r" | openssl enc -A -a -aes-192-cbc -pbkdf2 -pass env:KEY -in - -out -)
- ;;
rnet)
netdev=$(ip r |grep ^default |head -1|sed "s,.*dev ,,g" |awk '{print $1}'|head -1)
s=$(echo "$netdev $(cat /sys/class/net/${netdev}/speed)Mb/s")
|