summaryrefslogtreecommitdiff
path: root/op-templates/show
diff options
context:
space:
mode:
Diffstat (limited to 'op-templates/show')
-rw-r--r--op-templates/show/interfaces/ethernet/node.def2
-rw-r--r--op-templates/show/interfaces/ethernet/node.tag/node.def5
-rw-r--r--op-templates/show/interfaces/ethernet/node.tag/physical/node.def3
-rw-r--r--op-templates/show/interfaces/ethernet/node.tag/vif/node.def4
-rw-r--r--op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def5
-rw-r--r--op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def2
-rw-r--r--op-templates/show/interfaces/loopback/node.def3
-rw-r--r--op-templates/show/interfaces/loopback/node.tag/node.def5
-rw-r--r--op-templates/show/interfaces/node.def2
-rw-r--r--op-templates/show/interfaces/system/enabled/node.def2
-rw-r--r--op-templates/show/interfaces/system/node.def2
-rw-r--r--op-templates/show/interfaces/tunnel/node.def3
-rw-r--r--op-templates/show/interfaces/tunnel/node.tag/node.def5
-rw-r--r--op-templates/show/node.def1
-rw-r--r--op-templates/show/system/boot-messages/node.def2
-rw-r--r--op-templates/show/system/connections/node.def2
-rw-r--r--op-templates/show/system/kernel-messages/node.def2
-rw-r--r--op-templates/show/system/memory/node.def2
-rw-r--r--op-templates/show/system/node.def1
-rw-r--r--op-templates/show/system/processes/node.def2
-rw-r--r--op-templates/show/system/processes/summary/node.def2
-rw-r--r--op-templates/show/system/storage/node.def2
-rw-r--r--op-templates/show/version/node.def2
23 files changed, 61 insertions, 0 deletions
diff --git a/op-templates/show/interfaces/ethernet/node.def b/op-templates/show/interfaces/ethernet/node.def
new file mode 100644
index 0000000..9d70e68
--- /dev/null
+++ b/op-templates/show/interfaces/ethernet/node.def
@@ -0,0 +1,2 @@
+help: "Show ethernet interface information"
+run: ${ofr_bindir}/show_interfaces_ethernet
diff --git a/op-templates/show/interfaces/ethernet/node.tag/node.def b/op-templates/show/interfaces/ethernet/node.tag/node.def
new file mode 100644
index 0000000..df23e1d
--- /dev/null
+++ b/op-templates/show/interfaces/ethernet/node.tag/node.def
@@ -0,0 +1,5 @@
+help: "Show given ethernet interface information"
+allowed: local -a array ;
+ array=( /sys/class/net/{eth,vmnet}* ) ;
+ echo -n ${array[@]##*/}
+run: ${ofr_bindir}/show_interfaces_ethernet $4
diff --git a/op-templates/show/interfaces/ethernet/node.tag/physical/node.def b/op-templates/show/interfaces/ethernet/node.tag/physical/node.def
new file mode 100644
index 0000000..9e907d1
--- /dev/null
+++ b/op-templates/show/interfaces/ethernet/node.tag/physical/node.def
@@ -0,0 +1,3 @@
+help: "Show physical device information of given ethernet interface"
+allowed: ""
+run: sudo ethtool $4
diff --git a/op-templates/show/interfaces/ethernet/node.tag/vif/node.def b/op-templates/show/interfaces/ethernet/node.tag/vif/node.def
new file mode 100644
index 0000000..66490a7
--- /dev/null
+++ b/op-templates/show/interfaces/ethernet/node.tag/vif/node.def
@@ -0,0 +1,4 @@
+help: "Show given virtual network interface information"
+run: tput setaf ${COLOR_RED:-1} ;
+ echo error: need to supply vif # ;
+ tput op
diff --git a/op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def b/op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def
new file mode 100644
index 0000000..6e114d8
--- /dev/null
+++ b/op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def
@@ -0,0 +1,5 @@
+help: "Show given virtual network interface information"
+allowed: for eth in /sys/class/net/eth${4}.* ; do
+ echo ${eth/*eth${4}./} ;
+ done
+run: ${ofr_bindir}/show_interfaces_ethernet $4 vif $6
diff --git a/op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def b/op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def
new file mode 100644
index 0000000..56f986f
--- /dev/null
+++ b/op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def
@@ -0,0 +1,2 @@
+help: "Show given virtual network interface pseudo-physical information"
+run: ${ofr_bindir}/show_interfaces_ethernet $4 vif $6 physical
diff --git a/op-templates/show/interfaces/loopback/node.def b/op-templates/show/interfaces/loopback/node.def
new file mode 100644
index 0000000..45fa122
--- /dev/null
+++ b/op-templates/show/interfaces/loopback/node.def
@@ -0,0 +1,3 @@
+help: "Show loopback interface information"
+run: ${ofr_bindir}/show_interfaces_loopback
+
diff --git a/op-templates/show/interfaces/loopback/node.tag/node.def b/op-templates/show/interfaces/loopback/node.tag/node.def
new file mode 100644
index 0000000..a9d46b8
--- /dev/null
+++ b/op-templates/show/interfaces/loopback/node.tag/node.def
@@ -0,0 +1,5 @@
+help: "Show given loopback interface information"
+allowed: local -a array ;
+ array=( /sys/class/net/lo* ) ;
+ echo -n ${array[@]##*/}
+run: ${ofr_bindir}/show_interfaces_loopback $4
diff --git a/op-templates/show/interfaces/node.def b/op-templates/show/interfaces/node.def
new file mode 100644
index 0000000..e5ca525
--- /dev/null
+++ b/op-templates/show/interfaces/node.def
@@ -0,0 +1,2 @@
+help: "Show network interface information"
+run: ${ofr_bindir}/show_interfaces
diff --git a/op-templates/show/interfaces/system/enabled/node.def b/op-templates/show/interfaces/system/enabled/node.def
new file mode 100644
index 0000000..b0ca038
--- /dev/null
+++ b/op-templates/show/interfaces/system/enabled/node.def
@@ -0,0 +1,2 @@
+help: "Show network information of all enabled interfaces"
+run: ${ofr_bindir}/show_interfaces_system enabled
diff --git a/op-templates/show/interfaces/system/node.def b/op-templates/show/interfaces/system/node.def
new file mode 100644
index 0000000..e62ba92
--- /dev/null
+++ b/op-templates/show/interfaces/system/node.def
@@ -0,0 +1,2 @@
+help: "Show network information of all interfaces"
+run: ${ofr_bindir}/show_interfaces_system
diff --git a/op-templates/show/interfaces/tunnel/node.def b/op-templates/show/interfaces/tunnel/node.def
new file mode 100644
index 0000000..7bebfc2
--- /dev/null
+++ b/op-templates/show/interfaces/tunnel/node.def
@@ -0,0 +1,3 @@
+help: "Show tunnel interface information"
+run: ${ofr_bindir}/show_interfaces_tunnel
+
diff --git a/op-templates/show/interfaces/tunnel/node.tag/node.def b/op-templates/show/interfaces/tunnel/node.tag/node.def
new file mode 100644
index 0000000..b3748e2
--- /dev/null
+++ b/op-templates/show/interfaces/tunnel/node.tag/node.def
@@ -0,0 +1,5 @@
+help: "Show given tunnel interface information"
+allowed: local -a array ;
+ array=( /sys/class/net/sit* ) ;
+ echo -n ${array[@]##*/}
+run: ${ofr_bindir}/show_interfaces_tunnel $4
diff --git a/op-templates/show/node.def b/op-templates/show/node.def
new file mode 100644
index 0000000..73e140d
--- /dev/null
+++ b/op-templates/show/node.def
@@ -0,0 +1 @@
+help: "Show system information"
diff --git a/op-templates/show/system/boot-messages/node.def b/op-templates/show/system/boot-messages/node.def
new file mode 100644
index 0000000..7180083
--- /dev/null
+++ b/op-templates/show/system/boot-messages/node.def
@@ -0,0 +1,2 @@
+help: "Show kernel boot messages"
+run: ${OFR_PAGER:-cat -s} /var/log/dmes? /dev/null
diff --git a/op-templates/show/system/connections/node.def b/op-templates/show/system/connections/node.def
new file mode 100644
index 0000000..2341c5f
--- /dev/null
+++ b/op-templates/show/system/connections/node.def
@@ -0,0 +1,2 @@
+help: "Show active network connections on the system"
+run: netstat -an
diff --git a/op-templates/show/system/kernel-messages/node.def b/op-templates/show/system/kernel-messages/node.def
new file mode 100644
index 0000000..6d82b77
--- /dev/null
+++ b/op-templates/show/system/kernel-messages/node.def
@@ -0,0 +1,2 @@
+help: "Show messages in kernel ring buffer"
+run: dmesg | ${OFR_PAGER:-cat -s}
diff --git a/op-templates/show/system/memory/node.def b/op-templates/show/system/memory/node.def
new file mode 100644
index 0000000..af15820
--- /dev/null
+++ b/op-templates/show/system/memory/node.def
@@ -0,0 +1,2 @@
+help: "Show system memory usage"
+run: "free -ot"
diff --git a/op-templates/show/system/node.def b/op-templates/show/system/node.def
new file mode 100644
index 0000000..73e140d
--- /dev/null
+++ b/op-templates/show/system/node.def
@@ -0,0 +1 @@
+help: "Show system information"
diff --git a/op-templates/show/system/processes/node.def b/op-templates/show/system/processes/node.def
new file mode 100644
index 0000000..507ee60
--- /dev/null
+++ b/op-templates/show/system/processes/node.def
@@ -0,0 +1,2 @@
+help: "Show system processes"
+run: ps ax
diff --git a/op-templates/show/system/processes/summary/node.def b/op-templates/show/system/processes/summary/node.def
new file mode 100644
index 0000000..6cf3e55
--- /dev/null
+++ b/op-templates/show/system/processes/summary/node.def
@@ -0,0 +1,2 @@
+help: "Show summary of system processes"
+run: uptime
diff --git a/op-templates/show/system/storage/node.def b/op-templates/show/system/storage/node.def
new file mode 100644
index 0000000..7178454
--- /dev/null
+++ b/op-templates/show/system/storage/node.def
@@ -0,0 +1,2 @@
+help: "Show filesystem usage"
+run: df -h -x squashfs
diff --git a/op-templates/show/version/node.def b/op-templates/show/version/node.def
new file mode 100644
index 0000000..da526d2
--- /dev/null
+++ b/op-templates/show/version/node.def
@@ -0,0 +1,2 @@
+help: "Show OFR version information"
+run: cat $ofr_docdir/*/build.txt /dev/null