summaryrefslogtreecommitdiff
path: root/pexpect/examples/monitor.py
diff options
context:
space:
mode:
Diffstat (limited to 'pexpect/examples/monitor.py')
-rwxr-xr-xpexpect/examples/monitor.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pexpect/examples/monitor.py b/pexpect/examples/monitor.py
index aab1d17..29e54fc 100755
--- a/pexpect/examples/monitor.py
+++ b/pexpect/examples/monitor.py
@@ -7,6 +7,7 @@
Run and parse 'uptime'.
Run 'iostat'.
Run 'vmstat'.
+ Run 'netstat'
Run 'free'.
Exit the remote host.
@@ -80,6 +81,12 @@ child.expect (COMMAND_PROMPT)
print
print child.before
+# Run netstat
+child.sendline ('netstat')
+child.expect (COMMAND_PROMPT)
+print
+print child.before
+
# Run free.
child.sendline ('free') # Linux systems only.
child.expect (COMMAND_PROMPT)