5 Replies Latest reply on Jun 10, 2018 7:33 AM by tinybrownteddybear

    esxtop in batch mode does not use config file

    fsckit Enthusiast

      I am trying to collect disk statistics using esxtop (resxtop would be fine too), but it appears that it ignores my saved configuration.  If I run it normally, it does read the config file, but not in batch mode.  The resulting file is too large for me to import into Excel.  Anyone else experiencing this?

       

      I suppose I could attempt some post-processing with awk or Perl, but what I really would like is for the program to behave as describe in the documentation and to use the saved config file when in batch mode, just as it does in interactive mode.

       

      Here is my current .esxtop50rc, saved in my home directory on the vMA:

      vMA:~> cat .esxtop50rc

      ABcDEFghij

      aBcDefgHijKLmnOpq

      ABCdEfGhijkl

      ABcdeFGhIjklmnop

      aBCDEFGH

      AbcDEFGHIJKLmno

      ABCDeF

      ABCDe

      9u

       

      I have also activated ssh and gone on the ESXi host and run esxtop there, but I get the same behavior.

        • 1. Re: esxtop in batch mode does not use config file
          tomtom901 Expert
          vExpert

          ~ # esxtop -b -c .customFile -d 10 -n 2 > esxtop.csv

           

          Works fine for me, on VMware ESXi 5.5.0 build-1331820. Contents of the .customProfile file:

           

          ~ # cat .customFile

          AbcDeFghij

          aBcDefgHijKLmnOpq

          ABCdEfGhijkl

          ABcdeFGhIjklmnop

          aBCDEFGH

          AbcDEFGHIJKLmno

          ABCDeF

          ABCDe

          5c

          • 2. Re: esxtop in batch mode does not use config file
            fsckit Enthusiast

            tomtom901 wrote:

             

            ~ # esxtop -b -c .customFile -d 10 -n 2 > esxtop.csv

             

            Works fine for me, on VMware ESXi 5.5.0 build-1331820. Contents of the .customProfile file:

             

            ~ # cat .customFile

            AbcDeFghij

            aBcDefgHijKLmnOpq

            ABCdEfGhijkl

            ABcdeFGhIjklmnop

            aBCDEFGH

            AbcDEFGHIJKLmno

            ABCDeF

            ABCDe

            5c

             

            Thanks for the response. What configuration does that customFile file give you?  When I tried it, it just looked like the default esxtop display. I ran it in batch mode and redirected to a file, and then I did a 'head -1' on the output file.  As expected, it looked like it had all the fields, such as "CPU Pwer State",  "Interrupts/Second", etc.

             

            I am trying to get only disk data, so I do this:

             

            ~ # esxtop (Then "u" for disk utilization screen, then "W" to save the config to the default file.)

            ~ # esxtop -c .esxtop50rc -d 10  (To verify it just displays disk info.)

            ~ # esxtop -b -c .esxtop50rc -d 10 -n 2 > esxtop.out

            ~ # head -1 esxtop.out


            The head command shows all the esxtop fields, not just the disk fields. The output file is only three lines, but is 96,000 words and over 4 MB in size.

             

            This is a different ESXi server than I was using last time. Our hosts are at version 5.0.0.

            • 3. Re: esxtop in batch mode does not use config file
              tomtom901 Expert
              vExpert

              I removed the NWLD field, which didn't show up in the csv output afterwards. Will disk only later tonight and let you know.

              • 4. Re: esxtop in batch mode does not use config file
                fsckit Enthusiast

                Thanks. I tried again, following the steps here: http://vmtoday.com/2009/09/the-skinny-on-esxtop/

                 

                This site specifies to go into each view ("c" for CPU, "m" for memory, etc) and turn off the fields you don't want, then go into the view you do want, and then save your config file. I turned off all the fields in all the other views, then saved a config file.  Works great when I launch in interactive mode, but batch mode still shows all the fields, all the time, on every ESXi host I've tried this on.

                 

                This seems to be a common problem. I see many other posts from people with this issue, though I've not found any recent posts. Perhaps this is a bug that has returned.

                • 5. Re: esxtop in batch mode does not use config file
                  tinybrownteddybear Lurker

                  I took apart cfg file and if you noticed, if the Letter is Capitalized then that field is selected, for instance "u" disk stats "abcdefghijklmnop" is all turned off and AbcdefghijklmnOp means name and Vaai Stats is turned on. Just vi the file and turn all to small caps, load the file esxtop -c smallcapsfile and turn on the settings you want.