pstat_getcommandline limit ! - HP UX

This is a discussion on pstat_getcommandline limit ! - HP UX ; 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 ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: pstat_getcommandline limit !

  1. 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/


  2. 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

  3. 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...

  4. 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/


  5. Re: pstat_getcommandline limit !

    Thanks for the reply Don.

    Cheers,
    Satish


  6. Re: pstat_getcommandline limit !

    kohamm@hotmaildot.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...

  7. Re: pstat_getcommandline limit !

    Rick Jones wrote:
    > kohamm@hotmaildot.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

    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

+ Reply to Thread