Take the process of Hadoop as an example, you can view it as a common Java process
1.tmpwatchman Tmpwatch can see that tmpwatch is used to remove some temporary file name that was not used at the time
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
Don't attempt to remove directories, even if they are empty.
-D,--nosymlinks
Don't attempt to remove symbolic links.
The focus here is to see-UMC and-D parameters-umc very clearly access, modify, create time-D parameters do not delete subdirectories, even if they are empty, do not delete symbolic connections
2./etc/cron.daily/tmpwatchcat/etc/cron.daily/tmpwatch can see the Tmpwatch tasks that are scheduled to be performed 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?}; Todo
If [-D "$d"]; Then
/usr/sbin/tmpwatch "$flags"-F 720 "$d"
Fi
Done
This task is executed once a day. Here you see-UMC is set at the same time, if it is set, then take the maximum time, the time in hours in units x indicates the path that needs to be skipped, and these paths will not be deleted. We must have seen the script.
3.jinfo Use the Jinfo command to view a process Jinfo 30352 results are as follows attaching to process ID 30352.
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 =
。。。。。。。。。。。。。。。。。。。。。 Indicates an omission, in which note the Scarlet Letter part Java.io.tmpdir =/tmp represents the temporary output directory of the Java process and generates the process's PID file in/tmp/, and produces the/tmp/hsperfdata_ username Directory I'm here is hadoop-hadoop-jobtracker.pid hsperfdata_root this article link http://www.cxybl.com/html/wyzz/JavaScript_Ajax/20130711/ 39048.html
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.