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
• 2,100 points
15 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
• 29,340 points

Related Questions In GCP

0 votes
1 answer

How do I add the access config for my Linux VM instance?

If your instance does not have an ...READ MORE

answered Sep 26 in GCP by anonymous
• 3,250 points
25 views
0 votes
1 answer
0 votes
1 answer

How do I create a Google Cloud Platform (GCP) account?

In order to access the services provided ...READ MORE

answered Sep 20 in GCP by Sirajul
• 29,340 points
28 views
0 votes
1 answer

How do I create a VPCN (Virtual private cloud network) on Google Cloud?

You can connect various GCP resources to each ...READ MORE

answered Sep 23 in GCP by Sirajul
• 29,340 points
13 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
• 29,340 points
18 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
• 29,340 points
16 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
• 29,340 points
44 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
• 29,340 points
28 views
0 votes
1 answer