Last active
October 2, 2019 11:31
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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