diff --git a/defaults b/defaults index 17aff2e..7c198ba 100644 --- a/defaults +++ b/defaults @@ -219,6 +219,7 @@ timing_play_delay_d=19 # milliseconds between frames playback, if echo so dash_sql_filename_d='qn.db' # name for the sqlite database in the $CFGDIR directory dash_refresh_d=20 # seconds for the webpage to reload dash_lastheard_count_d=20 # maximum number of last heard entries to display +dash_show_sy_d=true # set to false if for no System Info section dash_show_lh_d=true # set to false if for no Last Heard section dash_show_ps_d=true # set to false if for no Processes section dash_show_ip_d=true # set to false if for no IP Addresses section diff --git a/index.php b/index.php index c343d49..e4d8f45 100644 --- a/index.php +++ b/index.php @@ -133,6 +133,27 @@ if ('true' == GetCFGValue('dash_show_ps') && `ps -aux | grep -e qn -e MMDVMHost echo '', "\n"; } +if ('true' == GetCFGValue('dash_show_sy')) { + echo 'System Info:
', "\n"; + $hn = trim(`uname -n`); + $kn = trim(`uname -rmo`); + $oslist = explode(':', `lsb_release -d`); + $os = trim($oslist[1]); + $cu = trim(`cat /proc/cpuinfo | grep Model`); + if (0 == strlen($cu)) + $cu = trim(`cat /proc/cpuinfo | grep "model name"`); + $culist = explode("\n", $cu); + $mnlist = explode(':', $culist[0]); + $cu = trim($mnlist[1]); + if (count($culist) > 1) + $cu .= ' ' . count($culist) . ' Threads'; + if (file_exists('/opt/vc/bin/vcgencmd')) + $cu .= ' ' . `/opt/vc/bin/vcgencmd measure_temp`; + echo '', "\n"; + echo '', "\n"; + echo '', "\n"; +} + if ('true' == GetCFGValue('dash_show_lh')) { echo 'Last Heard:
', "\n"; $rstr = 'MyCall/Sfx Source Last Time
'; diff --git a/qnconfig b/qnconfig index 5b8cd04..234739d 100755 --- a/qnconfig +++ b/qnconfig @@ -147,6 +147,7 @@ DashboardMenu () { echo -n "r : Refresh time (sec) for page = "; EvaluateVar dash_refresh{,_d} echo -n "c : Max number of last heard entries = "; EvaluateVar dash_lastheard_count{,_d} echo -n "p : Show the Processes = "; EvaluateVar dash_show_ps{,_d} + echo -n "y : Show the System = "; EvaluateVar dash_show_sy{,_d} echo -n "l : Show the Last Heard = "; EvaluateVar dash_show_lh{,_d} echo -n "i : Show the IP Addresses = "; EvaluateVar dash_show_ip{,_d} echo -n "m : Show the Modules(s) = "; EvaluateVar dash_show_mo{,_d} @@ -157,6 +158,7 @@ DashboardMenu () { elif [[ "$key" == r* ]]; then dash_refresh="$value" elif [[ "$key" == c* ]]; then dash_lastheard_count="$value" elif [[ "$key" == p* ]]; then SetBooleanValue dash_show_ps "$value" + elif [[ "$key" == y* ]]; then SetBooleanValue dash_show_sy "$value" elif [[ "$key" == l* ]]; then SetBooleanValue dash_show_lh "$value" elif [[ "$key" == i* ]]; then SetBooleanValue dash_show_ip "$value" elif [[ "$key" == m* ]]; then SetBooleanValue dash_show_mo "$value" @@ -166,6 +168,7 @@ DashboardMenu () { elif [[ "$value" == r* ]]; then unset dash_refresh elif [[ "$value" == c* ]]; then unset dash_lastheard_count elif [[ "$value" == p* ]]; then unset dash_show_ps + elif [[ "$value" == y* ]]; then unset dash_show_sy elif [[ "$value" == l* ]]; then unset dash_show_lh elif [[ "$value" == i* ]]; then unset dash_show_ip elif [[ "$value" == m* ]]; then unset dash_show_mo @@ -700,6 +703,7 @@ WriteCFGFile () { [ -z "${dash_show_ip+x}" ] || echo "dash_show_ip=${dash_show_ip}" >> $outFile [ -z "${dash_show_lh+x}" ] || echo "dash_show_lh=${dash_show_lh}" >> $outFile [ -z "${dash_show_ps+x}" ] || echo "dash_show_ps=${dash_show_ps}" >> $outFile + [ -z "${dash_show_sy+x}" ] || echo "dash_show_sy=${dash_show_sy}" >> $outFile [ -z "${dash_show_mo+x}" ] || echo "dash_show_mo=${dash_show_mo}" >> $outFile [ -z "${dash_show_ur+x}" ] || echo "dash_show_ur=${dash_show_ur}" >> $outFile clear @@ -733,7 +737,7 @@ while [[ "$ans" != q* ]] do clear echo - echo " QnConfig Main Menu V#200312" + echo " QnConfig Main Menu V#200326" echo echo -n "a : Module A - "; if [ -z $module_a ]; then echo ""; else echo "${module_a^^}"; fi echo -n "b : Module B - "; if [ -z $module_b ]; then echo ""; else echo "${module_b^^}"; fi
HostnameKernelOSCPU
', $hn, '', $kn, '', $os, '', $cu, '