Skip to main content

No project description provided

Project description

code:: python

from Azog.base.exception import HostClientException from Azog import Host

hosts = [

{‘Address’: ‘192.223.42.25’, ‘Port’: 22, ‘User’: ‘root’, ‘Password’: ‘123456’},

]

if __name__ == ‘__main__’:

for i in hosts:
try:

h = Host(i) # system print(h.sys_info.get_uptime()) print(h.sys_info.get_load()) print(h.sys_info.get_kernel()) print(h.sys_info.get_release()) print(h.sys_info.get_architecture()) # cpu print(h.cpu_info.get_cpu_name()) print(h.cpu_info.get_cpu_cores()) print(h.cpu_info.get_cpu_freq()) print(h.cpu_info.get_cpu_core_cache()) # ram print(h.ram_info.get_total_ram()) print(h.ram_info.get_use_ram()) print(h.ram_info.get_buff_ram()) print(h.ram_info.get_total_swap()) print(h.ram_info.get_use_swap()) # disk print(h.disk_info.get_total_disk()) print(h.disk_info.get_use_disk())

# sftp h.sftp_get(‘/root/111/2131’, ‘1’) h.sftp_put(‘demo.py’, ‘/root/111/demo.py’)

print(‘*’ * 50)

except HostClientException as e:

print(e.code, e.message)

except Exception as e:

print(e)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Azog-0.2.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

Azog-0.2-py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page