Archive for the ‘Linux’ Category
How to null logs in Linux
To null out log /var/tmp/mond.log
Run: cp /dev/null /var/tmp/mond.log
All the content of the log file will be removed
If log is in use.. you can do this:
Send a SIGSTOP signal to the process which you want to pause/stop, copy the log files to target directory and finally issue a SIGCONT signal to the same process.
How to kill my WebSphere JVM
It seems to happen often enough that I had to note this
If your in WebSphere counsole and stop your JVM but it doesn’t go down, or it partially goes down.. Open a command line on the server
If the JVM is called: server1
run this: ps -ef|grep server1
Then find the processID and run: kill -9 (procID)
Migrating Windows7 to New Hard Drive
I found an OpenSource project called Clonezilla (http://clonezilla.org/). This software does essentially the same thing as Norton Ghost, and there is also a version than can do distributed cloning (such as doing an install for a computer lab).
cat /proc/loadavg
5.2.16. /proc/loadavg This file provides a look at the load average in regard to both the CPU and IO over time, as well as additional data used by uptime and other commands. A sample /proc/loadavg file looks similar to the following:
0.20 0.18 0.12 1/80 11206
The first three columns measure CPU and IO utilization of the last one, five, and 10 minute periods. The fourth column shows the number of currently running processes and the total number of processes. The last column displays the last process ID used.
good link to explain load:
linux load over 4 (with 4 processors)
Redhat asked for the below 3 reports to help resolve:
-
top -n 500 -b -d 1 > /tmp/top.txt& (top)
-
vmstat 1 500 > /tmp/vm.txt& (vm info)
- iostat -x 1 500 > /tmp/io.txt& (io)
Uncompress on Linux
This will remove the xxx.tar.gz and leave you with the xxx.tar
- gunzip xxx.tar.gz
Then this will remove all the files from the tar, leaving the xxx.tar (make sure you run this in the folder you want the files at)
- tar -xvvf xxx.tar
How to get Linux CPU statistics
less /proc/cpuinfo
What is my Redhat Version?
cat /etc/red*