On Linux to discover which processes are using all the swap run top press ‘O’ (capital letter o) then ‘p’ then ‘enter’ Processes should be sorted by their swap usage.As shown in the screen below the minilogd process is using all the swap space on this machine. Looks like minilogd was gradually using up swap… Read more »
Posts Categorized: linux
Since I like posting screeshots of uptime figures here is one of an anti-spam machine up for 1496 days (just over 4 years). The machine is running Red Hat 4.
There are several different commands that can be used to install Apache and MySQL services with PHP support: sudo apt-get install tasksel && sudo tasksel sudo apt-get install lamp-server^ sudo apt-get install apache2 libapache2-mod-php5 php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-curl mysql-client mysql-server libmysqlclient15-dev phpmyadmin For number two the carat at the end is important.
I needed to add mysqli support to cPanel and did so by logging in to the WHM on port 2087 scrolling down the left menu to Software and clicking EasyApache (Apache Update) then followed the steps to recompile with my chosen options. Continuing with the default options were necessary and ticking MySQL Improved Extension This… Read more »
Background: I made a tar backup of one system and wanted to untar that onto different hardware. A bit like cloning. However I needed to make sure the hostname and network settings were those of the new machine and not the cloned machine. So for future reference … Change the Hostname vi /etc/hosts Change the… Read more »
The simple way to wipe or zerofill a disk is: dd if=/dev/zero of=/dev/sd? bs=1M However I found an article describing how to zero-fill with a progress indicator using pipebench, installed on Debian/Ubuntu with: sudo apt-get install pipebench then use: tr ‘\000’ ‘\377’ < /dev/zero | pipebench | sudo dd of=/dev/sd? Substitute the question mark for… Read more »
Background: I had an existing CentOS machine as a virtual machine running on VMWare ESX Server and it was running out of space so for future reference I did the following. Incidentally my disk is sda with the new partition create on the extra space as sda3. I first increased the disk using the vSphere… Read more »
So I tested out Skipfish today to do a quick check on a website / web server. Hosted on Google at: http://code.google.com/p/skipfish/ download it, extract it and make and run: wget http://skipfish.googlecode.com/files/skipfish-2.01b.tgz tar xzf skipfish-2.01b.tgz cd skipfish* cp ./dictionaries/medium.wl . make ./skipfish -o ./myreport http://domain.co.uk/index.php Skipfish will create an HTML report in the ./myreport directory… Read more »
Occasionally useful to find out the dimensions of an image without having to load an image editor or file manager. From the ImageMagick toolkit: identify myimage.jpg tiffinfo myimage.tif pnginfo myimage.png
A friend contacted me today running an Ubuntu live CD and trying to scan a windows drive for viruses. So for future reference the following antivirus packages can be tried: BitDefender Avira AVG Clam Clam is in the repositories so you don’t need to specifically download it – just search within the Software Center e.g…. Read more »