mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-07-16 08:55:18 +00:00
Add additional debugging info to server start (#282)
This commit is contained in:
parent
c3d19b5377
commit
88f4ef293b
1 changed files with 18 additions and 9 deletions
|
|
@ -51,9 +51,25 @@ object PsLogin {
|
||||||
|
|
||||||
/** Grabs the most essential system information and returns it as a preformatted string */
|
/** Grabs the most essential system information and returns it as a preformatted string */
|
||||||
def systemInformation : String = {
|
def systemInformation : String = {
|
||||||
|
val procNum = Runtime.getRuntime.availableProcessors();
|
||||||
|
val processorString = if(procNum == 1) {
|
||||||
|
"Detected 1 available logical processor"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
s"Detected $procNum available logical processors"
|
||||||
|
}
|
||||||
|
|
||||||
|
val freeMemory = Runtime.getRuntime.freeMemory() / 1048576;
|
||||||
|
// how much memory has been allocated out of the maximum that can be
|
||||||
|
val totalMemory = Runtime.getRuntime.totalMemory() / 1048576;
|
||||||
|
// the maximum amount of memory that the JVM can hold before OOM errors
|
||||||
|
val maxMemory = Runtime.getRuntime.maxMemory() / 1048576;
|
||||||
|
|
||||||
s"""|~~~ System Information ~~~
|
s"""|~~~ System Information ~~~
|
||||||
|${System.getProperty("os.name")} (v. ${System.getProperty("os.version")}, ${System.getProperty("os.arch")})
|
|SYS: ${System.getProperty("os.name")} (v. ${System.getProperty("os.version")}, ${System.getProperty("os.arch")})
|
||||||
|${System.getProperty("java.vm.name")} (build ${System.getProperty("java.version")}), ${System.getProperty("java.vendor")} - ${System.getProperty("java.vendor.url")}
|
|CPU: ${processorString}
|
||||||
|
|MEM: ${maxMemory}MB available to the JVM (tune with -Xmx flag)
|
||||||
|
|JVM: ${System.getProperty("java.vm.name")} (build ${System.getProperty("java.version")}), ${System.getProperty("java.vendor")} - ${System.getProperty("java.vendor.url")}
|
||||||
""".stripMargin
|
""".stripMargin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -185,13 +201,6 @@ object PsLogin {
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
val procNum = Runtime.getRuntime.availableProcessors()
|
|
||||||
logger.info(if(procNum == 1) {
|
|
||||||
"Detected 1 available logical processor"
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
s"Detected $procNum available logical processors"
|
|
||||||
})
|
|
||||||
logger.info("Starting actor subsystems...")
|
logger.info("Starting actor subsystems...")
|
||||||
|
|
||||||
/** Make sure we capture Akka messages (but only INFO and above)
|
/** Make sure we capture Akka messages (but only INFO and above)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue