How to count totoal minutes code server has been open in multiple tabs #4664
Answered
by
code-asher
simonjcarr
asked this question in
Q&A
Replies: 4 comments 2 replies
|
Hmm... @simonjcarr since Linux is predominantly used in deployed containers, although this might work on OSX, you could try making a stopwatch script using SH and run it from |
0 replies
|
Great question! @code-asher what do you think? |
0 replies
|
The requirement to count multiple connections separately makes it a bit
tricky. Maybe the best way would be to create an extension that keeps
track since there will be one extension host per connection.
Or code-server could be wrapped in an iframe and some code could be
added to track that connection. Or create a proxy that sits in front of
code-server and tracks open connections (there are two per page but they
can be distinguished with the `type` query parameter).
|
2 replies
Answer selected by
simonjcarr
|
Thanks for all the feedback guys, but never mind, I have worked out how to do it. I don't need the information across all tabs any more, so I have just added a script to my based linux image. This script is invoked every minute by cron and it posts to an api with the data from healthz. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am trying to find a way to total the number of minutes a Code Server container has been in use. I want to know this across multiple tabs, so if one user has a code server session running in two tabs for 10 minutes, then I would like to count 20 minutes of usage.
I am thinking that perhaps I can write a script that runs in the background of each container sends data back to the server, but would that script run for each open window, or would only one instance of the script run even if 20 windows were open?
All reactions