It recognizes 30000 but fails with 30001 with that clueless error message about 30001 being "non-numeric". Traditionally Unix limited pid's to 30000 so in the old days this would be a reasonable limit (but they need to work on that error message). But on Solaris 10 limits.h says the largest PID is 999999. I believe that Sun has indeed cranked up the max pid and thus there is, at this point, a bug in ps.
hmm, i've tried it on my workstation, it's not a bug in ps, it just don't work with the default settings from solaris (30.000 like perderabo said) as a limit and it doesn't work with pids creater then the limit which is set in the kernel.
see:
root@mp-wst01 # uname -a
SunOS mp-wst01 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-Blade-100
root@mp-wst01 # grep pidmax /etc/system
set pidmax=98302
root@mp-wst01 #
root@mp-wst01 # adb -P ">> " -k /dev/ksyms /dev/mem
physmem 1799c
>> pidmax /D
pidmax:
pidmax: 98302
>>
root@mp-wst01 # ps -p 65535
PID TTY TIME CMD
root@mp-wst01 #
root@mp-wst01 # ps -p 98302
PID TTY TIME CMD
root@mp-wst01 #
root@mp-wst01 # ps -p 98303
ps: 98303 is an invalid non-numeric argument for -p option
usage: ps [ -aAdeflcjLPyZ ] [ -o format ] [ -t termlist ]
[ -u userlist ] [ -U userlist ] [ -G grouplist ]
[ -p proclist ] [ -g pgrplist ] [ -s sidlist ] [ -z zonelist ]
'format' is one or more of:
user ruser group rgroup uid ruid gid rgid pid ppid pgid sid taskid ctid
pri opri pcpu pmem vsz rss osz nice class time etime stime zone zoneid
f s c lwp nlwp psr tty addr wchan fname comm args projid project pset
root@mp-wst01 #
here's the description from the "Solaris Tunable Parameters Reference Manual":