Archive for the 'tips' Category

Make a copy of virtual machine with Vmware Server

It’s proven to be that during software development process, research activities and etc., using of virtulization is invaluable. In my practice I use Vmware Server, so the next article would be useful.

First of all, we need to find where all our virtual machines are in our system. After small search I’ve found vmware files in /var/lib/vmware/Virtual Machines. There are some set of directories each corresponds to some of your already created virtual machines. In my case I was interested in cloning virtual machine with name db1 to new machine db2 and then to db3.

Continue reading about virtual machines cloning with Vmware Server…

Advertisements

Find out where Unix/Linux executable binary is located

There are two commands that may help you to find where executable binary is located regardless it’s Unix or Linux system. They are whereis and type. First locates source/binary and manuals sections for specified files and second tells what exactly shell executes when you type a certain command.

The next picture shows examples of these commands work.

Find out where Unix/Linux executable binary is located

Secure shell (ssh) session timeout

I’ve noticed that when I keep ssh sessions that I opened before untouched for some period of time (like 30 minutes) they become frozen and as a result I have to close ssh terminal and start a new connection. To prevent such situation I found several tips:

1) Start some utility updating the screen before leaving ssh session untouched. I usually use watch -n 1 ‘date’ that shows current date every second. Other simple way is to send icmp requests to some host, e.g. ping google.com.

2) Increase ssh session idle time by

echo “7200” > /proc/sys/net/ipv4/tcp_keepalive_time

I’ve checked these tips with Fedora Core, CentOS, Debian and Ubuntu but I’m completely sure that it applicable also for other Linux distributions. First tip (ping) can be used in Unix also.

 

Silent and unattended large file download with wget

If you would like to download large file like HD Video or Linux ISO image while you’re working at your Linux PC or laptop I recommend to use the following command:

wget -c -b “http://file/you/wish/to/download.ext” –limit-rate=100k

Where, -c will continue getting partially-downloaded file (if connection was dropped or smth else), -b will put wget downloading into background, –limit-rate=100k will limit downloading speed at 100 KBytes per second (KB/s).

P.S. man wget still works 🙂

Feed spamassassin with spam or ham

The easiest way to feed spamassassin with spam is:

spamassassin -r < message.txt

Continue reading ‘Feed spamassassin with spam or ham’

Vmware Server at Ubuntu Feisty 7.04

This step-by-step manual provides instructions on how to install freely available VMWare Server at Ubuntu Feisty Fawn Linux (7.04).

First of all download installation package here and get free serial code. To get VMWare Server working at Ubuntu 7.04 I recommend to download this patch.

To make sure there are all necessary tools installed to get VMWare Server running, execute:
sudo aptitude install linux-headers-`uname -r` build-essentia xinetd

After it’s done unpack installation package and patch:
tar -xvzf VMware-server-1.0.3-44356.tar.gz
tar -xvzf vmware-any-any-update109.tar.gz

Then:
cd vmware-server-distrib
./vmware-install.pl

Choose defaults to questions until installer asks to run vmware-config.pl. Press no and install patch:
cd ../
cd vmware-any-any-update109
sudo ./runme.pl

Now it’s proper time to configure VMWare Server:
sudo vmware-config.pl

Just choose default values (it really worked for me).

When the installation is done, run
vmware

and proceed with using VMWare Server:

screenshot-viper-laptop-vmwareserverconsole.png

One more way to count CPUs in Linux

Here is one more way to find out how many CPUs are used by Linux:
cat /proc/cpuinfo | grep “^vendor_id” | wc -l

As for me I use this way to make sure that SMP kernel should be installed.

You’re welcome to suggest your ways of doing the same in comments. Thank you in advance!


Archive