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 in GCP by Sam
• 3,500 points
21 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 by Sirajul
• 35,810 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 3 days ago in GCP by Sirajul
• 35,810 points
17 views
0 votes
1 answer

How do I create a Virtual Machine on GCP?

To create a VM instance: It is important you ...READ MORE

answered Sep 20 in GCP by Sirajul
• 35,810 points
38 views
0 votes
1 answer

Creating a SQL Server instance using Google Compute engine.

Google Compute Engine provides public images preconfigured with ...READ MORE

answered Sep 23 in GCP by Sirajul
• 35,810 points
33 views
0 votes
1 answer

How do i install gcloud compute?

The gcloud compute command-line tool enables you to easily ...READ MORE

answered Sep 23 in GCP by Sirajul
• 35,810 points
39 views
0 votes
1 answer

Creating password for a windows instance on GCP

Windows Server instances use password authentication instead ...READ MORE

answered Sep 24 in GCP by Sirajul
• 35,810 points
74 views
0 votes
1 answer
0 votes
1 answer

How do i delete a RAM disk from my instance on GCP?

You can unmount a tmpfs RAM disk just like ...READ MORE

answered Oct 22 in GCP by Sirajul
• 35,810 points
21 views