Wednesday, January 16, 2013
Running Parallel Commands on a group of Linux boxes
Wednesday, September 12, 2012
What is taking up all this space?
>>lsof | grep deleted
That showed me the app that was holding on to the space.
>>lsof | grep deleted | awk '{print $1, $2, $7, $9}'
Then on the PID of the app I ran:
>>kill -HUP 8787
Presto, that freed up all the disk space.
Friday, July 10, 2009
Clock setting in Linux
In almost all applications time being in sync is very important. Even simple logging needs accurate time to keep the logs in tune.
Servers have a hardware clock and an OS software clock and both need to be in sync as well as in sync with a certified time source.
If you already use NTP to keep your software clock in sync with a certified time source it is pretty easy to keep your hardware clock up to date with the OS time.
Here are some basic commands:
To set the syste/OSm clock from the hardware clock:
#> sudo hwclock --hctosys
Likewise if your hardware clock is set incorrectly (for example, if you replaced the
CMOS battery on your motherboard), you can set the hardware clock from your system clock as follows:
Likewise, set the hardware clock from the software/OS clock:
#> hwclock --systohc
As always, there are a lot more options available so check out the man pages.
Tuesday, July 7, 2009
How to add a disk to a vmware linux guest without rebooting
Today I wanted to add another disk to a running guest and couldn't reboot it.
ESX let me add the disk but the CentOS 5.3 guests didn't see it automatically.
I ran this command:
echo - - - > /sys/class/scsi_host/host0/scan
and then the disk showed up under fdisk -l
Put a new LVM on it, added a filesystem, and mounted it.