ps: 65535 is an invalid non-numeric argument for -p option


 
Thread Tools Search this Thread
Operating Systems Solaris ps: 65535 is an invalid non-numeric argument for -p option
# 1  
Old 11-15-2006
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
# 2  
Old 11-16-2006
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.
# 3  
Old 11-17-2006
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"... Smilie

regards pressy
# 4  
Old 11-17-2006
Smart!

The smart desision! Is the maxpid setting will be effective for curent session only in the proposed solution?
# 5  
Old 11-19-2006
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
# 6  
Old 11-19-2006
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?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

top -l 1 invalid option.

Hi, I am using below command to get the High CPU Utilization. top -l 1| awk ‘/CPU usage/ {print $12, $13}’ I am getting below error. ksh: 1: parameter not set top: illegal option -- l Usage: top Usage: awk ... Could you please suggest the appropriate solution. ... (3 Replies)
Discussion started by: wahab
3 Replies

2. Programming

SIOCSARP: Invalid Argument.

Hello everybody, I've been programming an alternative to linux's standard 'arp' program. I can delete arp entries (SIOCDARP), get arp entries (SIOCGARP), but i'm having troubles setting entries with ioctl. I can't set any PERM, USETRAILERS, or COM address. It only adds PUB entries and i don't... (2 Replies)
Discussion started by: semash!
2 Replies

3. UNIX for Advanced & Expert Users

invalid argument in semctl()

When I am using the function semctl() it is giving me error as the INVALID ARGUMENT. Can any body give me the possible reasons??? (2 Replies)
Discussion started by: asimibm
2 Replies

4. UNIX for Dummies Questions & Answers

First argument is numeric or not

Hi everyone, I want my script to check if the first argument has only numbers or not. Im not sure what im doing wrong. This is how it looks like: if *") ] then echo 'The first arguement should only be in numeric' 1>&2 exit 1 else exit 0 fi (7 Replies)
Discussion started by: darkhider
7 Replies

5. IP Networking

sendto invalid argument

Hi I lost a lot of time in understanding the message "sendto Invalid argument" when I execute the following code. This code is a simple UDP sender improved with some reliability feature. My goal is to send a file. I've reported only the code which may be useful. Can anyone help me? Thank you... (0 Replies)
Discussion started by: Puntino
0 Replies

6. Solaris

Invalid Argument and glassfish

I tried to install glassfish on Solaris 10 and it worked fine on other instances. I got the below message bash-3.00# ./sjsas-9_1_01-solaris-sparc.bin -console bash: ./sjsas-9_1_01-solaris-sparc.bin: Invalid argument I logged on as root and the file has execute permission. So strange. Do... (1 Reply)
Discussion started by: Andrew2008
1 Replies

7. Shell Programming and Scripting

option followed by : taking next option if argument missing with getopts

Hi all, I am parsing command line options using getopts. The problem is that mandatory argument options following ":" is taking next option as argument if it is not followed by any argument. Below is the script: while getopts :hd:t:s:l:p:f: opt do case "$opt" in -h|-\?)... (2 Replies)
Discussion started by: gurukottur
2 Replies

8. UNIX for Dummies Questions & Answers

msgrcv : Invalid argument

Hi All, Please guide me how to get rid : msgrcv : Invalid argument. I am using message queues: msgsnd and msgrcv, I am able to send through msgsnd and receive through msgrcv, but at times i get the belo error. msgrcv : Invalid argument. (1 Reply)
Discussion started by: answers
1 Replies

9. UNIX for Dummies Questions & Answers

non-numeric argument

quick question, I am trying to run this simple equation expr 2048 / 2.354 but get a "expr: non-numeric argument" error when ever its run. I believe it may be caused by the decimal point but I do not know how to remedy it. (3 Replies)
Discussion started by: TiredOrangeCat
3 Replies

10. Shell Programming and Scripting

stty: : Invalid argument

Hello Everyone; I have a script that is throwing the following message: stty: : Invalid argument The line that gives the message is the following, sailormoon$ scp home/voice.xml newwave@silvermoon:/newwave/config/radius stty: : Invalid argument voice.xml | ... (2 Replies)
Discussion started by: tony3101
2 Replies
Login or Register to Ask a Question