Unix Technical Forum

pstat_getcommandline limit !

This is a discussion on pstat_getcommandline limit ! within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> Hi Friends, On HP-UX apparently there is limit of 1024 characters for the display of entire command line using ...


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 07:22 PM
asatsi@gmail.com
 
Posts: n/a
Default pstat_getcommandline limit !

Hi Friends,

On HP-UX apparently there is limit of 1024 characters for the
display of entire command line using "ps -exx". I also tried
the pstat function pstat_getcommandline which has a limit of
1020 characters to store the process command line. I want to
know whether we could overcome this limit and see the process
in its entirety even though the command line exceeds 1024 char
limit ? Is it possible ??????? (I am on 11iV2.)


Thanks in advance,
Satish/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 07:22 PM
Don Morris
 
Posts: n/a
Default Re: pstat_getcommandline limit !

asatsi@gmail.com wrote:
> Hi Friends,
>
> On HP-UX apparently there is limit of 1024 characters for the
> display of entire command line using "ps -exx". I also tried
> the pstat function pstat_getcommandline which has a limit of
> 1020 characters to store the process command line. I want to
> know whether we could overcome this limit and see the process
> in its entirety even though the command line exceeds 1024 char
> limit ? Is it possible ??????? (I am on 11iV2.)
>


The kernel only stores a maximum of 1024 characters, you can't get more
than what it has in the first place. If you need more, contact your
support representative and make an Enhancemnt Request, because
you'll need one or more patches developed to do this.

Don
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 07:23 PM
Rick Jones
 
Posts: n/a
Default Re: pstat_getcommandline limit !

I'm curious (always dangerous) but what is in those > 1020 characters
of command line?

rick jones
--
portable adj, code that compiles under more than one compiler
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-16-2008, 07:23 PM
kohamm@hotmaildot.com
 
Posts: n/a
Default Re: pstat_getcommandline limit !

OK, now that you have asked , it contains whole loads of java
arguments. Its a third party product I am working on , and I do not
have much idea about java and likes.

Cheers,
Satish/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-16-2008, 07:23 PM
kohamm@hotmaildot.com
 
Posts: n/a
Default Re: pstat_getcommandline limit !

Thanks for the reply Don.

Cheers,
Satish

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-16-2008, 07:23 PM
Rick Jones
 
Posts: n/a
Default Re: pstat_getcommandline limit !

kohamm@hotmaildot.com <pagare@gmail.com> wrote:
> OK, now that you have asked , it contains whole loads of java
> arguments. Its a third party product I am working on , and I do not
> have much idea about java and likes.


Seems that there will probably always be _some_ sort of limit to the
length of the command line, which suggests a strategy not of raising
the bridge, but lowering the river. No idea if it is possible in your
specific case, but perhaps a bit of indirection - putting some
arguments into a file and parsing the file rather than the command
line, that sort of thing.

rick jones
--
The computing industry isn't as much a game of "Follow The Leader" as
it is one of "Ring Around the Rosy" or perhaps "Duck Duck Goose."
- Rick Jones
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-16-2008, 07:23 PM
Eric Gouriou
 
Posts: n/a
Default Re: pstat_getcommandline limit !

Rick Jones wrote:
> kohamm@hotmaildot.com <pagare@gmail.com> wrote:
>
>>OK, now that you have asked , it contains whole loads of java
>>arguments. Its a third party product I am working on , and I do not
>>have much idea about java and likes.

>
>
> Seems that there will probably always be _some_ sort of limit to the
> length of the command line,

[...]

IIRC the argv/envp size limit is 3MB on HP-UX (or at least that's
the limit I saw hard-coded in some kernel documentation).

To try to help the OP, you can use gdb to attach to your process
and print the argv.

Alternatively, for one-off usage and if you are on Itanium, you can
use caliper.

caliper total_cpu --duration 1 -a <pid>

The report (generated to stdout in this case) will show the command line.

I do not guarantee that Caliper will handle a 3MB argv array very
nicely.

Eric
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:43 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com