| 1 | |
| 2 | = NetDRMS Useful Debugging Checks = |
| 3 | |
| 4 | This is a collection of short checks that can be done on the SUMS or DRMS databases to debug problems. It should be fairly |
| 5 | clear from the context if the query should be run on the DRMD database or on the SUMS one. If in doubt, try one, and fail |
| 6 | over to the other. |
| 7 | |
| 8 | === Check sunum_queue size === |
| 9 | |
| 10 | This checks the size of the sunum_queue - the sunums waiting to be processed. This should ideally be 0 unless a lot |
| 11 | of sunums have come in at once. |
| 12 | |
| 13 | {{{ |
| 14 | select count(*) from sunum_queue; |
| 15 | }}} |
| 16 | |
| 17 | === Check sunum_queue entries older than 1 day === |
| 18 | |
| 19 | This checks the number of entries in sunum_queue that are older than a day. This should be 0. |
| 20 | |
| 21 | {{{ |
| 22 | select count(*) from sunum_queue where timestamp < now() - interval '1 days'; |
| 23 | }}} |
| 24 | |
| 25 | === See what partitions SUMS has available === |
| 26 | |
| 27 | This shows what partitions SUMS has available. The last entry in the table - pds_set_num - should be 0. If it |
| 28 | is not, then perhaps the disk is unmounted, or SUMS sees it as having filled up (note that SUMS sees a disk as full |
| 29 | slightly before the disk is at 100% use). You will have to work with sum_rm to clear up some space and then set |
| 30 | pds_set_num to 0 again. |
| 31 | |
| 32 | {{{ |
| 33 | select * from sum_partn_avail; |
| 34 | }}} |
| 35 | |
| 36 | |
| 37 | === Temporal coverage === |
| 38 | |
| 39 | When data are written to disk, they have an "effective date" - a date after which they can be deleted by sum_rm. |
| 40 | This returns the latest effective date that is still available. |
| 41 | |
| 42 | {{{ |
| 43 | select min(effective_date) from sum_partn_alloc; |
| 44 | }}} |
| 45 | |
| 46 | === slony updates === |
| 47 | |
| 48 | This shows the time of the last slony update and the time it was last applied. It should be very recent, at least on the current day. |
| 49 | |
| 50 | {{{ |
| 51 | select * from _jsoc.sl_archive_tracking; |
| 52 | }}} |
| 53 | |
| 54 | |
| 55 | === Show data on disk === |
| 56 | |
| 57 | This shows data that are on disk. Note that you can be subscribed to a dataset and yet not have data for it on disk (no trigger to get the data). |
| 58 | |
| 59 | {{{ |
| 60 | select owning_series, sum(bytes), count(*) from sum_main group by owning_series order by sum(bytes); |
| 61 | }}} |
| 62 | |