VMware Cloud Community
JoJoGabor
Expert
Expert
Jump to solution

Using resxtop via Vcenter

Can you use resxtop to login through vcenter credentials and get esxtop stats form a host without knowing the root password? The man pages for esxtop say you use the command:

resxtop --server Myvcenter --vihost myESXhost --username me

But I keep getting an access denied error. Yet I have administrator access over the cluster.

Reply
0 Kudos
1 Solution

Accepted Solutions
Dave_Mishchenko
Immortal
Immortal
Jump to solution

It works Ok for me. What version of the vCLI are you using? I'm at 4.1.




Dave

VMware Communities User Moderator

Now available - vSphere Quick Start Guide

Do you have a system or PCI card working with VMDirectPath? Submit your specs to the Unofficial VMDirectPath HCL.

View solution in original post

Reply
0 Kudos
9 Replies
lamw
Community Manager
Community Manager
Jump to solution

Yes, you can.

The syntax is the following:

resxtop --server <vcenter_server> --username <vcenter_username> --vihost <esx_or_esxi_host>

You can always use the --help to see what options are available or take a look at the vCLI documentation:

[vi-admin@scofield ~]$ resxtop --help
usage: resxtop [-h] [-v] [-b] [-s] [-a] [-c config file] [-d delay] [-n iterations]
               [--server server-name [--vihost host-name]] [--portnumber socket-port] [--username user-name]
              -h prints this help menu.
              -v prints version.
              -b enables batch mode.
              -s enables secure mode.
              -a show all statistics.
              -c sets the esxtop configuration file, which by default is .esxtop4rc
              -d sets the delay between updates in seconds.
              -n runs resxtop for only n iterations.
              --server      remote server name.
              --vihost      esx host name, if --server specifies vc server.
              --portnumber  socket port, default is 443.
              --username    user name on the remote server.
       for more information on interactive and batch modes
       please see man page for resxtop.

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
JoJoGabor
Expert
Expert
Jump to solution

Can you confirm it works? I get vim.fault.NoPermission

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

Yes I have confirmed it works, I use it from time to time.

The error message:

vim.fault.NoPermission

tells you exactly what is wrong, the account that you are using does not have enough permissions to perform the current operation.

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
JoJoGabor
Expert
Expert
Jump to solution

Thanks, but I have been assigned the Administrator role applied at the cluster level. Surely this should be enough permissions? What else could it be?

Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal
Jump to solution

It works Ok for me. What version of the vCLI are you using? I'm at 4.1.




Dave

VMware Communities User Moderator

Now available - vSphere Quick Start Guide

Do you have a system or PCI card working with VMDirectPath? Submit your specs to the Unofficial VMDirectPath HCL.

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

Agreed w/Dave's point, this works for me on both vCLI 4.0u2 and vCLI 4.1

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

JoJoGabor
Expert
Expert
Jump to solution

Not sure - how can I find the version?

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

resxtop --version

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
JoJoGabor
Expert
Expert
Jump to solution

All working now - thanks for your help

I had to upgrade the vMA from 4.0 to 4.1 and I also needed administrator permissions granted at the datacenter level, not just the cluster - which seems strange.

Reply
0 Kudos