使用actor系统在Scala中编写程序。
需要使用Atmos(Typesafe控制台)进行监控
使用sbt或Eclipse找到文档,问题是我正在寻找一种方法:
针对这个问题的任何好的wiki / doc链接?
感谢
答案 0 :(得分:10)
这就是我最终解决这个问题的方法(我的开发机器是Ubuntu 12.04):
从http://downloads.typesafe.com/typesafe-console-developer/1.3.1/typesafe-console-developer-1.3.1.zip
将其解压缩(使用路径/ opt /)并授予从该文件夹读/写的权限
修复您的项目依赖关系(http://resources.typesafe.com/docs/console/manual/getting-started.html)
创建一个可运行的脚本来重启控制台(将脚本放在/usr/bin/runAtmos.sh中)
脚本示例:
#this will restart atmos
FILE=`find /opt -name typesafe-console | head -1`
BASEDIR=$(dirname $FILE)
echo "Starting Atmos (this may take a few seconds)"
kill -9 `ps aux | grep atmos | grep -v grep | awk '{print $2}'`
kill -9 `ps aux | grep typesafe-console | grep -v grep | awk '{print $2}'`
rm -f $BASEDIR/../var/RUNNING_PID
nohup $FILE atmos > /var/log/typesafe-console/console.log &
sleep 5
nohup $FILE ui > /var/log/typesafe-console/ui.log &
sleep 4
firefox "http://localhost:9900"
exit
-javaagent:/opt/typesafe-console-developer-1.3.1/lib/weaver/aspectjweaver.jar -Dorg.aspectj.tracing.factory=default -Djava.library.path=/opt/typesafe-console-developer-1.3.1/lib/sigar
屏幕截图:
屏幕截图:
akka {
loggers = ["com.typesafe.atmos.trace.Slf4jTraceContextLogger"]
loglevel = "INFO"
}
atmos {
trace {
enabled = true
traceable {
"*" = on
}
sampling {
"*" = 1
}
}}
希望这有帮助!