| home | layout | structure | qd | hexdump |
          File : queue.dat
 Queue Version : 5.01
          Size : 7168 bytes
    F@H Client : FAH502-Linux.exe

Index X - Status

finished
The printed status is an interpretation of an integer status code for each entry, sometimes influenced by other data fields in that entry, e.g. the Upload Status. The names given to these status codes by qd are a little different from the names printed by the client with its "-queueinfo" flag. If qd is started with the "-h" flag, it will print out an explanation of its status code names.

Status codes

Here is a list of all the possible status codes that can be printed for a queue entry. When qd was first written, the client had no publicly-available names, so qd made up names according to the status of the work unit, from the perspective of the user. The following list is available if qd is started with the "-h" flag:

The status code for each queue entry may be interpreted as follows:

(0) empty
  The queue entry has never been used, or has been completely cleared.
(0) deleted
  The unit was explicitly deleted.
(0) finished
  The unit has been uploaded.  The queue entry is just history.
(0) garbage
  The queue entry is available, but its history is unintelligible.
(1) folding now
  The unit is in progress.  Presumably the core is running.
(1) queued for processing
  The unit has been downloaded but processing hasn't begun yet.
(2) ready for upload
  The core has finished the unit, but it is still in the queue.
(3) DANGER will be lost if client is restarted!
  Bug before V3b5, neglected to post status (1).
(3) abandoned
  Bug before V3b5, neglected to post status (1), and client was restarted.
(4) fetching from server
  Client presently contacting the server, or something failed in download.
  If this state persists past the current unit, the queue entry will be
  unusable, but otherwise things will go on as usual.
(?) UNKNOWN STATUS = ??
  Something other than 0 to 4.
 
The numbers in parentheses are the actual value used for that status code.  Code (0) is called four different names depending on other data found in the queue entry.

Several months after all this was written and working as described, the guys at Stanford added the "-queueinfo" option to the client, and they gave their own names to these same codes according to the queue entry, from the perspective of the client, describing what it needs to do about it.  Status code (3) really never happens any more, but here is what it calls the others.
(0) empty
  The queue index is available for reuse by a new unit.
(1) active
  The unit files are actively processing, and the core should be running.
(1) ready
  The unit files are ready for processing but are queued, and the core
  should be started to process them when earlier units are finished.
(2) finished
  The core has finished the unit, and it needs to be uploaded.
(4) fetching
  The index is allocated to a unit being fetched from a server.
 
The "fetching" status was not handled correctly until client version 5.0, which will free the index if it finds that status in the queue.  If an earlier client was restarted and discovered the "fetching" status at one of the queue indices, it simply skipped over that index for ever afterward, never reclaiming it for further use.

It's unfortunate that the word finished is used with differing meanings.  In the output from qd, "finished" means it's really all done, and the information still stored is just history.  But if it's the client which says "finished", it means only that the processing has finished, and the work has not been sent back yet.


grep "000 Status" qd.c
        {       u32     stat;           /* 000 Status */

./qd -q queue.dat | grep "Index"
 Index 3: finished 153.00 pts (2.023 pt/hr) 14 X min speed
 Index 4: finished 48.00 pts (1.379 pt/hr)
 Index 5: finished 41.00 pts (1.263 pt/hr)
 Index 6: finished 41.00 pts (1.169 pt/hr)
 Index 7: finished 36.00 pts (1.164 pt/hr)
 Index 8: finished 600.00 pts (1.330 pt/hr) 4.36 X min speed
 Index 9: finished 241.00 pts (0.601 pt/hr) 4.07 X min speed
 Index 0: finished 600.00 pts (2.166 pt/hr) 7.1 X min speed
 Index 1: finished 600.00 pts (2.121 pt/hr) 6.96 X min speed
 Index 2: folding now 165.00 pts

hexdump -C -s 8 -n 4 queue.dat      # Index 0
00000008  00 00 00 00                                       |....|
0000000c

hexdump -C -s 720 -n 4 queue.dat    # Index 1
000002d0  00 00 00 00                                       |....|
000002d4

hexdump -C -s 1432 -n 4 queue.dat   # Index 2
00000598  01 00 00 00                                       |....|
0000059c

hexdump -C -s 2144 -n 4 queue.dat   # Index 3
00000860  00 00 00 00                                       |....|
00000864

hexdump -C -s 2856 -n 4 queue.dat   # Index 4
00000b28  00 00 00 00                                       |....|
00000b2c

hexdump -C -s 3568 -n 4 queue.dat   # Index 5
00000df0  00 00 00 00                                       |....|
00000df4

hexdump -C -s 4280 -n 4 queue.dat   # Index 6
000010b8  00 00 00 00                                       |....|
000010bc

hexdump -C -s 4992 -n 4 queue.dat   # Index 7
00001380  00 00 00 00                                       |....|
00001384

hexdump -C -s 5704 -n 4 queue.dat   # Index 8
00001648  00 00 00 00                                       |....|
0000164c

hexdump -C -s 6416 -n 4 queue.dat   # Index 9
00001910  00 00 00 00                                       |....|
00001914