Determining when a guest was stopped

Apr 26, 2018
111
10
23
Without parsing through logs, is there a straightforward way using Proxmox command line tools to know when a guest system was stopped?

Background:

When an LXC or KVM guest is stopped, the vzdump cron jobs continue to create backups. While hardly the end of the world, would be nice to determine whether the guest system has been stopped longer than the previous vzdump backup. That would help avoid wasting storage space and network bandwidth with unnecessary vzdump backups.

Thanks!
 
hi,

unfortunately i'm not aware of an "easy" way to do this. you'll need to write a script to parse the logs.

maybe something like grep'ing for '(qmstop|vzstop)' in /var/log/pve/tasks and then checking the creation time of the logfile could work..