All posts by Mark Jacobsen

Determine Default Java JVM HeapSize

In the life of a Java developer every now and then you’ll have one of your apps run out of memory. While this is usually due to poor coding (not closing resources, or managing large files) it helps to know exactly what the defaults are for your system. I had just this need today so went out looking for an answer.

What I found that was the most helpful was this page, but for quick reference here’s how to do it on Windows…

c:\>java -XX:+PrintFlagsFinal -version | findstr /i "HeapSize PermSize ThreadStackSize"
 
    uintx InitialHeapSize                          := 266634176       {product}
    uintx MaxHeapSize                              := 4267704320      {product}
    uintx PermSize                                  = 21757952        {pd product}
    uintx MaxPermSize                               = 85983232        {pd product}
     intx ThreadStackSize                           = 0               {pd product}
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)

Note that the values returned are in bytes so throw them into google to convert them into something useful 🙂

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Photo Journal for January 08, 2015 at 10:05PM

If I’ve had to stare at it all day then so do you 🙂
Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Photo Journal for January 07, 2015 at 06:37PM

Possibly the single most meaningful, amazing, and beautiful gift I’ve ever received. Thank you so much Uncle Randy!
Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Photo Journal for January 06, 2015 at 10:10PM

Playing the I hate cars game

For any of my friends who enjoy a car mystery… This is the 2006 Honda Odyssey. Yesterday around 1pm Mary got rear-ended but all seemed to be ok. It’s also colder than sin.

Today, after having kids go in and out of various doors without indecent she went to pick Al up from school. After getting in the van and putting it into reverse or drive the door ajar alarm (constant buzz) would sound until the car was put in park or neutral. It did this until she got home (drove home with the buzz) and left it for me.

When I went to look at it I noticed the same behavior and also noted that none of the door ajar dashboard lights were on. After fiddling with some things (mostly trying to diagnose a pattern), I discovered that if you put the rear doors into manual mode via the driver side dashboard switch the sound went away. Score 1 for the good guys.

Unfortunately, I knew someone wouldn’t consider that a permanent fix so I went looking for another solution. What I found online suggested removing the drivers side #7 fuse labeled “back up”, so I gave that a shot. When you remove that fuse the beeping for doors open/key in the ignition stops and the rear power doors do not work at all. After waiting the prescribed 30-60 seconds I replaced the fuse and the constant buzz in drive/reverse is no longer there, but now the passenger side sliding door does not open automatically (just manually).

So I and apparently Google appear to be out of ideas. That and I’m tired. If any of you can help me w/ a solution that doesn’t require a trip to the mechanic there’s many beers or other beverages of choice in your future.

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Pass a Command Line Argument to an Alias

Ever want to pass in a command line argument to an alias? You would think you could just do it with $1, but actually you have to create a function and then call that function. So, for instance if you want to pass a portion of a log file name, you could set your alias like this…

alias catlog='function _catIt() { cat /var/logs/$1.log; };_catIt'

then, when you want to see the XX00D log, you just call your alias like so…

catlog XX00D
Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Google App Launcher Keyboard Shortcut

If you’re using AutoHotKey (and I would recommend that you do), here’s a handy script for remapping the caps lock to show the app launcher (which is convenient if you’ve gotten used to a Chromebook)

SetCapsLockState, AlwaysOff
Capslock::Run, chrome.exe --show-app-list
Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Checking and Maintaining Linux Disk Space

Ever need to find out what’s using the most space on your Linux box? There are a couple commands that will help make things easier…

To find out how much space you have use:

df -h .

Which will give you output like so…

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda         20G   15G  4.2G  79% /

To list out the directories using the most space, use this handy command…

sudo du /usr/local | sort -n

… where /usr/local is the directory you want info for (you can also just start from root: /)

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

charity:water update

Wow. Just the other day I received an updated report on what my 2012 birthday campaign helped achieve and I have to say I’m absolutely floored. The $1001 we raised helped over 860 people!

Let me say that again, you helped over 860 people.

There’s a reason I’ve always been a big fan of charity:water and these types of results just help to reinforce that belief. Take a look at the projects here: Project Page

Wow. Just wow. And THANK YOU!!!

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Learning VIM

So you would think that as a programmer for many moons now that I would have considerable experience in VIM and VI, but I’m hear today to admit that I am not. For years I’ve gotten by with my favorite Windows text editor notepad++, but the geek in me wanted to know why everyone loves Vim so much. To that end the 2 things I started with are…

I can’t say I’m a convert yet, but it’s always nice to have another tool in the toolbelt. Here for your and my reference is my quick VIM cheat sheet.

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Connect to DB2 via UNIX Command Line

To access DB2 via the command line on a UNIX/Linux box you need…

  • The DB2 client installed on the box
  • The DB you’re trying to connect to cataloged in the client

Once you know you have that, simply source your db2profile and connect…

. /path/to/db2profile
db2 connect to DBCATNAME user yourid using yourpw

… where DBCATNAME is the name the DB is cataloged as on that box, yourid is your user ID for connecting to the DB, and yourpw is your password for connecting to the DB. Note, that if the actual database resides on the same box, and you want to login as the user your logged into the UNIX box as, you can simplify the connect string and not have to include your user ID or password…

. /path/to/db2profile
db2 connect to DBNAME
Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...