Determine when LXD instance was started.
Use last_used_at
key to determine when LXD instance was started.
$ lxc list --format json | \ jq -r '.[] | select(.state.status=="Running") | "\(.name) started at \(.last_used_at)"'
adguard started at 2022-02-28T22:13:50.406329881Z named started at 2022-02-28T22:13:52.01463686Z unbound started at 2022-02-28T22:13:53.94193113Z
Define a variable to extract this data from specific instance.
$ lxc list --format json | \ jq -r --arg name "adguard" '.[] | select(.state.status=="Running") | select(.name==$name) | "\(.last_used_at)"'
2022-02-28T22:13:50.406329881Z