老手网

支持SSH,Telnet,WMI的监控核心后台

授权形式: 免费版
更新时间: 2013-05-07 00:47:27
软件语言: 英文
软件平台: Win2000/WinXP/Win2003
软件类别: 国产软件
文件大小: 未知
评论等级: ★★★★★
浏览次数: (今日:,本周:,本月:
软件简介
同时可以在windows,linux下平台运行。
支持三种协议SSH,Telnet,WMI
erlang编写

可以获取CPU,内存,磁盘容量,进程,IO,网卡流量,交换数,内存分页等多种信息。

支持AIX,HP-UX,等小型机,支持redhat,centos,Sun Solaris,SUSE Linux,Ubuntu10,FreeBSD等主流linux系统。

windows系统通过WMI协议。

实例怎么取得监控数据。


-module(test).
-compile(export_all).

start() -> test().  
stop() -> ok.

regex(Pattern,Data) ->
    regex:start(),
    regex:regex_str(Pattern,Data).


test()->
    erlang:set_cookie(node(),'3ren'),
    %~ wmic:start(),
    
    %~ io:format("~p~n",[wmic:wmic("192.168.0.185","administrator","888888","SELECT * FROM Win32_DiskDrive")]),
    %~ io:format("~p~n",[wmic:wmic("192.168.0.185","administrator","888888",["select * from Win32_LogicalMemoryConfiguration",
    %~ "select * from CIM_OperatingSystem","select * from Win32_PerfRawData_PerfOS_Memory"])]),
    
    %~ sysmon:start(),
    
    
    agent:start(),
     
 
    statistics(wall_clock),

   
    %~ io:format("aix:~p~n",[agent:open("192.168.0.68", 23, "root", "rootroot",telnet)]), 
    %~ io:format("aix:~p~n",[proxy:os("192.168.0.68")]),
    %~ io:format("aix:~p~n",[proxy:datetime("192.168.0.68")]),
    %~ io:format("aix:~p~n",[proxy:uptime("192.168.0.68")]),
    %~ io:format("aix:~p~n",[proxy:processes_count("192.168.0.68")]),
    %~ io:format("aix:~p~n",[proxy:logins_count("192.168.0.68")]),
    %~ io:format("aix:~p~n",[proxy:established("192.168.0.68")]),
    %~ io:format("aix:~p~n",[proxy:diskspace("192.168.0.68")]),
    %~ io:format("aix:~p~n",[proxy:cpu("192.168.0.68")]),
    %~ io:format("aix:~p~n",[proxy:memory("192.168.0.68")]),
    %~ io:format("aix:~p~n",[proxy:iostat("192.168.0.68")]),
    %~ io:format("aix:~p~n",[proxy:network("192.168.0.68")]),
    %~ io:format("aix:~p~n",[proxy:swap("192.168.0.68")]),
    
    
    
    {_, AixTime} = statistics(wall_clock),
    io:format("Aix[~pms]~n", [AixTime]),
    
    %~ io:format("redhat5:~p~n",[agent:open("192.168.0.225", 22, "root", "****************",ssh)]),
    %~ io:format("redhat5:~p~n",[proxy:os("192.168.0.225")]),
    %~ io:format("redhat5:~p~n",[proxy:datetime("192.168.0.225")]),
    %~ io:format("redhat5:~p~n",[proxy:uptime("192.168.0.225")]),
    %~ io:format("redhat5:~p~n",[proxy:processes_count("192.168.0.225")]),
    %~ io:format("redhat5:~p~n",[proxy:logins_count("192.168.0.225")]),
    %~ io:format("redhat5:~p~n",[proxy:established("192.168.0.225")]),
    %~ io:format("redhat5:~p~n",[proxy:diskspace("192.168.0.225")]),
    %~ io:format("redhat5:~p~n",[proxy:cpu("192.168.0.225")]),
    %~ io:format("redhat5:~p~n",[proxy:memory("192.168.0.225")]),
    %~ io:format("redhat5:~p~n",[proxy:iostat("192.168.0.225")]),
    %~ io:format("redhat5:~p~n",[proxy:network("192.168.0.225")]),
    %~ io:format("redhat5:~p~n",[proxy:swap("192.168.0.225")]),
    %~ io:format("redhat5:~p~n",[proxy:page("192.168.0.225")]),

    %~ io:format("centos5:~p~n",[agent:open("192.168.0.118", 23, "root", "****************",telnet)]), 
    %~ io:format("centos5:~p~n",[proxy:os("192.168.0.118")]),
    %~ io:format("centos5:~p~n",[proxy:datetime("192.168.0.118")]),
    %~ io:format("centos5:~p~n",[proxy:uptime("192.168.0.118")]),
    %~ io:format("centos5:~p~n",[proxy:processes_count("192.168.0.118")]),
    %~ io:format("centos5:~p~n",[proxy:logins_count("192.168.0.118")]),
    %~ io:format("centos5:~p~n",[proxy:established("192.168.0.118")]),
    %~ io:format("centos5:~p~n",[proxy:diskspace("192.168.0.118")]),
    %~ io:format("centos5:~p~n",[proxy:cpu("192.168.0.118")]),
    %~ io:format("centos5:~p~n",[proxy:memory("192.168.0.118")]),
    %~ io:format("centos5:~p~n",[proxy:iostat("192.168.0.118")]),
    %~ io:format("centos5:~p~n",[proxy:network("192.168.0.118")]),
    %~ io:format("centos5:~p~n",[proxy:swap("192.168.0.118")]),
    %~ io:format("centos5:~p~n",[proxy:page("192.168.0.118")]),
    
    %~ {_, Time} = statistics(wall_clock),
    %~ io:format("centos5[~pms]~n", [Time]), 
    
     %~ io:format("Redhat4:~p~n",[agent:open("192.168.0.43", 22, "root", "rootroot",ssh)]), 
    %~ io:format("Redhat4:~p~n",[proxy:os("192.168.0.43")]),
    %~ io:format("Redhat4:~p~n",[proxy:datetime("192.168.0.43")]),
    %~ io:format("Redhat4:~p~n",[proxy:uptime("192.168.0.43")]),
    %~ io:format("Redhat4:~p~n",[proxy:processes_count("192.168.0.43")]),
    %~ io:format("Redhat4:~p~n",[proxy:logins_count("192.168.0.43")]),
    %~ io:format("Redhat4:~p~n",[proxy:established("192.168.0.43")]),
    %~ io:format("Redhat4:~p~n",[proxy:diskspace("192.168.0.43")]),
    %~ io:format("Redhat4:~p~n",[proxy:cpu("192.168.0.43")]),
    %~ io:format("Redhat4:~p~n",[proxy:memory("192.168.0.43")]),
    %~ io:format("Redhat4:~p~n",[proxy:iostat("192.168.0.43")]),
    %~ io:format("Redhat4:~p~n",[proxy:network("192.168.0.43")]),
    %~ io:format("Redhat4:~p~n",[proxy:swap("192.168.0.43")]),
    %~ io:format("Redhat4:~p~n",[proxy:page("192.168.0.43")]),
    
     %~ {_, Redhat4Time} = statistics(wall_clock),
    %~ io:format("Redhat4[~pms]~n", [Redhat4Time]),
    
    
     %~ io:format("Sun Solaris:~p~n",[agent:open("192.168.0.162", 22, "root", "root",ssh)]), 
    %~ io:format("Sun Solaris:~p~n",[proxy:os("192.168.0.162")]),
    %~ io:format("Sun Solaris:~p~n",[proxy:datetime("192.168.0.162")]),
    %~ io:format("Sun Solaris:~p~n",[proxy:uptime("192.168.0.162")]),
    %~ io:format("Sun Solaris:~p~n",[proxy:processes_count("192.168.0.162")]),
    %~ io:format("Sun Solaris:~p~n",[proxy:logins_count("192.168.0.162")]),
    %~ io:format("Sun Solaris:~p~n",[proxy:established("192.168.0.162")]),
    %~ io:format("Sun Solaris:~p~n",[proxy:diskspace("192.168.0.162")]),
    %~ io:format("Sun Solaris:~p~n",[proxy:cpu("192.168.0.162")]),
    %~ io:format("Sun Solaris:~p~n",[proxy:memory("192.168.0.162")]),
    %~ io:format("Sun Solaris:~p~n",[proxy:iostat("192.168.0.162")]),
    %~ io:format("Sun Solaris:~p~n",[proxy:network("192.168.0.162")]),
    %~ io:format("Sun Solaris:~p~n",[proxy:swap("192.168.0.162")]),
    %~ io:format("Sun Solaris:~p~n",[proxy:page("192.168.0.162")]),
    
    
    
     %~ io:format("SUSE Linux11:~p~n",[agent:open("192.168.0.46", 22, "root", "rootroot",ssh)]), 
    %~ io:format("SUSE Linux11:~p~n",[proxy:os("192.168.0.46")]),
    %~ io:format("SUSE Linux11:~p~n",[proxy:datetime("192.168.0.46")]),
    %~ io:format("SUSE Linux11:~p~n",[proxy:uptime("192.168.0.46")]),
    %~ io:format("SUSE Linux11:~p~n",[proxy:processes_count("192.168.0.46")]),
    %~ io:format("SUSE Linux11:~p~n",[proxy:logins_count("192.168.0.46")]),
    %~ io:format("SUSE Linux11:~p~n",[proxy:established("192.168.0.46")]),
    %~ io:format("SUSE Linux11:~p~n",[proxy:diskspace("192.168.0.46")]),
    %~ io:format("SUSE Linux11:~p~n",[proxy:cpu("192.168.0.46")]),
    %~ io:format("SUSE Linux11:~p~n",[proxy:memory("192.168.0.46")]),
    %~ io:format("SUSE Linux11:~p~n",[proxy:iostat("192.168.0.46")]),
    %~ io:format("SUSE Linux11:~p~n",[proxy:network("192.168.0.46")]),
    %~ io:format("SUSE Linux11:~p~n",[proxy:swap("192.168.0.46")]),
    %~ io:format("SUSE Linux11:~p~n",[proxy:page("192.168.0.46")]),
    
    %~ io:format("SUSE Linux10:~p~n",[agent:open("192.168.0.23", 22, "root", "rootroot",ssh)]), 
    %~ io:format("SUSE Linux10:~p~n",[proxy:os("192.168.0.23")]),
    %~ io:format("SUSE Linux10:~p~n",[proxy:datetime("192.168.0.23")]),
    %~ io:format("SUSE Linux10:~p~n",[proxy:uptime("192.168.0.23")]),
    %~ io:format("SUSE Linux10:~p~n",[proxy:processes_count("192.168.0.23")]),
    %~ io:format("SUSE Linux10:~p~n",[proxy:logins_count("192.168.0.23")]),
    %~ io:format("SUSE Linux10:~p~n",[proxy:established("192.168.0.23")]),
    %~ io:format("SUSE Linux10:~p~n",[proxy:diskspace("192.168.0.23")]),
    %~ io:format("SUSE Linux10:~p~n",[proxy:cpu("192.168.0.23")]),
    %~ io:format("SUSE Linux10:~p~n",[proxy:memory("192.168.0.23")]),
    %~ io:format("SUSE Linux10:~p~n",[proxy:iostat("192.168.0.23")]),
    %~ io:format("SUSE Linux10:~p~n",[proxy:network("192.168.0.23")]),
    %~ io:format("SUSE Linux10:~p~n",[proxy:swap("192.168.0.23")]),
    %~ io:format("SUSE Linux10:~p~n",[proxy:page("192.168.0.23")]),
    
    
    %~ io:format("Ubuntu10:~p~n",[agent:open("192.168.0.48", 22, "root", "rootroot",ssh)]), 
    %~ io:format("Ubuntu10:~p~n",[proxy:os("192.168.0.48")]),
    %~ io:format("Ubuntu10:~p~n",[proxy:datetime("192.168.0.48")]),
    %~ io:format("Ubuntu10:~p~n",[proxy:uptime("192.168.0.48")]),
    %~ io:format("Ubuntu10:~p~n",[proxy:processes_count("192.168.0.48")]),
    %~ io:format("Ubuntu10:~p~n",[proxy:logins_count("192.168.0.48")]),
    %~ io:format("Ubuntu10:~p~n",[proxy:established("192.168.0.48")]),
    %~ io:format("Ubuntu10:~p~n",[proxy:diskspace("192.168.0.48")]),
    %~ io:format("Ubuntu10:~p~n",[proxy:cpu("192.168.0.48")]),
    %~ io:format("Ubuntu10:~p~n",[proxy:memory("192.168.0.48")]),
    %~ io:format("Ubuntu10:~p~n",[proxy:iostat("192.168.0.48")]),
    %~ io:format("Ubuntu10:~p~n",[proxy:network("192.168.0.48")]),
    %~ io:format("Ubuntu10:~p~n",[proxy:swap("192.168.0.48")]),
    %~ io:format("Ubuntu10:~p~n",[proxy:page("192.168.0.48")]),
    
    %~ io:format("FreeBSD:~p~n",[agent:open("192.168.0.41", 22, "root", "rootroot",ssh)]), 
    %~ io:format("FreeBSD:~p~n",[proxy:os("192.168.0.41")]),
    %~ io:format("FreeBSD:~p~n",[proxy:datetime("192.168.0.41")]),
    %~ io:format("FreeBSD:~p~n",[proxy:uptime("192.168.0.41")]),
    %~ io:format("FreeBSD:~p~n",[proxy:processes_count("192.168.0.41")]),
    %~ io:format("FreeBSD:~p~n",[proxy:logins_count("192.168.0.41")]),
    %~ io:format("FreeBSD:~p~n",[proxy:established("192.168.0.41")]),
    %~ io:format("FreeBSD:~p~n",[proxy:diskspace("192.168.0.41")]),
    %~ io:format("FreeBSD:~p~n",[proxy:cpu("192.168.0.41")]),
    %~ io:format("FreeBSD:~p~n",[proxy:memory("192.168.0.41")]),
    %~ io:format("FreeBSD:~p~n",[proxy:iostat("192.168.0.41")]),
    %~ io:format("FreeBSD:~p~n",[proxy:network("192.168.0.41")]),
    %~ io:format("FreeBSD:~p~n",[proxy:swap("192.168.0.41")]),
    %~ io:format("FreeBSD:~p~n",[proxy:page("192.168.0.41")]),
    %~ {_, FreeBSDTime} = statistics(wall_clock),
    %~ io:format("FreeBSD[~pms]~n", [FreeBSDTime]), 
    
    
    %~ io:format("HP-UX:~p~n",[agent:open("192.168.0.69", 22, "root", "rootroot",ssh)]), 
    %~ io:format("HP-UX:~p~n",[proxy:os("192.168.0.69")]),
    %~ io:format("HP-UX:~p~n",[proxy:datetime("192.168.0.69")]),
    %~ io:format("HP-UX:~p~n",[proxy:uptime("192.168.0.69")]),
    %~ io:format("HP-UX:~p~n",[proxy:processes_count("192.168.0.69")]),
    %~ io:format("HP-UX:~p~n",[proxy:logins_count("192.168.0.69")]),
    %~ io:format("HP-UX:~p~n",[proxy:established("192.168.0.69")]),
    %~ io:format("HP-UX:~p~n",[proxy:diskspace("192.168.0.69")]),
    %~ io:format("HP-UX:~p~n",[proxy:cpu("192.168.0.69")]),
    %~ io:format("HP-UX:~p~n",[proxy:memory("192.168.0.69")]),
    %~ io:format("HP-UX:~p~n",[proxy:iostat("192.168.0.69")]),
    %~ io:format("HP-UX:~p~n",[proxy:network("192.168.0.69")]),
    %~ io:format("HP-UX:~p~n",[proxy:swap("192.168.0.69")]),
    %~ io:format("HP-UX:~p~n",[proxy:page("192.168.0.69")]),
    %~ {_, HP_UXTime} = statistics(wall_clock),
    %~ io:format("HP-UX[~pms]~n", [HP_UXTime]), 
    
    ok.

 

下载地址
-

Copyright © 2012 - 2014 oldhand.cn All Rights Reserved. 粤ICP备13025864号