FastHandle is fast operation tools for infrastructure configurations and tests.
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
os:info:index.html [2017/12/17 22:57] kurihara |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | [[: | ||
| - | ====== Check OS Information (osinfo.py) ====== | ||
| - | \\ | ||
| - | {{INLINETOC}} | ||
| - | \\ | ||
| - | |||
| - | |||
| - | ===== Operation ===== | ||
| - | <sxh bash toolbar: | ||
| - | $ fab -l |grep osinfo. | ||
| - | |||
| - | $ echo x.x.x.x | fab auth.pro | ||
| - | $ fhghost.sh web hosts/pro | fab auth.pro | ||
| - | </ | ||
| - | |||
| - | \\ | ||
| - | ===== osinfo.py ===== | ||
| - | <sxh bash toolbar: | ||
| - | import sys | ||
| - | from fabric.api import * | ||
| - | from fabric.contrib import files | ||
| - | from datetime import datetime | ||
| - | |||
| - | FHHOME=os.environ[" | ||
| - | |||
| - | # | ||
| - | #systeminfo | ||
| - | # | ||
| - | @task | ||
| - | def systeminfo(): | ||
| - | hostname = run(" | ||
| - | date = datetime.now().strftime(' | ||
| - | yearmonth = datetime.now().strftime(' | ||
| - | outfile = systeminfo.%s.%s" | ||
| - | |||
| - | local(" | ||
| - | run(" | ||
| - | |||
| - | put(" | ||
| - | sudo(" | ||
| - | get(" | ||
| - | |||
| - | |||
| - | # | ||
| - | # check_reboot | ||
| - | # | ||
| - | @task | ||
| - | def check_reboot(): | ||
| - | date = datetime.now().strftime(' | ||
| - | outfile = check_reboot.%s" | ||
| - | |||
| - | run(" | ||
| - | put(" | ||
| - | sudo(" | ||
| - | |||
| - | |||
| - | # | ||
| - | # check_reboot_diff | ||
| - | # | ||
| - | @task | ||
| - | def check_reboot_diff(): | ||
| - | file1=run(" | ||
| - | file2=run(" | ||
| - | run(" | ||
| - | |||
| - | # | ||
| - | # check_ping_gw | ||
| - | # | ||
| - | @task | ||
| - | def check_ping_gw(): | ||
| - | run(" | ||
| - | put(" | ||
| - | run(" | ||
| - | </ | ||
| - | |||
| - | |||
| - | \\ | ||
| - | ===== Scripts ===== | ||
| - | |||
| - | |<100% 200px ->| | ||
| - | | [[os: | ||
| - | | [[os: | ||
| - | | [[os: | ||
| - | |||
| - | |||
| - | \\ | ||
| - | <WRAP box 90%> | ||
| - | [[: | ||
| - | <catlist ..: -noAddPageButton -noHead -sortAscending> | ||
| - | </ | ||
| - | |||
| - | \\ | ||
| - | \\ | ||
| - | [[: | ||
My Sites
SNS
Copyright (c) 2025 FastHandle - IT Operations Examples All Rights Reserved.