摘要: public class MachineCollector implements Runnable{ private static int DEFAULT_INTERVAL = 30; private boolean isStopped = false; private RandomAccessFi... 阅读全文
posted @ 2014-10-01 13:52 V.Smile 阅读(307) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) throws ClassNotFoundException { logger.info("Agent 正在启动"); logger.info("设置文件锁,保证单实例"); FileLock flock = null; t... 阅读全文
posted @ 2014-10-01 13:21 V.Smile 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 转载,好多年前,不记得出处了 Ctrl+1 快速修复(最经典的快捷键,就不用多说了)Ctrl+D: 删除当前行 Ctrl+Alt+↓ 复制当前行到下一行(复制增加)Ctrl+Alt+↑ 复制当前行到上一行(复制增加)Alt+↓ 当前行和下面一行交互位置(特别实用,可以省去先剪切,再粘贴了)Alt+... 阅读全文
posted @ 2014-09-06 16:09 V.Smile 阅读(122) 评论(0) 推荐(0) 编辑
摘要: linux有自己一套完整的启动体系,抓住了linux启动的脉络,linux的启动过程将不再神秘。本文中假设inittab中设置的init tree为:/etc/rc.d/rc0.d /etc/rc.d/rc1.d /etc/rc.d/rc2.d /etc/rc.d/rc3.d /etc/rc.d/r... 阅读全文
posted @ 2014-07-22 20:39 V.Smile 阅读(226) 评论(0) 推荐(0) 编辑
摘要: group=`cat config.properties | grep -v "^$" | grep -v "^#" | awk -F "." '!($1 in a){a[$1];print $1}'`ll | awk '{print $3}' | sort |uniq -c ... 阅读全文
posted @ 2014-07-02 09:45 V.Smile 阅读(719) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-06-28 22:23 V.Smile 阅读(128) 评论(0) 推荐(0) 编辑
摘要: java中finally语句不走的可能存在system.exit(0)与守护线程线程sleep采用TimeUnit类设定线程的名字thread.getcurrentThread().setName()设定守护线程thread.getcurrentThread().setDaemon(true)htt... 阅读全文
posted @ 2014-06-28 22:18 V.Smile 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 4.0.0... ... ... ... ... ... ... ... junit junit 4.0 jar test true groupId,artifactId和version这个三组合标示依赖的具体工程,而且这个依赖工程必须是maven中心包管理范围内的。如果碰上非开源包,maven支... 阅读全文
posted @ 2014-06-13 13:44 V.Smile 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 注意软连接建立时的mysql目录也必须是mysql:mysql的属主linux 下安装的RPM包,mysql默认的数据文件存储目录为/var/lib/mysql假如要把目录移到/home/data下需要进行下面几步:1、home目录下建立data目录cd /homemkdir data2、停止mys... 阅读全文
posted @ 2014-06-04 15:38 V.Smile 阅读(547) 评论(0) 推荐(0) 编辑
摘要: getent group zabbixgetent passwd zabbixgetent group zabbix > /dev/null || groupadd -r zabbixgetent passwd zabbix > /dev/null || useradd -r -g zabbix -... 阅读全文
posted @ 2014-06-04 13:09 V.Smile 阅读(3918) 评论(1) 推荐(1) 编辑