scheduler_state tag no longer in client_state.xml?

Message boards : BOINC client : scheduler_state tag no longer in client_state.xml?
Message board moderation

To post messages, you must log in.

AuthorMessage
jmiller8

Send message
Joined: 1 Apr 07
Posts: 6
Message 12289 - Posted: 4 Sep 2007, 5:08:59 UTC
Last modified: 4 Sep 2007, 5:15:10 UTC

Just upgraded to 5.10.20 of the CC, from 5.10.8.

I have a program which scans the client_state.xml file on a number of machines every 15 minutes, and gives a small snapshot of each machine (active project, current task % complete, queued WU).

It used the scheduler_state in the (active_task) section to determine which task was currently running:
(scheduler_state)2(/scheduler_state)
would indicate the running task.

As of 5.10.20, this tag no longer exists!

How is the "running task" in the (active_task_set) now indicated in client_state.xml?
ID: 12289 · Report as offensive
Keck_Komputers
Avatar

Send message
Joined: 29 Aug 05
Posts: 304
United States
Message 12291 - Posted: 4 Sep 2007, 6:10:56 UTC

It is better to use the RPCs to do this kind of thing. Reading the client_state.xml file can cause tasks to fail if you have it locked while BOINC is trying to write to it.
BOINC WIKI

BOINCing since 2002/12/8
ID: 12291 · Report as offensive
jmiller8

Send message
Joined: 1 Apr 07
Posts: 6
Message 12292 - Posted: 4 Sep 2007, 6:16:54 UTC - in response to Message 12291.  

It is better to use the RPCs to do this kind of thing. Reading the client_state.xml file can cause tasks to fail if you have it locked while BOINC is trying to write to it.



No need to lock it, as I'm just reading. Been running this code since about day 1 of boinc, without a problem.
ID: 12292 · Report as offensive
MikeMarsUK

Send message
Joined: 16 Apr 06
Posts: 386
United Kingdom
Message 12294 - Posted: 4 Sep 2007, 8:25:04 UTC
Last modified: 4 Sep 2007, 8:28:43 UTC

Even simply reading a file will take a lock on it ('shared' rather than 'exclusive', of course). If Boinc wants an exclusive lock when you have a shared lock, Boinc's attempt to grab the file will fail and it will retry after a short delay.

If you read it quickly enough, then Boinc will get the lock on the retry. If you're unlucky, and happen to have a new shared lock at the same moment that Boinc is retrying, then Boinc will fall over.
ID: 12294 · Report as offensive

Message boards : BOINC client : scheduler_state tag no longer in client_state.xml?

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.