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
359 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
• 57,890 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
• 57,890 points
530 views
0 votes
1 answer
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, 2019 in GCP by Sirajul
• 57,890 points
462 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, 2019 in GCP by Sirajul
• 57,890 points
326 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, 2019 in GCP by Sirajul
• 57,890 points
1,133 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, 2019 in GCP by Sirajul
• 57,890 points
126 views