我怎么知道我的Azure角色是否由运行时或手动关闭? [英] How do I know whether my Azure role was shut down by runtime or manually?

查看:220
本文介绍了我怎么知道我的Azure角色是否由运行时或手动关闭?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经部署了一个Azure的服务 - 在一段时间有一次我看到我日志中的调用OnStop()被调用,那么大约20分钟后的OnStart()被调用。我想知道为什么会发生的事情。

I've deployed an Azure service - once in a while I see in my logs that OnStop() is called, then after about 20 minutes OnStart() is called. I'd like to know why that's happening.

如何知道我的角色无论是手动或通过Azure中运行时重新启动?

How can I know whether my role is restarted manually or by Azure runtime?

推荐答案

你能解释一下你的意思是通过手动重新启动?是有人通过RDP登录并创下重启?

Can you explain what you mean by restarted manually? Is that someone logging in via RDP and hitting reboot?

您只可以触发重新启动的几个选项:

You only have a few options that can trigger a reboot:


  1. 有人通过RDP登录和字面重新启动。没办法跟踪之一。关闭RDP,如果你担心,作为一个常见的​​场景。我不知道调用OnStop甚至会在这里调用。

  2. 结构控制器关闭实例一)修补来宾操作系统如果允许(指定*作为客户机操作系统版本)或b。)偶尔修补根操作系统。你可以最有可能从看基础设施日志跟踪此。设置诊断观看和传输这些日志。我没有亲自试过,但它是我最好的猜测绑在一起。

  3. 有人打'重启'从门户或API。有一个列表操作历史API调用,您可以检查会告诉你这的LiveID或证书称为重启实例API。

  1. Someone logged in via RDP and literally rebooted. No way to track that one. Turn off RDP if you are worried about that being a common scenario. I am not sure OnStop would even be called here.
  2. The fabric controller shuts down the instance to a.) patch the guest OS if allowed (specifying * as guest OS version) or b.) patch the root OS occasionally. You can most likely track this from looking at the infrastructure logs. Setup diagnostics to watch and transfer those logs. I have not personally tried this, but it would be my best guess to tie it together.
  3. Someone hit 'Reboot' from portal or API. There is a List Operations history API call that you can check that will tell you which LiveID or certificate called the Reboot instance API.

所以,如果你看到一个调用OnStop,没有太多可以做的#1关闭RDP短(正如我所说,我不知道它甚至会引发调用OnStop)。你可以看一下,否则对基础设施日志和列表操作的API,看看它启动

So, if you see a OnStop, there is not much you can do about #1 short of turning off RDP (and as I said, I am not sure it would even trigger a OnStop). You can otherwise look to the infrastructure logs and List Operations API to see what initiated it.

这篇关于我怎么知道我的Azure角色是否由运行时或手动关闭?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆