Pull history of qubes VM usage?

hey am i able to pull like a timestamp or something of qubes opeened? not see contents or anything but just a simple log or something that shows when a certain vm was last opened or used

I’m not sure where the file is, check it out in dom0 with :
sudo find / -iname "*guest-<VM-NAME>*" example "*guest-sys-net*"

the log files are in /var/log/qubes, with files per qube
You’ll see “Starting qube”, “Starting QubesDB”, “Activating…” -
probably grepping for Activating in the files for the qube you are
interested in will be best

Continuing @unman’s suggestion, some quick one-liners that will provide a history:

Start times by qube:

sed -n 's/^\(.*\) Activating the \(.*\) VM/\2 \1/p' /var/log/qubes/qubes.log*|sort|column -t

Start times by date:

sed -n 's/^\(.*\) Activating the \(.*\) VM/\1 \2/p' /var/log/qubes/qubes.log*|sort|column -t

Most popular qubes:

sed -n 's/^\(.*\) Activating the \(.*\) VM/\2/p' /var/log/qubes/qubes.log*|sort|uniq -c|sort -n
1 Like

That should of course be /var/log rather than /var/lob - if you’ve
already edited this, apologies.

When typing this command in dom0 may brain autocorrected it and I didn’t even notice. @icequbes1 I’ve fixed this for you.

Thank you @deeplow and @unman; /var/log is the correct path. I should have just copied the dom0 clipboard but I suppose I trusted my fingers more than my eyes.

1 Like