FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


os:package:cmd.html



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
os:package:cmd.html [2017/12/04 00:06]
kurihara
— (current)
Line 1: Line 1:
-[[:index.html#OS Management|Top#OS Management]] 
-~~NOTOC~~ 
-====== Commands Management====== 
- 
- 
-===== Operation ===== 
- 
-<sxh bash toolbar:false gutter:false> 
-$ echo a |fab -l |grep cmd. 
-$ echo a |fab auth.pro -- hostname 
- 
-$ echo xx.xx.xx.xx | fab  auth.pro  cmd.common 
-$ echo xx.xx.xx.xx | fab  auth.pro  cmd.pc 
-</sxh> 
- 
-\\ 
-===== cmd.py ===== 
- 
-<sxh python toolbar:false gutter:false> 
-import sys 
-from fabric.api import * 
- 
-#---------------------------------------------------------------------- 
-# Common 
-#---------------------------------------------------------------------- 
-@task 
-def common(): 
-    with hide('running'): 
-        run('which rsync       >/dev/null 2>&1 || echo "rsync NG"') 
-        run('which vim         >/dev/null 2>&1 || echo "vim   NG"') 
-        run('which tree        >/dev/null 2>&1 || echo "tree  NG"') 
-        run('which wget        >/dev/null 2>&1 || echo "wget  NG"') 
-        #Netowrk 
-        run('which ifconfig    >/dev/null 2>&1 || echo "ifconfig NG"') 
-        run('which netstat     >/dev/null 2>&1 || echo "netstat  NG"') 
-        run('which dig         >/dev/null 2>&1 || echo "dig      NG"') 
-        run('which host        >/dev/null 2>&1 || echo "host     NG"') 
-        run('which nmap        >/dev/null 2>&1 || echo "nmap     NG"') 
-        run('which nc          >/dev/null 2>&1 || echo "nc       NG"') 
-        run('which traceroute  >/dev/null 2>&1 || echo "traceroute  NG"') 
-        run('which tcpdump     >/dev/null 2>&1 || echo "tcpdump  NG"') 
-        run('which snmpget     >/dev/null 2>&1 || echo "snmpget  NG"') 
-        run('which snmpwalk    >/dev/null 2>&1 || echo "snmpwalk  NG"') 
-        #Peformance 
-        run('which dstat       >/dev/null 2>&1 || echo "dstat    NG"') 
-        run('which iperf       >/dev/null 2>&1 || echo "iperf    NG"') 
- 
-#---------------------------------------------------------------------- 
-# Server 
-#---------------------------------------------------------------------- 
- 
- 
-#---------------------------------------------------------------------- 
-# PC 
-#---------------------------------------------------------------------- 
- 
-</sxh> 
- 
-\\ 
-<WRAP box 90%> 
-[[:index.html#OS Management|Top#OS Management]] 
-<catlist -noAddPageButton -noHead> 
-</WRAP> 
  


os/package/cmd.html.1512313580.txt.gz · Last modified: 2017/12/04 00:06 by kurihara