FIND Command
Remove Certain Files in a Search/Find find . -name '*.log' -exec rm -fr {} \;
Search for a class file inside a jar filefind . -name '*.jar' -exec bash -c "echo {} && jar tvf {} | grep Name_Searching_For " \;See if a certain process is listening on a portnetstat -an | grep LISTENChecking open files
Shows Files Open Related to Java or ACESecho /proc/`ps -ef | grep java | grep -v grep | awk '{ print $2 }'`/fd | xargs ls -1 | wc -lShows Files Open Related to Java or ACESls /proc/Shows All of the Processes and the Tree/fd | wc -l pstree -A | moreMonitoring processes
top -u aces; // once it comes up….press "1" to see all the cores top -H -u aces; // once it comes up….press "1" to see all the cores [will show you the thread usage as opposed to the CPU usage] mpstat -P ALL; // shows overall CPU usageMonitoring Performance/usr/bin/sar 1 20; // Run sar command 20 times…with 1 second between itMonitoring Disk I/O
Monitor Input/Output Devicesiostat -d -x -Nmore /etc/fstab (file that tells you the names of mount points) df -k (will also tell you the mount points) iostat output: name of device more /etc/fstab show you the mount point to ACES directory : number of seconds between each capture of IO : number of times to run default forever await: avg. time servicing request (svctm) + avg. time waiting in request queue. svctm: avg. time servicing request await should be close to svctm, means all time spent processing io. If wait greater svctm means io requests are waiting in queue a long time and there is a PROBLEM!Monitor IO for Each CPUmpstat-P all Java Garbage Collector Monitoring
jstat -gcIf want to monitor GC stats on actual server put following in JBoss startupOptions * -gc * -gcutil * -gcnew * -gccapacity -verbose:gc (print the GC logs) -Xloggc: (for more comprehensive GC logging) -XX:+PrintGCDetails (for more detailed output) -XX:+PrintTenuringDistribution (displays the tenuring thresholds assumed by the JVM)Java Stack Dump of Running Process
jstack>
No comments:
Post a Comment