From 1c3558c37c820e75cb145aaa483dfc00e67f715e Mon Sep 17 00:00:00 2001 From: cliu Date: Wed, 30 Sep 2026 14:01:33 +1000 Subject: [PATCH] Complete phase 1 and build the CI-Eng-Sample project Add verified system-management tasks (item read/write, quick load records, history load, monitoring processes, consistency check, tuning checks), the importable CI-Eng-Sample project with load/remove scripts, the unlicensed 1-hour shutdown note, and the sample-project re-test rule. Close ISS-002/003/004 and log ISS-005..007. Co-Authored-By: Claude Opus 5.5 --- .claude/skills/system-check/SKILL.md | 6 ++ .claude/skills/system-management/SKILL.md | 12 ++- .../tasks/consistency-check.md | 39 ++++++++ .../system-management/tasks/export-dataset.md | 24 ++++- .../system-management/tasks/load-history.md | 77 ++++++++++++++++ .../tasks/load-remove-records.md | 92 +++++++++++++++++++ .../tasks/monitoring-processes.md | 61 ++++++++++++ .../tasks/read-write-item.md | 68 ++++++++++++++ .../system-management/tasks/tuning-checks.md | 44 +++++++++ CLAUDE.md | 5 +- examples/CI-Eng-Sample/.gitignore | 1 + examples/CI-Eng-Sample/01_section_df.qli | 15 +++ examples/CI-Eng-Sample/02_item_df.qli | 20 ++++ examples/CI-Eng-Sample/03_his_group_df.qli | 13 +++ examples/CI-Eng-Sample/04_item_his_df.qli | 13 +++ .../CI-Eng-Sample/89_remove_item_his_df.qli | 13 +++ .../CI-Eng-Sample/90_remove_his_group_df.qli | 12 +++ examples/CI-Eng-Sample/91_remove_item_df.qli | 19 ++++ .../CI-Eng-Sample/92_remove_section_df.qli | 15 +++ examples/CI-Eng-Sample/README.md | 92 ++++++++++++++----- examples/CI-Eng-Sample/load.cmd | 12 +++ .../monitoring/intcpumon.sup.txt | 5 + .../monitoring/intdskmon.sup.txt | 5 + .../CI-Eng-Sample/monitoring/intmon.sup.txt | 3 + .../CI-Eng-Sample/monitoring/intspawn.sup.txt | 6 ++ .../monitoring/inttcpmon.sup.txt | 4 + examples/CI-Eng-Sample/remove.cmd | 16 ++++ knowledge/issues.md | 11 ++- knowledge/manuals/IM36K10J10-01EN.md | 7 +- knowledge/progress.md | 44 +++++---- 30 files changed, 699 insertions(+), 55 deletions(-) create mode 100644 .claude/skills/system-management/tasks/consistency-check.md create mode 100644 .claude/skills/system-management/tasks/load-history.md create mode 100644 .claude/skills/system-management/tasks/load-remove-records.md create mode 100644 .claude/skills/system-management/tasks/monitoring-processes.md create mode 100644 .claude/skills/system-management/tasks/read-write-item.md create mode 100644 .claude/skills/system-management/tasks/tuning-checks.md create mode 100644 examples/CI-Eng-Sample/.gitignore create mode 100644 examples/CI-Eng-Sample/01_section_df.qli create mode 100644 examples/CI-Eng-Sample/02_item_df.qli create mode 100644 examples/CI-Eng-Sample/03_his_group_df.qli create mode 100644 examples/CI-Eng-Sample/04_item_his_df.qli create mode 100644 examples/CI-Eng-Sample/89_remove_item_his_df.qli create mode 100644 examples/CI-Eng-Sample/90_remove_his_group_df.qli create mode 100644 examples/CI-Eng-Sample/91_remove_item_df.qli create mode 100644 examples/CI-Eng-Sample/92_remove_section_df.qli create mode 100644 examples/CI-Eng-Sample/load.cmd create mode 100644 examples/CI-Eng-Sample/monitoring/intcpumon.sup.txt create mode 100644 examples/CI-Eng-Sample/monitoring/intdskmon.sup.txt create mode 100644 examples/CI-Eng-Sample/monitoring/intmon.sup.txt create mode 100644 examples/CI-Eng-Sample/monitoring/intspawn.sup.txt create mode 100644 examples/CI-Eng-Sample/monitoring/inttcpmon.sup.txt create mode 100644 examples/CI-Eng-Sample/remove.cmd diff --git a/.claude/skills/system-check/SKILL.md b/.claude/skills/system-check/SKILL.md index 9eb3042..007248c 100644 --- a/.claude/skills/system-check/SKILL.md +++ b/.claude/skills/system-check/SKILL.md @@ -71,6 +71,12 @@ prompt. Setup files (`*.sup`) are plain text (CRLF); edit them with the Setup Fi `tls\exe\ciserv.exe`). From a non-elevated shell `Start-Service StartCIServer` fails with "Cannot open StartCIServer service". Start it from an elevated prompt: `Start-Service StartCIServer` (or Services › CI Service › Start). +- **Unlicensed systems shut down after about 1 hour.** All CI Server processes exit, the + `StartCIServer` service still shows *Running*, and every tool fails with + `umh_panic: , license expired`. To recover, **stop then start** the CI Service + (elevated): `Stop-Service StartCIServer` then `Start-Service StartCIServer`. Before a long + task on an unlicensed system, note the start time (`(Get-Process ciserv).StartTime`) and + restart first if the hour is nearly up. ## 4. Time synchronization diff --git a/.claude/skills/system-management/SKILL.md b/.claude/skills/system-management/SKILL.md index 2d71850..c09ab1c 100644 --- a/.claude/skills/system-management/SKILL.md +++ b/.claude/skills/system-management/SKILL.md @@ -2,8 +2,8 @@ name: system-management description: >- CI Server R1.03 system management and command-line tools. Use when the user wants - to stop CI Server, export or - import dataset contents (dssqld), read or write item values (itmval), load or import history, + to stop CI Server, export dataset contents, load or remove records with quick load files + (dssqld, .qli), create sections or items in bulk, read or write item values or limits (itmval), load or import history, check database consistency (dsschk), monitor processes/CPU/disk/network, back up or migrate a system, tune or debug CI Server, or plan a system layout (standalone, separate portal, HAC, host-to-host, enterprise) or time synchronization. Source IM 36K10J10-01EN. @@ -24,4 +24,10 @@ Rules for every task: | Task | File | Status | |---|---|---| -| Export dataset contents / dump the data dictionary | `tasks/export-dataset.md` | verified | +| Export dataset contents (whole or filtered) / dump the data dictionary | `tasks/export-dataset.md` | verified | +| Load or remove records with quick load files (`.qli`), e.g. sections and items | `tasks/load-remove-records.md` | verified | +| Read / write item values and read limits | `tasks/read-write-item.md` | verified | +| Load history from CSV (`ithloahis`) and read history back | `tasks/load-history.md` | verified | +| Monitor CPU, disk, network, processes; run a command on an item change | `tasks/monitoring-processes.md` | verified | +| Database consistency check (`dsschk`) | `tasks/consistency-check.md` | verified (check only) | +| Tuning checks: limits and health snapshots | `tasks/tuning-checks.md` | verified (read-only) | diff --git a/.claude/skills/system-management/tasks/consistency-check.md b/.claude/skills/system-management/tasks/consistency-check.md new file mode 100644 index 0000000..7f84e4b --- /dev/null +++ b/.claude/skills/system-management/tasks/consistency-check.md @@ -0,0 +1,39 @@ +--- +task: Database consistency check (dsschk) +version: R1.03 +source: IM 36K10J10-01EN §4.1.1; practiced on the test system 2026-09-30 +status: verified (check only) +--- + +# Database consistency check (dsschk) + +Needs CI Server running. Checking is read-only; **repair (`-r`) changes the database**: +back up first and ask the user. + +## Check + +``` +dsschk -e -v > dsschk.out +``` + +- `-e` extended check: also compares the duplicated datasets on this node (e.g. item + definitions copied by ITEM and EQUIPMENT Services). This is the useful check on a + **single-node** system. +- `-v` verbose. Output lists `DSSP-I-CDS_START` / `DSSP-I-CDS_END` per dataset (228 on the + test system) and any problems; the same messages go to `%TLS_LOG_PATH%\umhlog.log`. +- `-d ` checks one dataset; `-n ` one node. +- Plain `dsschk` (no `-e`) only compares copies **between nodes**, so on a single node it + prints nothing. + +Look for warnings or errors: search the output for `-W-`, `-E-` or `-F-`. None = consistent. + +## Repair (not yet practiced) + +From IM 36K10J10 §4.1.1: run `dsschk -r` until no more inconsistencies are reported (or the +same ones repeat), then `dsschk -e`, then `dsschk -e -r` (possibly twice). Read the output +carefully; some problems need manual work. + +## ISAM files (not yet practiced) + +`ismchk ` checks one ISAM file; `ismkfr [-c] [-r] [-s] [-d] ` rebuilds +key files. Both need the file name (without it: `usage: ismchk data_base_name`). diff --git a/.claude/skills/system-management/tasks/export-dataset.md b/.claude/skills/system-management/tasks/export-dataset.md index 1260317..646ec93 100644 --- a/.claude/skills/system-management/tasks/export-dataset.md +++ b/.claude/skills/system-management/tasks/export-dataset.md @@ -47,6 +47,24 @@ description). Search it to find which dataset holds what, e.g. the version field ## Filtered exports -`dssqld -e .qli` exports using a filter file with `@`, `@FIELD` -and `@SELECT` keywords (IM 36K10J10 §5.6). The exact filter syntax is **not yet verified**; -export the whole dataset and filter the CSV instead until it is. +Export only matching records with a filter file (IM 36K10L50 §3.6, verified 2026-09-30): + +``` +@SELECT +'GROUP_NAME = "CIENG_EVENT"' +@HIS_GROUP_DF +``` + +``` +dssqld -e .qli .qli [-c] -l .lst +``` + +- `@SELECT`, then the filter in **single quotes** with strings in double quotes, then + `@`. The filter applies only to the next dataset. Operators: `=`, `!=`, `<`, `>`, + `and`. +- Some datasets (e.g. `ITEM_HISTORY`, `ITEM_VAL`, `ALARM_CHRONO`) are not exported unless + named explicitly (`NO-EXPORT` list in `dssqld.sup`). +- `ITEM_HISTORY` returns nothing unless the filter names `ITEM_NAME` and a `SAMPLE_TIME` range + (see `load-history.md`). +- `%TLS_DAT_PATH%\dss_export.qli` is Yokogawa's own filter file for exporting all engineering + definitions (`dssqld -e out.qli dss_export.qli`); it also shows `@MACRO` usage. diff --git a/.claude/skills/system-management/tasks/load-history.md b/.claude/skills/system-management/tasks/load-history.md new file mode 100644 index 0000000..dfce558 --- /dev/null +++ b/.claude/skills/system-management/tasks/load-history.md @@ -0,0 +1,77 @@ +--- +task: Load item history from CSV (ithloahis) and read history back (dssqld) +version: R1.03 +source: IM 36K10J10-01EN §2.9.2; IM 36K10L50-01EN §3.6; practiced with CI-Eng-Sample 2026-09-30 +status: verified +--- + +# Load item history (ithloahis) and read it back + +**Writes to the history database.** Needs CI Server running and the items linked to an +item storage group of type *Event/Item* or *Event/Event*. The sample project provides +`CIENG_EVENT` with `CI-Eng-Sample.TANK1.LEVEL` and `.INFLOW`. + +## Before loading + +- A **new** storage group stores nothing until CI Server has been restarted (stop, then start + the CI Service). Restart after creating a group. +- Only samples dated **after the start of the current storage unit** were stored; older ones + were silently skipped (see `knowledge/issues.md` ISS-006). A restart starts a new unit. + +## Input files + +Event file: one sample per line. + +``` +EVENT +