The currently used ps command on Solaris is:
This command has the problem that when the size numbers overflow, they bleed into the next column, and it becomes difficult to separate them because of missing whitespace.
It is possible to replace this command with:
ps -eo user,pid,pcpu,pmem,osz,rss,tty,s,stime,time,args
which doesn't have the mentioned problem. However, it triggers a different problem, that the fields may no longer be directly under their heading, and the ps parser is unable to cope with that. AFAICS, the output is always consistent, iow the space between fields will always be present in this mode, so my suggestion is to make the parser count the fields instead of measuring where they are relative to the heading. This needs changes to the parser itself though, and has to be configurable per platform, since other platforms may not obey this.
Here is an example of the problem described above:
On our own Solaris server it can usually be seen by looking for the Jenkins java process, which often causes the overflow.
An additional caveat to look out for is that Solaris must not revert to using /bin/ps due to Redmine #3974. Currently it's using /usr/ucb/ps where available.