in reply to Changing $0 under solaris

if you want quick and dirty there are some really good alternate ps type scripts here http://www.bigadmin.com that may give you some really good ideas. You may also want to play with prstat.

Jeffery