1

I am trying to figure out how to calculate VM total usage time by user by day. However, if I have multiple terminal windows open, the linux "ca" command seems to be adding up all the times. For example, if I opened 3 terminal windows and used them for a total of 10 mins, "ca" command returns .50 hrs, or 30 mins. However, i was only logged in for 10 mins. Is there a way to ignore multiple terminal windows?

  • Please share what you have attempted in the question details. – aaronR Feb 28 '18 at 16:54
  • I did some more research and found the "last" command, which returns the total amount of time a user was logged in to that vm per day. This made my job a lot easier. I just grep for the part I care about (time), strip it off of its parentheses, and add up the times. I will post code once it is finalized – Pilotito_dev Mar 01 '18 at 17:39

0 Answers0