Posts Tagged ‘linux’

XPM not being found on php configure

Saturday, August 29th, 2009

Just spent the better portion of my day fixing a buggered PHP installation…

The magic line:
–with-mysql –enable-shmop –enable-track-vars –enable-sockets –enable-sysvsem –enable-sysvshm –enable-magic-quotes –enable-mbstring –with-curl –with-mcrypt –with-freetype-dir=/usr –with-exec-dir=/usr/bin –with-mhash=shared –with-pear=/usr/share/pear –with-zlib –with-openssl –with-xml –enable-gd-native-ttf –with-png –with-zlib –with-zlib-dir=/usr –with-jpeg-dir=/usr –with-png-dir=/usr –with-gd=/usr

^^ MAKE SURE –with-gd=/usr is at THE END

Interesting Loopback Device issue on CentOS

Monday, August 3rd, 2009

Was playing around with using the loopback devices to mount some OS images on CentOS and following the losetup followed by a mount command would indeed mount the image, but umount wouldn’t unmount it and would leave it stagnant, leaving me with this error:

ioctl: LOOP_CLR_FD: Device or resource busy

Interestingly enough though the lomount command

lomount -diskimage OS.img -partition 1  /MOUNTFOLDER

and then using umount to unmount the mountfolder would unmount the loopback device properly and free it for re-use.

Hope this helps someone!

`sar` command

Thursday, September 4th, 2008

I’m always trying to find a good method of monitoring system performance and logging it, but today I ran into a rather strange issue that I couldn’t find on google.

sar 0 was returning high idle percentages:

# sar -u 0

08:17:29 AM       CPU     %user     %nice   %system   %iowait     %idle

08:17:29 AM       all     18.11      0.01     11.66     70.22    3549.42
running top didn't produce 3.5k % idle and in fact the system was nearly 98% idle.Â
The quick fix is to simply run
yum update sysstat
That fixed the problem immediately on the box I was using.
Hope this helps someone else.
© 2008 Josh Rendek.