| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
gh release download, gzip, pax, then chtag ISO8859-1: z/OS tar cannot gunzip,
and without the chtag IBM make reads the Makefile as a single line and stops
with FSUM8705 No target. Verified by building the published v1.0.0 tarball on
CBT: warning-free, 57344 bytes, --version prints whoson 1.0.0.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ci.yml checks clang-format (pinned to 23.1.5, since the tool moves line
breaks between releases) and that the Makefile still parses under GNU make:
the build itself needs z/OS and ZOAU, which no hosted runner has.
release.yml runs on a v* tag, refuses one that disagrees with VERSION,
archives the sources with git archive, and attaches the tarball and its
sha256 to the release. No binary: whoson links the ZOAU 64-bit DLL.
Also an issue form that asks for the console display behind a wrong row, a PR
template, CONTRIBUTING.md with the build, style and release steps, and
CHANGELOG.md with 1.0.0. README gains badges, the usage lines and an install
section.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An SSH session had no CPU figure: NA. Its OMVS process reports CT_SECS,
so use that, and print both it and the TSO/E CT as seconds.milliseconds
through one fmt_cpu() instead of passing the raw text through.
PROCS counts what the session is running, by walking the pid tree down
from its own process. Counting by address space is wrong: each fork gets
its own ASID on z/OS, so the shell is never in the sshd's ASID.
USERID= in the DISPLAY TS record is the account; the first column is the
job name and the two can differ.
Reindent the source to .clang-format (four spaces, attached braces).
|
| |
|
|
|
|
|
|
| |
CEE converts stdio output from ASCII to EBCDIC when stdout is a terminal, and
sshd converts a command's pipe or socket the other way, so printf was mangled
one way or the other. emit() writes with write(2) and converts to EBCDIC only
when the descriptor is not a terminal; the help text, usage error, diagnostics
and the table all go through it.
|
| |
|
|
|
|
|
| |
CEE converts stdio output from ASCII to EBCDIC when stdout is a terminal,
and sshd forwards that pty to the client unchanged, so printf put EBCDIC on
the screen. A single buffered write(2) keeps the bytes ASCII on a terminal,
a pipe and a redirected file.
|
| |
|
|
|
|
|
|
| |
The ASCII build's output was decoded as EBCDIC by the ssh exec channel,
so `whoson | grep` and `whoson > file` through the channel produced
mojibake (the file bytes themselves were ASCII). Build the table in an
ASCII buffer and convert it once with __a2e_l before fwrite, which is
what the console and the exec channel both expect.
|
| |
|
|
|
|
|
| |
With -fzos-le-char-mode=ascii the literals are ASCII, but opercmd still
returns its display in EBCDIC, so every parse matched nothing and only
the header printed. Convert each response in place with __e2a_l before
the parser sees it, and the stderr text before it is echoed.
|
| |
|
|
|
|
| |
The em dash is not in ISO8859-1, and .gitattributes tags README.md
with zos-working-tree-encoding=iso8859-1, so a checkout on z/OS fails
with 'failed to encode README.md from UTF-8 to iso8859-1'.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
The C program using the ZOAU vector covers the same ground and does not need opercmd on PATH, so shell/whoson and its README section go.
|
| |
|
|
|
|
| |
TYPE says TSO/E for a plain TSO/E logon and SSH for an sshd, but a TSO/E
user who also owns an OMVS process is reachable from the POSIX side, and
that is worth seeing: the same session is now labelled TSO/E OMVS.
|
| |
|
|
|
|
| |
The PID comes from DISPLAY OMVS,A=ALL (field 4) and is matched to a TSO/E
session by address space id, so a TSO/E user who owns an OMVS process shows
it and one who does not shows NA.
|
|
|
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.
|