• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

jstat 命令: jps jstat 命令失效的问题_js

javascript 搞代码 7年前 (2018-06-13) 226次浏览 已收录 0个评论

这里以hadoop的进程为例,大家看做是普通java进程即可
1.tmpwatchman tmpwatch可以看到tmpwatch是用来删除一些上时间未使用的临时文件NAME
tmpwatch – removes files which haven’t been accessed for a period of
time
OPTIONS
-u, –atime
Make the decision about deleting a file based on the file’s
atime (access time). This is the default.
Note that the periodic updatedb file system scans keep the atime
of directories recent.
-m, –mtime
Make the decision about deleting a file based on the file’s
mtime (modification time) instead of the atime.
-c, –ctime
Make the decision about deleting a file based on the file’s
ctime (inode change time) instead of the atime; for directories,
make the decision based on the mtime.
-d, –nodirs
Do not attempt to remove directories, even if they are empty.
-d, –nosymlinks
Do not attempt to remove symbolic links.
这里重点看-umc和-d 参数         -umc很清楚    访问,修改,创建时间-d参数             不会删除子目录,即使是空的,也不会删除符号连接
2./etc/cron.daily/tmpwatchcat /etc/cron.daily/tmpwatch可以看到定时执行的tmpwatch任务flags=-umc
/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix /
-x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix 240 /tmp
/usr/sbin/tmpwatch "$flags" 720 /var/tmp
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
if [ -d "$d" ]; then
/usr/sbin/tmpwatch "$flags" -f 720 "$d"
fi
done
该任务每天执行一次这里看到-umc同时被设置,如果同时被设置,那么取的是最大时间,时间以小时为单位-x表示需要跳过的路径,这些路径不会被删除想必大家看明白这段脚本了
3.jinfo使用jinfo命令查看一个进程jinfo 30352结果如下Attaching to process ID 30352, please wait…
Debugger attached successfully.
Server compiler detected.
jvm version is 20.4-b02
Java System Properties:
java.runtime.name = Java(TM) SE Runtime Environment
sun.boot.library.path = /usr/java/jdk1.6.0_29/jre/lib/amd64
java.vm.version = 20.4-b02
。。。。。。。。。。。。。。。。
file.encoding.pkg = sun.io
sun.java.launcher = SUN_STANDARD
user.country = US
sun.os.patch.level = unknown
java.vm.specification.name = Java Virtual Machine Specification
user.dir = /home/hadoop/hadoop
java.runtime.version = 1.6.0_29-b11
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
java.endorsed.dirs = /usr/java/jdk1.6.0_29/jre/lib/endorsed
os.arch = amd64
java.io.tmpdir = /tmp
line.separator =
。。。。。。。。。。。。。。。。。。。。。表示省略,其中注意红字部分java.io.tmpdir = /tmp这里表示java进程的临时输出目录且会在/tmp/生成进程的pid文件,并且会生产/tmp/hsperfdata_用户名 目录我这里是hadoop-hadoop-jobtracker.pid     hsperfdata_root 本文链接http://www.cxybl.com/html/wyzz/JavaScript_Ajax/20130711/39048.html

欢迎大家阅读jstat 命令: jps jstat 命令失效的问题…_js》,跪求各位点评,若觉得好的话请收藏本文,by 搞代码


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:jstat 命令: jps jstat 命令失效的问题_js
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址