From 470af351a2225e8eac03b27e95ac193846e8824d Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 18 Nov 2010 14:04:25 -0800 Subject: Use lesspipe to display gzip files Bug 3719 Eval of lesspipe sets environment variables so that less can display gzip'd files --- templates/show/log/all/node.def | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/show/log/all/node.def b/templates/show/log/all/node.def index 069d1d4..243cf1b 100644 --- a/templates/show/log/all/node.def +++ b/templates/show/log/all/node.def @@ -1,4 +1,5 @@ help: Show contents of all master log files -run: less $_vyatta_less_options \ +run: eval $(lesspipe) + less $_vyatta_less_options \ --prompt=".log?m, file %i of %m., page %dt of %D" \ -- `printf "%s\n" /var/log/messages* | sort -nr` -- cgit v1.2.3 From 8e00bccdb5688298c1e005a0c41b002d15704f36 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Mon, 22 Nov 2010 11:34:04 -0800 Subject: Fix 6353: ENH: Rename "show configuration cmds" --- templates/show/configuration/cmds/node.def | 7 ------- templates/show/configuration/commands/node.def | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 templates/show/configuration/cmds/node.def create mode 100644 templates/show/configuration/commands/node.def (limited to 'templates') diff --git a/templates/show/configuration/cmds/node.def b/templates/show/configuration/cmds/node.def deleted file mode 100644 index a2d55cf..0000000 --- a/templates/show/configuration/cmds/node.def +++ /dev/null @@ -1,7 +0,0 @@ -help: Show running configuration as set commands -run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; - then - ${vyatta_sbindir}/vyatta-config-gen-sets.pl - else - echo Must be an admin user to run this command. - fi diff --git a/templates/show/configuration/commands/node.def b/templates/show/configuration/commands/node.def new file mode 100644 index 0000000..a2d55cf --- /dev/null +++ b/templates/show/configuration/commands/node.def @@ -0,0 +1,7 @@ +help: Show running configuration as set commands +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + ${vyatta_sbindir}/vyatta-config-gen-sets.pl + else + echo Must be an admin user to run this command. + fi -- cgit v1.2.3 From f9d661f8b251323d589218613899b7ed7a1456d6 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Sun, 21 Nov 2010 02:46:51 -0800 Subject: Allow admin users to disconnect PPP links. We need a sudo for admin users to be able to kill the "pon" processes that monitor individual "pppd" processes. --- templates/disconnect/interface/node.tag/node.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/disconnect/interface/node.tag/node.def b/templates/disconnect/interface/node.tag/node.def index 85233ec..a3b3cf3 100644 --- a/templates/disconnect/interface/node.tag/node.def +++ b/templates/disconnect/interface/node.tag/node.def @@ -22,7 +22,7 @@ run: if [ -n "$PON_PIDS" ]; then echo "killing pon pids: $PON_PIDS" for PID in $PON_PIDS ; do - kill -HUP $PID + sudo kill -HUP $PID done fi fi -- cgit v1.2.3 From 6ea23545e73c135b1ce67fa7fb63b998672ac282 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 7 Dec 2010 10:23:48 -0800 Subject: Add show system memory detail Bug 5704 --- templates/show/system/memory/detail/node.def | 2 ++ templates/show/system/memory/node.def | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 templates/show/system/memory/detail/node.def (limited to 'templates') diff --git a/templates/show/system/memory/detail/node.def b/templates/show/system/memory/detail/node.def new file mode 100644 index 0000000..04e98c5 --- /dev/null +++ b/templates/show/system/memory/detail/node.def @@ -0,0 +1,2 @@ +help: Report detailed system memory usage +run: cat /proc/meminfo diff --git a/templates/show/system/memory/node.def b/templates/show/system/memory/node.def index f66ce62..cee2320 100644 --- a/templates/show/system/memory/node.def +++ b/templates/show/system/memory/node.def @@ -1,2 +1,2 @@ -help: Show system memory usage +help: Display system memory usage run: free -ot -- cgit v1.2.3 From 3cb7388696d9473afebfbb097967ac8c865c203c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 7 Dec 2010 11:00:20 -0800 Subject: Add more options to show system processes Bug 1615 --- templates/show/system/processes/extensive/node.def | 2 ++ templates/show/system/processes/tree/node.def | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 templates/show/system/processes/extensive/node.def create mode 100644 templates/show/system/processes/tree/node.def (limited to 'templates') diff --git a/templates/show/system/processes/extensive/node.def b/templates/show/system/processes/extensive/node.def new file mode 100644 index 0000000..d737c21 --- /dev/null +++ b/templates/show/system/processes/extensive/node.def @@ -0,0 +1,2 @@ +help: Show extensive process info +run: top -b -n1 diff --git a/templates/show/system/processes/tree/node.def b/templates/show/system/processes/tree/node.def new file mode 100644 index 0000000..b3044fc --- /dev/null +++ b/templates/show/system/processes/tree/node.def @@ -0,0 +1,2 @@ +help: Show process tree +run: ps -ejH -- cgit v1.2.3 From ffa8809a4cdda655cc8e731dca7c6a95d49e931e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 7 Dec 2010 11:06:43 -0800 Subject: Add show system memory cache This provides information requested in Bug 515 --- templates/show/system/memory/cache/node.def | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 templates/show/system/memory/cache/node.def (limited to 'templates') diff --git a/templates/show/system/memory/cache/node.def b/templates/show/system/memory/cache/node.def new file mode 100644 index 0000000..5583a54 --- /dev/null +++ b/templates/show/system/memory/cache/node.def @@ -0,0 +1,2 @@ +help: Show kernel cache information +run: slabtop -o -- cgit v1.2.3