亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? alert.java

?? 優(yōu)秀的客戶關(guān)系管理系統(tǒng)
?? JAVA
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
package com.ideas.alert;

import java.util.Date;
import java.sql.*;
import com.ideas.util.*;
import com.ideas.communicate.*;
import com.ideas.data.DBAccess;
import java.util.*;

public class Alert
{
    /**html格式報(bào)警內(nèi)容,同時(shí)擁有幾個(gè)主機(jī),就有幾個(gè)數(shù)組元素*/
    public static String[] HtmlContent = new String[Configuration.UnixClientIP.
        length];
    /**{101}格式報(bào)警內(nèi)容*/
    public static String[] TokenContent = new String[Configuration.UnixClientIP.
        length];
    /**報(bào)警自動(dòng)處理恢復(fù)內(nèi)容*/
    public static String[] AutoRunContent = new String[Configuration.UnixClientIP.
        length];

    /**
     *得到客戶化警報(bào)信息,html格式
     * @return
     */

    public static String getAlertTime(String server,String ipaddress)
    {
        Vector pgV = DBAccess.getGivingTimesData("select timestamp from sybaselog where server='"+server+"' and ipaddress='" + ipaddress + "' order by timestamp desc", 1);
        return (String)pgV.elementAt(0);
    }

    public static String getMsg(String hostip, String hostname)
    {
        String date = new Timestamp(new Date().getTime()).toString();
        String init = hostname + "(" + hostip + ") 狀態(tài)報(bào)告:";
        String msg = init;
        if(AlertProperties.isNotAction(AlertProperties.cpu_busy_level))
        { //cpu
            try
            {
                Vector v = DBAccess.getGivingTimesData(
                    "select idle from cpu where ipaddress='" + hostip +
                    "'  order by id desc",
                    AlertProperties.cpu_busy_times);
                int cputimes = 0;
                for(; cputimes < AlertProperties.cpu_busy_times; cputimes++)
                {
                    int busy = 100 - Integer.parseInt( (String)v.elementAt(cputimes));
                    if(busy > AlertProperties.cpu_busy_min)
                    {
                        continue;
                    }
                    else
                    {
                        break;
                    }
                }
                if( (cputimes == AlertProperties.cpu_busy_times))
                {
                    msg += WarningMsg.CPU_MSG;
                }
            }
            catch(NullPointerException ne)
            {}
            catch(Exception e)
            {
                System.err.println("在生成\"CPU\"警報(bào)數(shù)據(jù)時(shí)產(chǎn)生異常");
                e.printStackTrace();
            }
        }

        if(AlertProperties.isNotAction(AlertProperties.pg_use_level))
        { //pg
            try
            {
                String[] value = DBAccess.getLatestData(
                    "select totalsize,inuse from pg where ipaddress='" + hostip +
                    "'  order by id desc");
                if(Integer.parseInt(Tools.findNumberInString(value[1])) * 100 /
                   Integer.parseInt(Tools.findNumberInString(value[0])) >
                   AlertProperties.pg_use_min)
                {
                    msg += WarningMsg.PG_MSG;
                }
            }
            catch(NullPointerException e)
            {}
            catch(Exception e)
            {
                System.err.println("在生成\"頁(yè)交換空間\"警報(bào)數(shù)據(jù)時(shí)產(chǎn)生異常");
                e.printStackTrace();
            }
        }

        if(AlertProperties.isNotAction(AlertProperties.disk_io_level))
        { //diskio
            try
            {
                Vector v = DBAccess.getGivingTimesData(
                    "select act from diskio where ipaddress='" + hostip +
                    "'  order by id desc",
                    AlertProperties.disk_io_times);
                int diskiotimes = 0;
                for(; diskiotimes < AlertProperties.disk_io_times; diskiotimes++)
                {
                    float act = Float.parseFloat( (String)v.elementAt(diskiotimes));
                    if(act > AlertProperties.disk_io_min)
                    {
                        continue;
                    }
                    else
                    {
                        break;
                    }

                }
                if(diskiotimes == AlertProperties.disk_io_times)
                {
                    msg += WarningMsg.DISKIO_MSG;
                }
            }
            catch(NullPointerException ne)
            {}
            catch(Exception e)
            {
                System.err.println("在生成\"系統(tǒng)硬盤\"警報(bào)數(shù)據(jù)時(shí)產(chǎn)生異常");
                e.printStackTrace();
            }
        }

        if(AlertProperties.isNotAction(AlertProperties.fs_use_level))
        { //fs
            try
            {
                String[] timestamp = DBAccess.getLatestData(
                    "select timestamp from fs where ipaddress='" + hostip +
                    "' order by id desc");
                Vector result = DBAccess.getBatchData(
                    "select used from fs where ipaddress='" + hostip +
                    "' and timestamp='" + timestamp[0] + "'");
                for(int i = 0; i < result.size(); i++)
                {
                    String temp = (String)result.elementAt(i);
                    int value = Integer.parseInt(temp);
                    if( (value > AlertProperties.fs_use_min) &&
                       (AlertProperties.fs_use_level == AlertProperties.WARNING))
                    {
                        msg += WarningMsg.FS_MSG;
                        break;
                    }
                }
            }
            catch(NullPointerException ne)
            {}
            catch(Exception e)
            {
                System.err.println("在生成\"文件系統(tǒng)\"警報(bào)數(shù)據(jù)時(shí)產(chǎn)生異常");
                e.printStackTrace();
            }

            if(AlertProperties.isNotAction(AlertProperties.engine_busy_level))
            {
                try
                { //engine 計(jì)算engine的平均值
                    Vector timestampV = DBAccess.getGivingTimesData(
                        "select timestamp from engine where ipaddress='" + hostip +
                        "'  group by timestamp order by id desc",
                        AlertProperties.engine_busy_times);
                    int i = 0;
                    for(; i < timestampV.size(); i++)
                    {
                        String timestamp = (String)timestampV.elementAt(i);
                        Vector usagesV = DBAccess.getBatchData(
                            "select usages from engine where ipaddress='" + hostip +
                            "' and timestamp='" + timestamp + "'");
                        float total = 0;
                        for(int t = 0; t < usagesV.size(); t++)
                        {
                            total += Float.parseFloat( (String)usagesV.elementAt(t));
                        }
                        float avg = total / usagesV.size();
                        if(avg > AlertProperties.engine_busy_min)
                        {
                            continue;
                        }
                        else
                        {
                            break;
                        }
                    }
                    if(i == AlertProperties.engine_busy_times)
                    {
                        msg += WarningMsg.ENGINE_MSG;
                    }
                }
                catch(NullPointerException ne)
                {}
                catch(Exception e)
                {
                    System.err.println("在生成\"Sybase Engine\"警報(bào)數(shù)據(jù)時(shí)產(chǎn)生異常");
                    e.printStackTrace();
                }
            }
        }

        if(AlertProperties.isNotAction(AlertProperties.Sybase_tranx_level))
        {
            try
            { //sybtransaction status
                String[] timestamp = DBAccess.getLatestData(
                    "select distinct timestamp from sybtran where ipaddress='" + hostip +
                    "' order by id desc");
                Vector result = DBAccess.getBatchData(
                    "select runtime from sybtran where ipaddress='" + hostip +
                    "' and timestamp='" + timestamp[0] + "'");
                for(int i = 0; i < result.size(); i++)
                {
                    int status = Integer.parseInt( (String)result.elementAt(i));
                    if(status > AlertProperties.Sybase_tranx_min)
                    {
                        msg += WarningMsg.TRANX_MSG;
                        break;
                    }
                }
            }
            catch(NumberFormatException nfe)
            {}
            catch(NullPointerException ne)
            {}
            catch(Exception e)
            {
                System.err.println("在生成\"sybtran\"警報(bào)數(shù)據(jù)時(shí)產(chǎn)生異常");
                e.printStackTrace();
            }
        }

        if(AlertProperties.isNotAction(AlertProperties.sfs_server_level))
        {
            try
            { //sfs_server
                String[] timestamp = DBAccess.getLatestData(
                    "select timestamp from cicsfs where ipaddress='" + hostip +
                    "' order by id desc");
                Vector result = DBAccess.getBatchData(
                    "select status from cicsfs where ipaddress='" + hostip +
                    "' and timestamp='" + timestamp[0] + "'");
                for(int i = 0; i < result.size(); i++)
                {
                    String status = (String)result.elementAt(i);
                    if(!status.equalsIgnoreCase(AlertProperties.sfs_server_normal))
                    {
                        msg += WarningMsg.SFSSERVER_MSG;
                        break;
                    }
                }
            }
            catch(NullPointerException ne)
            {}
            catch(Exception e)
            {
                System.err.println("在生成\"CICS FS Server\"警報(bào)數(shù)據(jù)時(shí)產(chǎn)生異常");
                e.printStackTrace();
            }
        }

        if(AlertProperties.isNotAction(AlertProperties.sfs_server_warninglog_level))
        {
            try
            { //sfs server 的warning數(shù)
                String[] warnings = DBAccess.getLatestData(
                    "select warning from sfserror where ipaddress='" + hostip +
                    "' order by id desc");
                int warning = Integer.parseInt(warnings[0]);
                if(warning > AlertProperties.sfs_server_warninglog_min)
                {
                    msg += WarningMsg.SFSSERVER_WARNINGLOG_MSG;
                }
            }
            catch(NullPointerException ne)
            {}
            catch(Exception e)
            {
                System.err.println("在生成\"CICS FS Server\"警報(bào)數(shù)據(jù)時(shí)產(chǎn)生異常");
                e.printStackTrace();
            }
        }

        if(AlertProperties.isNotAction(AlertProperties.sfs_server_errorlog_level))
        {
            try
            { //sfs server 的error數(shù)
                String[] warnings = DBAccess.getLatestData(
                    "select error from sfserror where ipaddress='" + hostip +
                    "' order by id desc");
                int error = Integer.parseInt(warnings[0]);
                if(error > AlertProperties.sfs_server_errorlog_min)
                {
                    msg += WarningMsg.SFSSERVER_ERRORLOG_MSG;
                }
            }
            catch(NullPointerException ne)
            {}
            catch(Exception e)
            {
                System.err.println("在生成\"CICS FS Server\"警報(bào)數(shù)據(jù)時(shí)產(chǎn)生異常");
                e.printStackTrace();
            }
        }

        if(AlertProperties.isNotAction(AlertProperties.region_level))
        {
            try
            { //cicsregions status
                String[] timestamp = DBAccess.getLatestData(
                    "select timestamp from cicsregions where ipaddress='" + hostip +
                    "' order by id desc");
                Vector result = DBAccess.getBatchData(
                    "select status from cicsregions where ipaddress='" + hostip +
                    "' and timestamp='" + timestamp[0] + "'");
                for(int i = 0; i < result.size(); i++)
                {
                    String status = ( (String)result.elementAt(i)).trim();
                    if(!status.equalsIgnoreCase(AlertProperties.region_normal.trim()))
                    {
                        msg += WarningMsg.CICSREGIONS_MSG;
                        break;
                    }
                }
            }
            catch(NullPointerException ne)
            {}
            catch(Exception e)
            {
                System.err.println("在生成\"CICS regions \"警報(bào)數(shù)據(jù)時(shí)產(chǎn)生異常");
                e.printStackTrace();
            }
        }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一卡二卡三卡四卡| 国产宾馆实践打屁股91| 国产精品三级视频| 精品国产一区a| 久久久久久久久一| 国产精品剧情在线亚洲| 国产精品福利一区| 一区二区视频免费在线观看| 一区二区三区四区在线免费观看 | 亚洲乱码国产乱码精品精的特点 | 日本二三区不卡| 日本二三区不卡| 欧美人妇做爰xxxⅹ性高电影| 欧美片在线播放| 欧美一级淫片007| 久久久久九九视频| 国产欧美日韩麻豆91| 国产精品高清亚洲| 天使萌一区二区三区免费观看| 蜜桃av一区二区| 高清国产一区二区三区| 在线精品观看国产| 欧美电视剧在线看免费| 国产精品色一区二区三区| 亚洲国产精品久久久男人的天堂| 婷婷夜色潮精品综合在线| 国产一区视频网站| 在线观看一区二区视频| 欧美精品一区在线观看| 亚洲欧美aⅴ...| 久久精品国产久精国产| 99这里只有精品| 欧美电影免费观看高清完整版在 | 日韩欧美久久久| 中文字幕精品一区二区三区精品 | 国产欧美日韩综合| 亚洲国产精品自拍| 国产91丝袜在线观看| 在线国产亚洲欧美| 国产精品乱码一区二区三区软件 | 国产精品1区2区3区| 色噜噜狠狠成人中文综合| 精品国产精品一区二区夜夜嗨| 亚洲欧美一区二区不卡| 国产一区二区三区免费在线观看| 欧洲色大大久久| 国产精品三级电影| 国产资源精品在线观看| 91麻豆精品国产91久久久久久| 国产精品久久久久久久久免费相片 | 国产呦精品一区二区三区网站| 欧美写真视频网站| 国产精品精品国产色婷婷| 狠狠色综合色综合网络| 日韩一级免费一区| 亚洲高清在线精品| 在线视频一区二区三| 国产精品国产三级国产a| 国精产品一区一区三区mba桃花| 69堂亚洲精品首页| 亚洲午夜久久久久久久久电影网 | 精品视频免费看| 国产精品美女一区二区三区| 国产一区二区三区在线观看免费 | 午夜精品一区二区三区免费视频| 国产宾馆实践打屁股91| 久久亚洲一级片| 国产一区二区三区免费看| 欧美不卡在线视频| 久久99久久久欧美国产| 欧美电影免费观看高清完整版在线 | 欧美日韩精品是欧美日韩精品| 亚洲欧美在线aaa| 99热精品一区二区| 亚洲欧美色图小说| 91久久精品一区二区二区| 有坂深雪av一区二区精品| 99国产精品久| 一区二区三区高清在线| 精品视频在线免费| 日日摸夜夜添夜夜添国产精品| 欧美日韩成人综合天天影院| 日韩制服丝袜先锋影音| 日韩色在线观看| 国产精品18久久久久| 国产欧美日韩亚州综合| 91浏览器打开| 日韩电影在线看| 久久久精品免费网站| 波多野结衣中文一区| 一区二区三区蜜桃| 日韩欧美中文字幕制服| 国产精品99久久久久久似苏梦涵| 国产精品免费视频观看| 欧美日韩亚洲丝袜制服| 国产综合成人久久大片91| 国产精品久久久久婷婷二区次| 91行情网站电视在线观看高清版| 五月天亚洲婷婷| 欧美国产一区二区| 欧美日韩精品一区二区在线播放| 久久国产精品露脸对白| 国产精品九色蝌蚪自拍| 欧美精品丝袜久久久中文字幕| 国模娜娜一区二区三区| 伊人开心综合网| 精品精品欲导航| 91久久一区二区| 国内精品写真在线观看| 亚洲一区二区中文在线| 久久尤物电影视频在线观看| 色婷婷综合五月| 国产又粗又猛又爽又黄91精品| 亚洲乱码日产精品bd| 久久久美女艺术照精彩视频福利播放| 成人app下载| 精品一区二区三区在线观看国产| 中文字幕在线不卡| 精品久久久久久久久久久院品网| www.欧美色图| 高清日韩电视剧大全免费| 日韩高清一区在线| 日韩美女视频一区二区| 久久综合狠狠综合久久激情| 欧美日韩不卡在线| 一本大道av伊人久久综合| 国产激情一区二区三区| 美女在线视频一区| 亚洲www啪成人一区二区麻豆| 中文字幕一区免费在线观看| 久久精品亚洲精品国产欧美| 欧美一区二区三区视频在线 | 精品成人一区二区| 欧美肥大bbwbbw高潮| 精品婷婷伊人一区三区三| 91网站最新网址| 成人av动漫网站| 成人激情图片网| 国产黄人亚洲片| 国产麻豆精品在线观看| 久久成人羞羞网站| 青青草国产成人99久久| 日韩vs国产vs欧美| 日韩av在线发布| 免费观看91视频大全| 婷婷中文字幕一区三区| 爽爽淫人综合网网站| 亚洲成人免费电影| 天堂成人免费av电影一区| 爽好多水快深点欧美视频| 亚洲成av人影院| 亚洲成人精品影院| 日韩精品每日更新| 蜜臀久久久99精品久久久久久| 蜜臀91精品一区二区三区| 久久精品免费看| 国产伦精一区二区三区| 国产成人免费高清| 91视视频在线观看入口直接观看www| 99麻豆久久久国产精品免费优播| 国产98色在线|日韩| 91麻豆swag| 欧美日韩精品专区| 精品欧美乱码久久久久久| 久久伊人蜜桃av一区二区| 国产女主播一区| 中文字幕综合网| 视频一区二区欧美| 国内精品免费在线观看| 不卡一区二区中文字幕| 欧美体内she精视频| 日韩午夜激情免费电影| 中文成人av在线| 亚洲一二三专区| 蜜乳av一区二区三区| 国产成人亚洲综合a∨猫咪| 99久久精品免费看国产免费软件| 91福利资源站| 久久久久久久一区| 亚洲欧美另类小说| 免费高清不卡av| av一区二区不卡| 3atv在线一区二区三区| 国产欧美一区二区精品忘忧草| 一区二区三区丝袜| 国产一区二区三区四| 精品视频在线视频| 久久精品一区二区三区不卡| 亚洲一区二区三区在线播放| 蜜臀久久99精品久久久久久9| 91在线视频播放地址| 日韩女优av电影在线观看| 欧美国产一区二区在线观看| 亚洲福中文字幕伊人影院| 顶级嫩模精品视频在线看| 91麻豆精品91久久久久久清纯 | 五月天欧美精品| 国产精品69久久久久水密桃| 678五月天丁香亚洲综合网| 日韩美女视频一区二区|