New version, new man page, new tarball. Modified slightly -tc and -tm output to fix a

pet peeve of mine. Now, if -I, -b, -F, or anything that can trigger the memory: used/total
in Information line is not used, -tm will always show the system used/total ram data on the 
first line of the Memory item of -t output.

Also, if -xtc (trigger ram data in cpu output) is used, and -I is not triggered, and -tm is
not triggered, will also show system used/total ram data on the cpu first line.

I'd found it odd that this data did not appear when -tcm or -tm or -xtc were used, so this is
now fixed. I used the -t option a fair amount to find memory/cpu use issues, and usually I
don't use the option with other options, so the lack of total system ram data was odd.
This commit is contained in:
inxi-svn 2015-05-30 18:55:54 +00:00
parent 465c5e7752
commit 0e2afce7d6
3 changed files with 44 additions and 8 deletions

22
inxi
View file

@ -1,8 +1,8 @@
#!/usr/bin/env bash
########################################################################
#### Script Name: inxi
#### Version: 2.2.21
#### Date: 2015-05-13
#### Version: 2.2.22
#### Date: 2015-05-30
#### Patch Number: 00
########################################################################
#### SPECIAL THANKS
@ -13007,17 +13007,29 @@ print_ps_item()
eval $LOGFS
local a_ps_data='' ps_data='' line_starter='' line_start_data='' full_line=''
local app_name='' app_pid='' app_cpu='' app_mem='' throttled='' app_daemon=''
local b_print_first=$2 line_counter=0 i=0 count_nu='' extra_data=''
local b_print_first=$2 line_counter=0 i=0 count_nu='' extra_data='' memory='' extra_text=''
if [[ -n $PS_THROTTLED ]];then
throttled=" ${C1} - throttled from${C2} $PS_THROTTLED"
fi
case $1 in
cpu)
line_start_data="${C1}CPU - % used - top ${C2} $PS_COUNT ${C1}active$throttled "
if [[ $B_EXTRA_DATA == 'true' ]];then
extra_text=" ${C1}- Memory$SEP3 MB / % used"
if [[ $B_SHOW_INFO == 'false' && $B_SHOW_PS_MEM_DATA == 'false' ]];then
memory=" - ${C1}Used/Total$SEP3${C2} $( get_memory_data )"
fi
fi
line_start_data="${C1}CPU$SEP3 % used$extra_text$memory${C1} - top ${C2}$PS_COUNT ${C1}active$throttled"
;;
mem)
line_start_data="${C1}Memory - MB / % used - top ${C2} $PS_COUNT ${C1}active$throttled"
if [[ $B_EXTRA_DATA == 'true' ]];then
extra_text=" ${C1}- CPU$SEP3 % used"
fi
if [[ $B_SHOW_INFO == 'false' ]];then
memory=" - ${C1}Used/Total$SEP3${C2} $( get_memory_data )"
fi
line_start_data="${C1}Memory$SEP3 MB / % used$memory$extra_text${C1} - top ${C2}$PS_COUNT ${C1}active$throttled"
;;
esac

8
inxi.1
View file

@ -1,4 +1,4 @@
.TH INXI 1 "2015\-02\-15" inxi "inxi manual"
.TH INXI 1 "2015\-05\-30" inxi "inxi manual"
.SH NAME
inxi \- Command line system information script for console and IRC
.SH SYNOPSIS
@ -211,7 +211,8 @@ Make sure to have no space between letters and numbers (\fB\-t cm10\fR \- right,
\- cpu only. With \fB\-x\fR, shows also memory for that process on same line.
.TP
.B \-t m\fR
\- memory only. With \fB\-x\fR, shows also cpu for that process on same line.
\- memory only. With \fB\-x\fR, shows also cpu for that process on same line. If the \i-I line is not triggered,
will also show the system used/total ram information in the first \fBMemory\fR line of output.
.TP
.B \-t cm\fR
\- cpu+memory. With \fB\-x\fR, shows also cpu or memory for that process on same line.
@ -365,7 +366,8 @@ version number, if available.
\- Desktop toolkit if available (GNOME/XFCE/KDE only); Kernel gcc version.
.TP
.B \-x \-t
\- Adds memory use output to cpu (\fB\-xt c\fR), and cpu use to memory (\fB\-xt m\fR).
\- Adds memory use output to cpu (\fB\-xt c\fR), and cpu use to memory (\fB\-xt m\fR). For \fB\-xt c\fR will also show
system Used/Total ram data if \fB\-t m\fR (memory) is not used AND \fB\-I\fR is not triggered.
.TP
.B \-x \-w / \-W
\- Adds wind speed and time zone (\fB\-w\fR only), and makes output go to two lines.

View file

@ -1,3 +1,25 @@
=====================================================================================
Version: 2.2.22
Patch Version: 00
Script Date: 2015-05-30
-----------------------------------
Changes:
-----------------------------------
New version, new man page, new tarball. Modified slightly -tc and -tm output to fix a
pet peeve of mine. Now, if -I, -b, -F, or anything that can trigger the memory: used/total
in Information line is not used, -tm will always show the system used/total ram data on the
first line of the Memory item of -t output.
Also, if -xtc (trigger ram data in cpu output) is used, and -I is not triggered, and -tm is
not triggered, will also show system used/total ram data on the cpu first line.
I'd found it odd that this data did not appear when -tcm or -tm or -xtc were used, so this is
now fixed. I used the -t option a fair amount to find memory/cpu use issues, and usually I
don't use the option with other options, so the lack of total system ram data was odd.
-----------------------------------
-- Harald Hope - Sat, 30 May 2015 11:50:56 -0700
=====================================================================================
Version: 2.2.21
Patch Version: 00