Skip to content

Commit

Permalink
expands cli monitoring to include other armbianmonitor featurs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tearran committed Sep 6, 2024
1 parent b83338e commit 83e5683
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bin/armbian-configng
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ source "$lib_dir/config.ng.system.sh"
echo "Loaded System helpers..." #| show_infobox ;
source "$lib_dir/config.ng.network.sh"
echo "Loaded Network helpers..." #| show_infobox ;

source "$lib_dir/config.ng.software.sh"
echo "Loaded Software helpers..." #| show_infobox ;
#
# Loads the variables from beta armbian-config for runtime handling

Expand Down
8 changes: 5 additions & 3 deletions lib/armbian-configng/config.ng.jobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -516,14 +516,16 @@
},
{
"id": "I01",
"description": "CLI System Monitor",
"description": "System benchmaking and diagnostics",
"command": [
"armbianmonitor -m | show_infobox"
"see_monitoring"
],
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
"author": "",
"condition": "ls /usr/bin/armbianmonitor"

}
]
},
Expand Down
22 changes: 22 additions & 0 deletions lib/armbian-configng/config.ng.software.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module_options+=(
["see_monitoring,author"]="Joey Turner"
["see_monitoring,ref_link"]=""
["see_monitoring,feature"]="see_monitoring"
["see_monitoring,desc"]="Generate a markdown list json objects using jq."
["see_monitoring,example"]="see_monitoring"
["see_monitoring,status"]="review"
["see_monitoring,doc_link"]=""
)
#
# @decrition generate a menu for armbianmonitor
#
function see_monitoring() {
if [ -f /usr/bin/htop ]; then
choice=$(armbianmonitor -h | grep -Ev '^\s*-c\s|^\s*-M\s' | show_menu)

armbianmonitor -$choice

else
echo "htop is not installed"
fi
}

0 comments on commit 83e5683

Please sign in to comment.