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/11/27 23:07] kurihara |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | [[: | ||
- | ====== Check OS Information ====== | ||
- | ===== Operation ===== | ||
- | <sxh bash toolbar: | ||
- | |||
- | </ | ||
- | |||
- | \\ | ||
- | ===== checkosinfo.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(" | ||
- | </ | ||
- | |||
- | |||
- | \\ | ||
- | ===== Scripts ===== | ||
- | |||
- | |<100% 200px ->| | ||
- | | [[os: | ||
- | | [[os: | ||
- | | [[scripts: | ||
- | |||
- | |||
- | \\ | ||
- | <WRAP box 90%> | ||
- | [[: | ||
- | <catlist -noAddPageButton -noHead -sortAscending> | ||
- | </ | ||
- | |||
- | \\ | ||
- | \\ | ||
- | [[: |
My Sites
SNS
Copyright (c) 2024 FastHandle - IT Operations Examples All Rights Reserved.