I try to identify all instances running in my Google Cloud Plattform environment for longer than a certain time period specified by me. How can I achieve this?
Try:
gcloud compute instances list --filter="creationTimestamp.date('%s', Z)< $(date -d'5 hours ago' +%s)" --format="csv[no-heading](NAME)"
This should list you all instances running for e.g. more than 5 hours.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments