All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scouter.agent.Main Maven / Gradle / Ivy

There is a newer version: 2.20.0
Show newest version
package scouter.agent;

import java.io.File;

import scouter.Version;
import scouter.agent.counter.CounterExecutingManager;
import scouter.agent.netio.data.net.TcpRequestMgr;
import scouter.agent.netio.request.ReqestHandlingProxy;
import scouter.util.SysJMX;
import scouter.util.ThreadUtil;
import scouter.util.logo.Logo;

public class Main {
	public static void main(String[] args) {
		Logo.print(true);
		AgentBoot.boot();

		System.out.println("Scouter Host Agent Version " + Version.getServerFullVersion());
		Logger.println("A01", "Scouter Host Agent Version " + Version.getServerFullVersion());
		
		File exit = new File(SysJMX.getProcessPID() + ".scouter");
		try {
			exit.createNewFile();
		} catch (Exception e) {
			String tmp = System.getProperty("user.home", "/tmp");
			exit = new File(tmp, SysJMX.getProcessPID() + ".scouter.run");
			try {
				exit.createNewFile();
			} catch (Exception k) {
				System.exit(1);
			}
		}
		exit.deleteOnExit();
		System.out.println("System JRE version : " + System.getProperty("java.version"));
		while (true) {
			if (exit.exists() == false) {
				System.exit(0);
			}
			ThreadUtil.sleep(1000);
		}

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy