This proved to be problematic today because we need to monitor 3 separate Java (surprise, surprise) processes. However, their command line strings are so long that, after the 80 character truncation, the strings are identical. This means that there's no way to tell the difference between them from a monitoring point of view (using the pid is too unreliable btw, since we have no idea when they might restart). I checked the latest version of Proc::ProcessTable to see if Dan Urist had already dealt with this but, alas, no.
There are a couple of workarounds. First, we could parse "/usr/ucb/ps -auxww", which is different than your standard 'ps' command. The 'ww' widens the command line string as wide as it will go. The second option, and the one I favor, is to modify my C source. After some extensive searching, I found a handy snippet of C code that does what I need (in addition to providing ENV info, which is nice).
There are some caveats to this. It's possible for a program to create false information its own command line options or environment information. Generally this is done as a security precaution to prevent you from picking up something critical (like a password). Most programs (at least not the ones I'm dealing with) aren't that security conscious, however, so it shouldn't be an issue.
In other news, I discovered that gooogle.com takes you to google.com. I suffered a brief moment of panic at work when I realized what I had done, thinking it might take me to a porn site. *Whew*.