mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-20 13:33:23 -07:00
* usr/lib/byobu/entropy, usr/lib/byobu/include/shutil,
usr/lib/byobu/Makefile.am, usr/share/byobu/status/status, usr/share/man/man1/byobu.1: - add a system entropy status item
This commit is contained in:
parent
e7e313bdb1
commit
366308cbc8
6 changed files with 41 additions and 4 deletions
5
debian/changelog
vendored
5
debian/changelog
vendored
|
@ -1,6 +1,9 @@
|
||||||
byobu (4.55) unreleased; urgency=low
|
byobu (4.55) unreleased; urgency=low
|
||||||
|
|
||||||
* UNRELEASED
|
* usr/lib/byobu/entropy, usr/lib/byobu/include/shutil,
|
||||||
|
usr/lib/byobu/Makefile.am, usr/share/byobu/status/status,
|
||||||
|
usr/share/man/man1/byobu.1:
|
||||||
|
- add a system entropy status item
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 09 Dec 2011 20:38:02 -0600
|
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 09 Dec 2011 20:38:02 -0600
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
libdirdir = $(prefix)/lib/@PACKAGE@
|
libdirdir = $(prefix)/lib/@PACKAGE@
|
||||||
libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp color custom date disk disk_io distro ec2_cost fan_speed hostname ip_address load_average logo mail memory menu network processes raid rcs_cost reboot_required release services swap time time_binary time_utc trash updates_available uptime users whoami wifi_quality
|
libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp color custom date disk disk_io distro entropy ec2_cost fan_speed hostname ip_address load_average logo mail memory menu network processes raid rcs_cost reboot_required release services swap time time_binary time_utc trash updates_available uptime users whoami wifi_quality
|
||||||
|
|
||||||
|
|
31
usr/lib/byobu/entropy
Executable file
31
usr/lib/byobu/entropy
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
#
|
||||||
|
# entropy: system entropy
|
||||||
|
#
|
||||||
|
# Copyright (C) 2011 Dustin Kirkland <dustin.kirkland@gmail.com>
|
||||||
|
#
|
||||||
|
# Authors: Dustin Kirkland <dustin.kirkland@gmail.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/>.
|
||||||
|
|
||||||
|
__entropy_detail() {
|
||||||
|
cat /proc/sys/kernel/random/entropy_avail
|
||||||
|
}
|
||||||
|
|
||||||
|
__entropy() {
|
||||||
|
local e
|
||||||
|
read e < /proc/sys/kernel/random/entropy_avail
|
||||||
|
color k r; printf "e$e"; color --
|
||||||
|
}
|
||||||
|
|
||||||
|
# vi: syntax=sh ts=4 noexpandtab
|
|
@ -248,6 +248,7 @@ status_freq() {
|
||||||
disk_io) _RET=3 ;;
|
disk_io) _RET=3 ;;
|
||||||
distro) _RET=9999999 ;;
|
distro) _RET=9999999 ;;
|
||||||
ec2_cost) _RET=601 ;;
|
ec2_cost) _RET=601 ;;
|
||||||
|
entropy) _RET=5 ;;
|
||||||
fan_speed) _RET=23 ;;
|
fan_speed) _RET=23 ;;
|
||||||
hostname) _RET=607 ;;
|
hostname) _RET=607 ;;
|
||||||
ip_address) _RET=127 ;;
|
ip_address) _RET=127 ;;
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
screen_upper_left="color"
|
screen_upper_left="color"
|
||||||
screen_upper_right="color whoami hostname ip_address menu"
|
screen_upper_right="color whoami hostname ip_address menu"
|
||||||
screen_lower_left="color logo distro release #arch"
|
screen_lower_left="color logo distro release #arch"
|
||||||
screen_lower_right="color network #disk_io custom raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #time_utc date time"
|
screen_lower_right="color network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #time_utc date time"
|
||||||
|
|
||||||
# Tmux has one status line, with 2 halves for status
|
# Tmux has one status line, with 2 halves for status
|
||||||
tmux_left="logo #distro release #arch"
|
tmux_left="logo #distro release #arch"
|
||||||
tmux_right="network #disk_io custom raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #whoami #hostname #ip_address #time_utc date time"
|
tmux_right="network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #whoami #hostname #ip_address #time_utc date time"
|
||||||
|
|
|
@ -47,6 +47,8 @@ Note that BYOBU_CONFIG_DIR=\fI$XDG_CONFIG_HOME/byobu\fP if defined, and \fI$HOME
|
||||||
|
|
||||||
\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 '$'
|
||||||
|
|
||||||
|
\fBentropy\fP \- a count of the system's current entropy in bytes; displayed in the lower bar toward the right in red text on a black background; there is a leading 'e' to indicate 'entropy'
|
||||||
|
|
||||||
\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
|
\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 '$'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue