How do I know for how long an instance has been running on GCP

0 votes
I want to know for how long an instance has been running. How do I find this out?
Sep 23, 2019 in GCP by Sam
• 6,260 points
4,264 views

1 answer to this question.

0 votes

If you SSH into the instance you can run the command uptime -p and it will show you how long the instance has been running.

Alternatively, if you are using gcloud, you could execute this command:

 gcloud compute --project <project_id> ssh --zone <zone> <instance-name> -- command 'uptime'

answered Sep 23, 2019 by Sirajul
• 59,190 points

Related Questions In GCP

0 votes
1 answer
0 votes
1 answer

How do I transfer files to a windows instance on GCP?

You could probably use Windows RDP client for ...READ MORE

answered Nov 8, 2019 in GCP by Sirajul
• 59,190 points
3,386 views