summaryrefslogtreecommitdiffhomepage
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Follow C-PROGRAMMING-STANDARDS.md throughoutfix/c-programming-standardsSean Kurtz29 hours1-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The standards document that merged as PR #25 is now the reference for the language level, the diagnostics, the names and the comments. What the audit found and this commit settles: - C23 in full: nullptr instead of NULL, static_assert for every offset the walk reads, constexpr for the buffer and column widths, and the one compiler attribute wrapped in PRINTFLIKE so call sites stay C23. - -Wstrict-prototypes and -Wmissing-prototypes, which the document requires and the Makefile did not carry. - Lower-case constexpr names, and static so each stays internal. - A Doxygen block on every function, type, global and macro, and /**< */ on every member, as section 3.3 asks. - -D_OPEN_SYS_FILE_EXT=1, the value the document names, in the Makefile and in .clangd. - make format and make tidy, the two target names the document gives. - The eye-catcher hex, the CHTRKID value and the EBCDIC reasoning now carry the why in a comment rather than standing bare. Where the document and this program disagree, the program keeps its reason and CONTRIBUTING.md records the agreement where it is not obvious. Also fixes the wall of undecodable bytes after `make check`: the runtime's own storage report, and the one the ps child inherits, are EBCDIC text written to an ASCII log. An untagged stdout or stderr is now tagged ISO8859-1 before anything writes to it, so both reports arrive as text.
* Build as C23 and pin the control-block layoutSean Kurtz30 hours1-1/+1
| | | | | | | | | | | The overlays become packed C23 structs, so the offsets are the sum of the field widths instead of hand-written padding, and every field the walk reads is pinned by static_assert. The CSCB and the ASSB are now validated by their eye-catchers (and CHASID for the CSCB) before they supply a userid, a logon procedure or CPU time. The CPU column prints a compact duration instead of hours:minutes:seconds, which read 1947:50:11 for a long session.
* Pass zopen's compiler through and find the listing formatter beside itSean Kurtz34 hours1-6/+2
|
* Fix the code review findings for 939f3ecSean Kurtz34 hours1-1/+4
|
* Release 1.1.0 and package as a zopen portSean Kurtz2 days1-1/+1
| | | | | | | | | | | | | - buildenv: zopen stable line from the release tarball, DEV from main, make check as the port check, install under $ZOPEN_INSTALL_DIR. - Size the session table from ASVTMAXU plus the process count, and stop collapsing SSH rows by ASID, so sessions sharing an address space are all listed. - Read ASSBASST for every session, not only those with a CSCB. - CHANGELOG 1.1.0, VERSION 1.1.0, README/CONTRIBUTING zopen and release steps, CI checks that buildenv agrees with VERSION. - Suppress the Linux-clangd cascade for the z/OS-only headers by its real diagnostic ids.
* Fix the review findings for 552c76cSean Kurtz2 days1-6/+9
| | | | | | | | | | | | | | CPU time is now TOD units (>> 12) and includes ASSBASST. TSO user and logon procedure come from the CSCB. SSH sessions come from the w_getpsent() process tree and join the address space by ASID. The ASVT walk sizes itself from ASVTMAXU, validates each entry, and a fault while reading a terminated address space skips that row instead of abending. Output follows the zopen character-set convention: ASCII in ISO8859-1 files and IBM-1047 on terminals and pipes, driven by the descriptor tag, with F_CONTROL_CVT saved and restored around the run. README, CHANGELOG, CONTRIBUTING, CI and the issue/PR templates are corrected, and the z/OS 2.5 floor is stated.
* Read sessions from common storage, one row per sessionSean Kurtz4 days1-29/+20
| | | | | | | | | | | | | | | | | | | | | | | Replace the ZOAU display parsing with a walk of CVT -> ASVT -> ASCB. The address space list, the TSO/E test (ASCBTSB), the CPU accumulators (ASCBEJST + ASCBSRBT) and the two name pointers (ASCBJBNI, ASCBJBNS) are all in common storage, so the program needs no ZOAU library, no LIBPATH, no console and no authorization. The table is now one row per interactive session and nothing else: the started tasks, OMVS daemons and shell children that used to fill it are gone. TYPE is TSO/E, z/OSMF or SSH. A TSO/E logon is a row because it has a TSO/E session block; it is z/OSMF when the session was logged on by the z/OSMF logon procedure, which is how z/OSMF gets a user in (the z/OSMF Configuration Guide's COMMONPROC/FILEPROC, IZUFPROC by default); an SSH session is an sshd started with -R, since the listener runs without it. PID and the user come from ps -A -o pid,jobname,user,time,args, joined to the address space by job name. JOBNAME and LOGONPROC are separate columns because ASCBJBNI and ASCBJBNS are different names; the CPU counters are printed as hours:minutes:seconds. README and CHANGELOG describe the new design and the three types.
* whoson: report its version, and keep it in the MakefileSean Kurtz5 days1-1/+4
| | | | | | --version and -V print "whoson <version>"; the string comes from VERSION in the Makefile through -DWHOSON_VERSION, so a hand compile still builds and says "unknown". The release workflow refuses a tag that disagrees with it.
* Makefile, README: record that every build is the release artifactSean Kurtz5 days1-0/+5
| | | | | | | O3 without -g already; a z/OS program object has no symbol table, so there is nothing for strip to remove: strings finds no function names in the binary, /bin/strip leaves its size alone, and the driver ignores -s as a compile-only flag. Saying so keeps a strip step from being added to no effect.
* Makefile: add a list target for Open XL 2.2 compiler listingsSean Kurtz5 days1-7/+18
| | | | | | The 2.2 driver can write a JSON listing and ship a formatter for it, so `make list` builds and leaves the pseudo assembly with offsets, grouped by function, in whoson.listing. Clean removes both new files.
* Makefile: build with IBM Open XL 2.2 (clang 21.1)Sean Kurtz5 days1-1/+1
| | | | | | | | | IBM Open XL C/C++ 2.2 is installed at /usr/lpp/IBM/cnw/v2r2/openxl and is what PATH now resolves ibm-clang to, but the Makefile pins an absolute compiler path, so it kept building with 2.1. Built on cbt with 2.2.0.0 / clang 21.1.1: no warnings with the project's flags, and the binary lists both SSH and TSO/E sessions.
* Makefile: build in ASCII character modeSean Kurtz6 days1-6/+5
| | | | | | | Switch the default from -fzos-le-char-mode=ebcdic to =ascii (with -O3), so string literals share the ASCII encoding of ZOAU's returned text and of the ssh channel. Install with chmod +x. Docs and code comments followed the old EBCDIC claim.
* Makefile: make the installed binary executableSean Kurtz6 days1-0/+1
| | | | | cp keeps the source file's mode, so a checkout with a non-executable whoson produced a non-executable install. chmod 755 after the copy.
* Makefile: accept PREFIX; use .PHONY; stdint typesSean Kurtz6 days1-5/+13
| | | | | | | | | | install now goes to $(PREFIX)/bin (default ~/.local) and creates the directory. The old comment claimed IBM's make rejects .PHONY; it does not. whoson.c: long -> int32_t for pids and second counts, printed with PRId32, so the width is the same on z/OS (ILP32) and everywhere else. tools/zoautil-shim.h: lets clangd type-check off z/OS; never compiled in.
* whoson: flatten the tree, one source file at the topSean Kurtz6 days1-3/+3
| | | | src/ held a single file, so the Makefile and README no longer need the path.
* whoson: list TSO/E and SSH sessions with job id, CPU, elapsed and regionSean Kurtz6 days1-0/+53
TSO/E rows come from DISPLAY TS,A (user, status, ASID, CT, ET, WUID, SCL, priority, RGP); SSH rows from DISPLAY OMVS,A=ALL, with the sshd listener account dropped. Both go through the ZOAU shared library vector, so there is no shell and no opercmd on PATH. The console command has to be passed quoted as one argv element: the vector splits the argument string itself.