Menu

command length

2022-01-10
2022-01-11
  • Bill Torpey

    Bill Torpey - 2022-01-10

    When extracting data from raw.gz. file (e.g., with "--procopts w -sZ -oD") it appears that the command string is truncated after approx. 1K characters. In our case, we launch java processes with very long --classpath parameters, so we lose the last part of the command line, which for us is the most significant.

    Is there any way to get collectl to output the full command line?

    P.S. I do understand that we can avoid this problem by using e.g., CLASSPATH environment variable -- that would require changes to production scripts that would take a while to deploy, so I'm hoping to find another way.

    Thanks in advance for any help!

     
    • Mark Seger

      Mark Seger - 2022-01-10

      The short answer is I have no idea AND I know nothing about jara. Might it
      be possible to run a java script that in turns runs a script that runs
      collectl?
      I've also been retired a few years and support of collectl has been taken
      on by redhat. Perhaps laurence can point you in the right direction.
      -mark

      On Mon, Jan 10, 2022 at 10:49 AM Bill Torpey wallstprog@users.sourceforge.net wrote:

      When extracting data from raw.gz. file (e.g., with "--procopts w -sZ -oD")
      it appears that the command string is truncated after approx. 1K
      characters. In our case, we launch java processes with very long
      --classpath parameters, so we lose the last part of the command line, which
      for us is the most significant.

      Is there any way to get collectl to output the full command line?

      P.S. I do understand that we can avoid this problem by using e.g.,
      CLASSPATH environment variable -- that would require changes to production
      scripts that would take a while to deploy, so I'm hoping to find another
      way.

      Thanks in advance for any help!

      command length
      https://sourceforge.net/p/collectl/discussion/696864/thread/b9be710d24/?limit=25#2580


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/collectl/discussion/696864/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • Laurence Oberman

        Hello
        I am not sure why I never saw this on the list. As far as I know I am
        subscribed.
        I will look into this.
        i.e. Is the truncation within actual collectl data gathering or only on
        playback.

        If the limit is within collectl gather and not playback then in
        increasing it would mean practically growing the on-disk data capture size
        so will have to think about that because if we have many 1000''s of tasks
        it's a lot of impact on storage and capture.

        Regards
        Laurence

        On Mon, Jan 10, 2022 at 4:04 PM Mark Seger mjseger@gmail.com wrote:

        The short answer is I have no idea AND I know nothing about jara. Might it
        be possible to run a java script that in turns runs a script that runs
        collectl?
        I've also been retired a few years and support of collectl has been taken
        on by redhat. Perhaps laurence can point you in the right direction.
        -mark

        On Mon, Jan 10, 2022 at 10:49 AM Bill Torpey wallstprog@users.sourceforge.net wrote:

        When extracting data from raw.gz. file (e.g., with "--procopts w -sZ
        -oD") it appears that the command string is truncated after approx. 1K
        characters. In our case, we launch java processes with very long
        --classpath parameters, so we lose the last part of the command line, which
        for us is the most significant.

        Is there any way to get collectl to output the full command line?

        P.S. I do understand that we can avoid this problem by using e.g.,
        CLASSPATH environment variable -- that would require changes to production
        scripts that would take a while to deploy, so I'm hoping to find another
        way.

        Thanks in advance for any help!

        command length
        https://sourceforge.net/p/collectl/discussion/696864/thread/b9be710d24/?limit=25#2580


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/collectl/discussion/696864/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

        --
        Laurence Oberman
        Senior Principal Software Maintenance Engineer - Storage
        Red Hat North America CEE-SEG

         
  • Bill Torpey

    Bill Torpey - 2022-01-10

    Thanks.

    This has nothing to do with java per se -- it's just that our java processes have really long command lines -- when we get them from collectl they are truncated after approx 1K characters.

    The question is whether collectl stores the full command line, and if so, whether there is any way to get the full command line from collectl.

     
  • Bill Torpey

    Bill Torpey - 2022-01-10

    I don't know what collectl is storing internally -- I've tried unzipping the .raw.gz file, but I get "unexpected end of file".

     
  • Laurence Oberman

    Hello

    If you want to look at a raw.gz that was not properly closed you will need to do this
    cat xxx.raw.gz | gunzip > xxx.raw

    Then you can check the argument length

    I looked at the code, the limit is not in the gathering, rather in the playback its set to 1000 if no other options are given for --procopts

    collectl: $procCmdWidth=($procOpts=~s/w(\d+)/w/) ? $1 : 1000;

    w - widen display by including whole argument string, with optional max width
    ***
    I have not tested this but if you include --procopts w 1200 do you see a difference, its the cmdline then playing back more data.

    To be honest I have never had to increase or use the --procopts option for wide view so I what I shared does not work then I will go read the code.

    I recently took this over to keep it alive but I am only now starting to get more involved in the code so I will investigate if needed.

    Thanks
    Laurence

     
  • Laurence Oberman

    Subscribed, Hopefully I will figure out why I dont get the messages lately

     
  • Laurence Oberman

    Hello

    I tested this
    without --procopts -w2000 I get the truncated cmdline

    17:51:00 9314 loberman 20 8398 0 S 110M 1M 4 0.00 0.00 0 00:00.00 0 0 0 3 /bin/bash ./coltest.sh 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200123

    Adding it I see

    17:51:00 9314 loberman 20 8398 0 S 110M 1M 4 0.00 0.00 0 00:00.00 0 0 0 3 /bin/bash ./coltest.sh 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920012345678910

    So just add --procopts -w2000
    For example to see a larger cmdline

    Regards
    Laurence

     
  • Bill Torpey

    Bill Torpey - 2022-01-11

    Brilliant! Thanks so much!

    I had no idea that --procopts w took a parameter, but that does the trick.

    P.S. As for the unzipping the raw.gz file -- that worked a treat also.

    Thanks again to you and Mark for a terrific piece of software!

     

Log in to post a comment.