The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Invalid Argument and glassfish Andrew2008 SUN Solaris 1 04-30-2008 12:25 PM
option followed by : taking next option if argument missing with getopts gurukottur Shell Programming and Scripting 2 03-17-2008 08:46 AM
msgrcv : Invalid argument answers UNIX for Dummies Questions & Answers 1 02-08-2008 06:31 AM
non-numeric argument TiredOrangeCat UNIX for Dummies Questions & Answers 3 02-12-2007 10:37 PM
stty: : Invalid argument tony3101 Shell Programming and Scripting 2 03-16-2006 02:33 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-15-2006
Registered User
 

Join Date: Oct 2006
Posts: 18
ps: 65535 is an invalid non-numeric argument for -p option

I want to figure out what is the reason of error message I have in Solaris 10. Why Solaris 10 dosn't recognize 65535?

ps: 65535 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:



Thank you
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 11-15-2006
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,354
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.
Reply With Quote
  #3 (permalink)  
Old 11-17-2006
pressy's Avatar
solaris cultist
 

Join Date: Aug 2003
Location: Vienna / Austria (Europe) [EARTH]
Posts: 710
Lightbulb

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:
Code:
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":

Quote:
pidmax

Description:
Specifies the value of the largest possible process ID. Valid for
Solaris 8 and later releases.
pidmax sets the value for the maxpid variable. Once maxpid
is set, pidmax is ignored. maxpid is used elsewhere in the
kernel to determine the maximum process ID and for
validation checking.
Any attempts to set maxpid by adding an entry to the
/etc/system file have no effect.

Data Type:
Signed integer

Default:
30,000

Range:
266 to 999,999

Units:
Processes

Dynamic?:
No. Used only at boot time to set the value of pidmax.

Validation:
Yes. Value is compared to the value of reserved_procs and
999,999. If less than reserved_procs or greater than 999,999,
the value is set to 999,999.

Implicit:
max_nprocs range checking ensures that max_nprocs is
always less than or equal to this value.

When to Change:
Required to enable support for more than 30,000 processes on
a system.
but true.. a very bad error message from "ps"...

regards pressy
Reply With Quote
  #4 (permalink)  
Old 11-17-2006
Registered User
 

Join Date: Oct 2006
Posts: 18
Smart!

The smart desision! Is the maxpid setting will be effective for curent session only in the proposed solution?
Reply With Quote
  #5 (permalink)  
Old 11-19-2006
pressy's Avatar
solaris cultist
 

Join Date: Aug 2003
Location: Vienna / Austria (Europe) [EARTH]
Posts: 710
Quote:
The smart desision! Is the maxpid setting will be effective for curent session only in the proposed solution?
that's a kernel setting and it will effect the whole system...

regards pressy
Reply With Quote
  #6 (permalink)  
Old 11-19-2006
Registered User
 

Join Date: Oct 2006
Posts: 18
Meantime, 65535 in the scripts, is it just a hystorical way to indicate -1? Does it work in long types for pidmax 9999999 with the same sense?
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:26 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0