Skip to content

Commit

Permalink
Merge pull request #135 from andresgongora/develop
Browse files Browse the repository at this point in the history
v2.1.5
  • Loading branch information
andresgongora authored Sep 4, 2019
2 parents 576f35c + d17bff8 commit e3f08f0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions config_templates/status.config
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ info_label_width=16 # Desired length of the info labels
print_cols_max=100 # Keep logo and info text together
print_logo_right=false # Change where the logo is plotted
date_format="%Y.%m.%d - %T" # see 'man date'
clear_before_print=false # Dangerous if true, some messages might be lost
print_extra_new_line_top=true # Extra line before logo and info
print_extra_new_line_bot=true # Extra line after logo and info

Expand Down
14 changes: 13 additions & 1 deletion doc/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
<!--------------------------------------+-------------------------------------->
# v2.1.3
# v2.1.5
<!--------------------------------------+-------------------------------------->

- Fix top delay parameter to avoid conflicts depending on locale config,
reported by b1oki






<!--------------------------------------+-------------------------------------->
# v2.1.3 & v2.1.4
<!--------------------------------------+-------------------------------------->

- Fix long GPU name issue, reported by slink007
Expand Down
8 changes: 5 additions & 3 deletions synth-shell/status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,7 @@ printHeader()


## PRINT TOP SPACER
if $clear_before_print; then clear; fi
if $print_extra_new_line_top; then echo ""; fi


Expand Down Expand Up @@ -1035,11 +1036,12 @@ printHogsCPU()
## CALL TOP IN BATCH MODE
## Check if "%Cpus(s)" is shown, otherwise, call "top -1"
## Escape all '%' characters
local top=$(nice 'top' -b -d 0.1 -n 1 )
local delay=$(echo "scale=5; 1/1000" | bc)
local top=$(nice 'top' -b -d $delay -n 1 )
local cpus=$(echo "$top" | grep "Cpu(s)" )
if [ -z "$cpus" ]; then
echo ":("
local top=$(nice 'top' -b -d 0.1 -1 -n 1 )
local top=$(nice 'top' -b -d $delay -1 -n 1 )
local cpus=$(echo "$top" | grep "Cpu(s)" )
fi
local top=$(echo "$top" | sed 's/\%/\%\%/g' )
Expand Down Expand Up @@ -1201,6 +1203,7 @@ local date_format="%Y.%m.%d - %T"
local print_cpu_hogs_num=3
local print_cpu_hogs=true
local print_memory_hogs=true
local clear_before_print=false
local print_extra_new_line_top=true
local print_extra_new_line_bot=true

Expand Down Expand Up @@ -1229,7 +1232,6 @@ local fc_none=$(getFormatCode -e reset)


## PRINT STATUS ELEMENTS
#clear
printHeader
printLastLogins
printSystemctl
Expand Down

0 comments on commit e3f08f0

Please sign in to comment.