This post is about a very useful one-liner I use often and one that has saved me a lot of headache in the past. I tweeted about this one earlier in the year as well but thought this one actually deserves a blog post so that it’s not lost in the large space that is the Twitterverse.
— Ather Beg (@AtherBeg) June 25, 2014
In case the tweet doesn’t show up, the command I am talking about is:
esxcli system settings advanced list -d
The important thing here is the “-d” switch. Without it, you get a gazillion entries as we know how many advanced settings there are in ESXi. The switch, filters the output so that advanced settings shown are only the ones where something has changed from the default. That change can either be an integer or a string, changed by you or the system itself. I’ve captured a few examples in the screenshot below:
Last one in the screenshot is obviously made by me but the two above are a result of configurations changes made by the system, to fit what I’ve asked it to do.
This command is extremely useful if you’ve had a system running for a long time and you can’t quite work out what changes you’ve made over the months/years to it or if you want to compare the difference between advanced settings of different hosts. It’s also very useful if your system has been upgraded over the years and you’re not quite sure what these values currently are. The last thing you want in that situation is having to go through all settings one by one. In most cases you’ll find that there are only a handful that you actually had to find so this can be a real time-saver. That’s why this command is one of my favourites.
Hope this helps!