Archive for the linux Category

Jboss Performance Tuning Basics 1

Tuning Jboss for performance. Some of the basics will be covered in this Part and Part 2 will go more in depth. Update Java If its a new install or an existing application update java to take advantage of any bug fixes and performance improvements that have been made. Heap Its generally best practice to set -Xmx and -Xms (the heap) the same. Giving them a ton of memory isn't always the best thing because it could/will increases stop the world GC pauses. Make sure you leave enough memory Read more [...]

Inexpensive Linux laptop

Was browsing Ebay and noticed you can get a Dell Latitude D630 for $100 to $160.  The Dell Latitude D630 is great for linux and might be a good inexpensive Linux laptop option for you. When buying a used laptop I look at CPU speed, battery capacity and that the screen is in good condition. I would buy from a seller that has measured the battery capacity.  Ram is inexpensive for the older laptops but if it has 2+GB of memory I probably wouldn't upgrade. I usually plan on putting a new Hard Read more [...]

Setting time without ntp access

Testing some hardware at a lab I ran into a time sync issue. The servers  didn't have outbound access to ntp (port 123 tcp or udp) but the servers had full outbound access to the web (port 80 and 443 tcp). Only having access to the servers for a week I didn't want to waste much time on setting up time. This is the hack I came up with. I created a script called and added it to roots cron so it would run every 15min. This kept time in sync enough for my testing. #!/bin/bash date Read more [...]

Phoronix Test Suite

When doing some recent hardware benchmarking with Phoronix on CentOS 6 I found that the Phoronix-test-suite RPM from the epel repo was missing some dependencies. Patch was the main dependence missing but I also installed a couple others. This is the yum install command I ended up using on severs with the minimal CentOS 6.3 install. sudo yum install patch phoronix-test-suite pcre pcre-static pcre-devel mingw32-pcre opensips-regex ghc-pcre-light ghc-pcre-light-devel Once the install Read more [...]

Automatic CentOS 6 Installation DVD With Kickstart

Automatic custom CentOS 6 Installation DVD With Kickstart This is how to add and remove packages from a Centos or like iso and create a automated install image. This should work with any rpm distro that uses anaconda as its installer. Anaconda/UX that ships with Fedora 18 and newer may have some differences. You will need the install images and a workstation running a rpm anaconda based distro. I used Fedora 17 as my workstation and the Centos 6.3 dvd images. The DVD images can be found at Read more [...]

Fedora 18 Mate Install

Notes from my Fedora 18 Mate install. This isn't a step by step guide. If your new to Linux check out one of these guides on how to install Mate on Fedora 18 Fedora doesn't have a Mate spin yet. To work around this you need to do a minimal install or netinstall. I chose to do the net install. The netinstall iso Read more [...]

Cleaning up my music collection

My music collection was a mess from moving it between devices, backups and  adding to it.  I thought it was time to put Linux to work and clean up my collection. This is how I did it.   Remove unneeded files I first had to do some clean up. to me this is just blot. Some will want to keep the album art so this might not be for all. find . -type f -name "*.db" -exec rm -f {} \; find . -type f -name "*.jpg" -exec rm -f {} \; Remove Duplicates Next I wanted to find all the duplicates Read more [...]

Vacuum Firefox, Thunderbird and Eclipse Squlite script

Wrote this little bash script after I learned about squlite vacuum. #!/bin/bash #Best to stop the apps before but just incase if [ $(pgrep thunderbird >> /dev/null 2>&1)$? = "0" ]; then echo "please stop thunderbird" sleep 10 pkill thunderbird fi if [ $(pgrep firefox >> /dev/null 2>&1)$? = "0" ]; then echo "please stop firefox" sleep 10 pkill firefox fi if [ $(pgrep eclipse >> /dev/null 2>&1)$? = "0" ]; then echo "please stop Read more [...]

Things to make sysadmin work easier

Thought I would put together a list of things time saving tips and best practices that can make Linux system administration easier. The list isnt in any particular order. Just put it down as it came to mind.   Symlinks Think before you use them. If the application has a  configuration directive for a different file location use that. Example don't symlink  /var/lib/mysql/. Use the datadir option in mysql to move it. I think the problem is most admins find out about symlink and think Read more [...]

Sudosh and Rootsh

The reason for sudosh and rootsh is to log all commands ran in the root shell. This keeps the security people off your back and makes security audits go smother. You need to do some sudoers tweaking to make sure root is only used with the rootsh or sudosh wraper. Rootsh is in most the repos and is a more active project but I found sudosh has a better play back.  Rootsh also logs to syslog which I don't think sudosh2 does. Logging to syslog gives you the ability to log remotely which Read more [...]