mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-20 21:43:19 -07:00
* etc/byobu/statusrc, usr/bin/byobu-config, usr/lib/byobu/mail,
usr/lib/byobu/Makefile.am, usr/lib/byobu/raid, usr/share/byobu/profiles/common, usr/share/man/man1/byobu.1: - add a raid notification, LP: #669191
This commit is contained in:
parent
97efaf2244
commit
7912e8e0d9
8 changed files with 55 additions and 3 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -44,6 +44,10 @@ byobu (3.7) unreleased; urgency=low
|
||||||
usr/share/byobu/profiles/byoburc, usr/share/byobu/profiles/common,
|
usr/share/byobu/profiles/byoburc, usr/share/byobu/profiles/common,
|
||||||
usr/share/man/man1/byobu.1:
|
usr/share/man/man1/byobu.1:
|
||||||
- xdg user dirs overhaul, LP: #553105
|
- xdg user dirs overhaul, LP: #553105
|
||||||
|
* etc/byobu/statusrc, usr/bin/byobu-config, usr/lib/byobu/mail,
|
||||||
|
usr/lib/byobu/Makefile.am, usr/lib/byobu/raid,
|
||||||
|
usr/share/byobu/profiles/common, usr/share/man/man1/byobu.1:
|
||||||
|
- add a raid notification, LP: #669191
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 21 Oct 2010 12:09:14 -0500
|
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 21 Oct 2010 12:09:14 -0500
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ menu=1
|
||||||
network=0
|
network=0
|
||||||
notify_osd=0
|
notify_osd=0
|
||||||
processes=0
|
processes=0
|
||||||
|
raid=1
|
||||||
rcs_cost=0
|
rcs_cost=0
|
||||||
reboot_required=1
|
reboot_required=1
|
||||||
release=1
|
release=1
|
||||||
|
|
|
@ -314,6 +314,7 @@ def readstatus():
|
||||||
status["network"]=0
|
status["network"]=0
|
||||||
status["notify_osd"]=0
|
status["notify_osd"]=0
|
||||||
status["processes"]=0
|
status["processes"]=0
|
||||||
|
status["raid"]=1
|
||||||
status["rcs_cost"]=0
|
status["rcs_cost"]=0
|
||||||
status["reboot_required"]=1
|
status["reboot_required"]=1
|
||||||
status["release"]=1
|
status["release"]=1
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
libdirdir = $(prefix)/lib/@PACKAGE@
|
libdirdir = $(prefix)/lib/@PACKAGE@
|
||||||
libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp custom date disk disk_io ec2_cost fan_speed hostname ip_address load_average logo mail mem_available mem_used menu network .notify_osd notify_osd processes rcs_cost reboot_required release services time time_utc updates_available uptime users whoami wifi_quality
|
libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp custom date disk disk_io ec2_cost fan_speed hostname ip_address load_average logo mail mem_available mem_used menu network .notify_osd notify_osd processes raid rcs_cost reboot_required release services time time_utc updates_available uptime users whoami wifi_quality
|
||||||
|
|
||||||
|
|
|
@ -26,4 +26,4 @@ if [ "$1" = "--detail" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -s "$mailfile" ] && printf "$(color w k)[M]$(color -) " || exit 0
|
[ -s "$mailfile" ] && printf "$(color w k)[M]$(color -)" || exit 0
|
||||||
|
|
43
usr/lib/byobu/raid
Executable file
43
usr/lib/byobu/raid
Executable file
|
@ -0,0 +1,43 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
#
|
||||||
|
# raid: notify raid events, failures and syncing
|
||||||
|
# Copyright (C) 2010 Canonical Ltd.
|
||||||
|
#
|
||||||
|
# Authors: Dustin Kirkland <kirkland@canonical.com>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, version 3 of the License.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
PKG="byobu"
|
||||||
|
color 2>/dev/null || color() { true; }
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
--detail)
|
||||||
|
cat /proc/mdstat
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if grep -qs " blocks \[.*_.*\]$" /proc/mdstat; then
|
||||||
|
# Errors in your raid
|
||||||
|
msg="RAID"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if grep -qs \% /proc/mdstat; then
|
||||||
|
p=$(grep \% /proc/mdstat | sed -e "s/\%.*//" -e "s/.* //")
|
||||||
|
sync=",$p%%"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$msg" ]; then
|
||||||
|
printf "$(color B w r)%s%s$(color -)" "$msg" "$sync"
|
||||||
|
fi
|
||||||
|
|
|
@ -73,6 +73,7 @@ backtick 131 53 53 byobu-status services
|
||||||
backtick 132 11 11 byobu-status time_utc
|
backtick 132 11 11 byobu-status time_utc
|
||||||
backtick 133 3 3 byobu-status disk_io
|
backtick 133 3 3 byobu-status disk_io
|
||||||
backtick 134 613 613 byobu-status rcs_cost
|
backtick 134 613 613 byobu-status rcs_cost
|
||||||
|
backtick 135 7 7 byobu-status raid
|
||||||
|
|
||||||
hardstatus alwayslastline
|
hardstatus alwayslastline
|
||||||
|
|
||||||
|
@ -106,7 +107,7 @@ source $HOME/.local/share/byobu/keybindings
|
||||||
caption always "%12`%?%-Lw%50L>%?%{=r}%n*%f %t%?(%u)%?%{-}%12`%?%+Lw%?%11` %=%12`%110`%109`%122`%111`%10`%<"
|
caption always "%12`%?%-Lw%50L>%?%{=r}%n*%f %t%?(%u)%?%{-}%12`%?%+Lw%?%11` %=%12`%110`%109`%122`%111`%10`%<"
|
||||||
|
|
||||||
# Status string, last line
|
# Status string, last line
|
||||||
hardstatus string '%99`%{-}%{=r}%12` %100`%112`%= %130`%102`%101`%129`%131`%127`%114`%115`%108`%134`%128`%125`%126`%113`%119`%133`%117`%116`%106`%104`%103`%105`%107`%123`%132`%120`%121`'
|
hardstatus string '%99`%{-}%{=r}%12` %100`%112`%= %130`%135`%102`%101`%129`%131`%127`%114`%115`%108`%134`%128`%125`%126`%113`%119`%133`%117`%116`%106`%104`%103`%105`%107`%123`%132`%120`%121`'
|
||||||
|
|
||||||
# NOTE: Older version of screen have an arbitrary limit of only being able
|
# NOTE: Older version of screen have an arbitrary limit of only being able
|
||||||
# to change colors 16 times in this 'hardstatus string'.
|
# to change colors 16 times in this 'hardstatus string'.
|
||||||
|
|
|
@ -41,6 +41,8 @@ Note that DATA=\fI$HOME/.local/share/byobu\fP, per XDG Base Directory Specificat
|
||||||
|
|
||||||
\fBec2_cost\fP \- an estimation of the cost of the current boot of the system in terms of the Amazon EC2 billing model; displayed in the lower bar toward the right in green text on a black background; there is a leading '~' to indicate that this is an estimation, and the monetary units are US Dollars '$'
|
\fBec2_cost\fP \- an estimation of the cost of the current boot of the system in terms of the Amazon EC2 billing model; displayed in the lower bar toward the right in green text on a black background; there is a leading '~' to indicate that this is an estimation, and the monetary units are US Dollars '$'
|
||||||
|
|
||||||
|
\fBraid\fP \- note very prominently if there is a RAID failure detected, in red blinking text on a white background; the term 'RAID' notes that there is something wrong with the RAID, and if there is a rebuild/resync in progress, the percent complete is also shown
|
||||||
|
|
||||||
\fBrcs_cost\fP \- an estimation of the cost of the current boot of the system in terms of the Rackspace Cloud Server billing model; displayed in the lower bar toward the right in green text on a black background; there is a leading '~' to indicate that this is an estimation, and the monetary units are US Dollars '$'
|
\fBrcs_cost\fP \- an estimation of the cost of the current boot of the system in terms of the Rackspace Cloud Server billing model; displayed in the lower bar toward the right in green text on a black background; there is a leading '~' to indicate that this is an estimation, and the monetary units are US Dollars '$'
|
||||||
|
|
||||||
\fBfan_speed\fP \- cpu or system fan speed as reported by lm-sensors; displayed in the lower bar toward the right in black text on a grey background; there is a trailing 'rpm' for units
|
\fBfan_speed\fP \- cpu or system fan speed as reported by lm-sensors; displayed in the lower bar toward the right in black text on a grey background; there is a trailing 'rpm' for units
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue