I had the pleasure of traveling for 10 months around the globe with my family; 3 teenagers and my wife. We had some great times and have some great memories. We also had some very difficult time, but I don't quite remember them all.
I created a seperate website that contains all of my photos and trip notes. Hope you enjoy:
Delaney Family Travel
This is my blog where I hope to post information about what I am doing technically and what my family is up to. I hope you enjoy
Tuesday, July 7, 2015
Tuesday, June 2, 2015
Useful UNIX Commands
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 LISTEN
Checking 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 -l
Shows Files Open Related to Java or ACESls /proc/
Shows All of the Processes and the Tree/fd | wc -l pstree -A | more
Monitoring 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 it
Monitoring 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 -gc
If 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
>
Subscribe to:
Posts (Atom)