diff --git a/v2/examples/ex-df.md b/v2/examples/ex-df.md index eef8262..e6b0dcd 100644 --- a/v2/examples/ex-df.md +++ b/v2/examples/ex-df.md @@ -77,7 +77,7 @@ import tabulate print(tabulate.tabulate(rows,['Status','Partition','Use Percent'])) ``` -#### execution examples +#### Executing ``` # localhost $sshscript check.disk.space.spy diff --git a/v2/examples/ex-ping.md b/v2/examples/ex-ping.md index 8bbe18b..2fa77a7 100644 --- a/v2/examples/ex-ping.md +++ b/v2/examples/ex-ping.md @@ -7,6 +7,7 @@ You want to regularly check the connection states from group A to B. This example shows how to connect to all servers in group A and execute the "ping" command to database server B. ``` +## filename: example-ping.spy databaseServer = '192.168.1.100' ## suppose they share the same credentials username = 'user' @@ -26,3 +27,8 @@ for account,password in group: avg = sum(times)/len(times) if len(times) else 0 states[account] = time / received if received else 0 ``` + +#### Executing +``` +$sshscript example-ping.spy +``` \ No newline at end of file