Skip to content

Instantly share code, notes, and snippets.

@manualbashing
Last active October 2, 2019 11:31
Show Gist options
  • Select an option

  • Save manualbashing/8898fa2ea4c92d1d47f8673414bbcc1a to your computer and use it in GitHub Desktop.

Select an option

Save manualbashing/8898fa2ea4c92d1d47f8673414bbcc1a to your computer and use it in GitHub Desktop.
Determine how long a VM is turned off according to last write time to vmware.log
# Find vms,
find /vmfs/volumes/ -iname vmware.log | while read line; do
ls -lach $line | awk '{print "[" $6 " " $7 " " $8 "]" " " $9}' >> /tmp/vm_off_times.log
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment