Skip to main content
Is there a way to find out what Universe program or lines of code that are being executed by a user via universe or Linux commands?

------------------------------
[Gary] [Rhodes]
[Universe Developer]
[NPW Companies]
[Hialeah] [FL] [USA]
------------------------------
Is there a way to find out what Universe program or lines of code that are being executed by a user via universe or Linux commands?

------------------------------
[Gary] [Rhodes]
[Universe Developer]
[NPW Companies]
[Hialeah] [FL] [USA]
------------------------------
Gary,
You can use the PORT.STATUS command in the uvhome account and the VLIST command in the account where the program and object code reside.
For example, on a system with no other activity I ran a TEST program as a phantom. Running PORT.STATUS without any argumentes will show all UV processes on the system. The PORT.STATUS will show the object code address if a BASIC program is current running. In the example below, the program is at hex address 0x96.

>PORT.STATUS

There are currently 2 uniVerse sessions; 1 interactive, 1 phantom

Pid.... User name. Who. Port name..... Last command processed............
16187398 root 1 /dev/pts/2 PORT.STATUS
Pid.... User name. Who. Last command processed............................
17760428 root -2 RUN BP TEST [ TEST @ 0x96 ]

When reviewing a specific session, there are other options available. One of them is LAYER.STACK which will show the call stack of the process. In the example below, only the single program is running. If the program was nested due to being called from other programs, the entire call stack would be displayed.

>PORT.STATUS PID 17760428 LAYER.STACK

There are currently 1 uniVerse sessions; 0 interactive, 1 phantom

Pid.... User name. Who. Last command processed............................
17760428 root -2 RUN BP TEST [ TEST @ 0x96 ]

Layer type....... Program name.................... Address...
BASIC run machine TEST 0x00000096
Verb
Verb
Command Language
>

When the source and object code are available, the VLIST command can be used to associated the hex object code address with the relevant line of source code.

>VLIST BP TEST
Main Program "BP.O/TEST"
Compiler Version: 11.3.0.0
Object Level : 5
Machine Type : 0
Local Variables : 0
Subroutine args : 0
Unnamed Common : 0
Named Common Seg: 0
Object Size : 162
Source lines : 28
Object Date Time: 27 DEC 2022 10:51:13

00001: CRT "THIS IS LINE 1"
00001 00000 : 046 crtcrlf "THIS IS LINE 1"

00002: CRT "THIS IS LINE 2"
00002 00006 : 046 crtcrlf "THIS IS LINE 2"

00003: CRT "THIS IS LINE 3"
00003 0000C : 046 crtcrlf "THIS IS LINE 3"
.
.
.
.
.
00024: CRT "THIS IS LINE 24"
00024 0008A : 046 crtcrlf "THIS IS LINE 24"

00025: CRT "THIS IS LINE 25"
00025 00090 : 046 crtcrlf "THIS IS LINE 25"

00026: SLEEP 300
00026 00096 : 17E sleep 300

00027: CRT "AFTER SLEEP"
00027 0009A : 046 crtcrlf "AFTER SLEEP"

00028: END
00028 000A0 : 190 stop

Neil

------------------------------
Neil Morris
Universe Advanced Technical Support
Rocket Software
------------------------------
Gary,
You can use the PORT.STATUS command in the uvhome account and the VLIST command in the account where the program and object code reside.
For example, on a system with no other activity I ran a TEST program as a phantom. Running PORT.STATUS without any argumentes will show all UV processes on the system. The PORT.STATUS will show the object code address if a BASIC program is current running. In the example below, the program is at hex address 0x96.

>PORT.STATUS

There are currently 2 uniVerse sessions; 1 interactive, 1 phantom

Pid.... User name. Who. Port name..... Last command processed............
16187398 root 1 /dev/pts/2 PORT.STATUS
Pid.... User name. Who. Last command processed............................
17760428 root -2 RUN BP TEST [ TEST @ 0x96 ]

When reviewing a specific session, there are other options available. One of them is LAYER.STACK which will show the call stack of the process. In the example below, only the single program is running. If the program was nested due to being called from other programs, the entire call stack would be displayed.

>PORT.STATUS PID 17760428 LAYER.STACK

There are currently 1 uniVerse sessions; 0 interactive, 1 phantom

Pid.... User name. Who. Last command processed............................
17760428 root -2 RUN BP TEST [ TEST @ 0x96 ]

Layer type....... Program name.................... Address...
BASIC run machine TEST 0x00000096
Verb
Verb
Command Language
>

When the source and object code are available, the VLIST command can be used to associated the hex object code address with the relevant line of source code.

>VLIST BP TEST
Main Program "BP.O/TEST"
Compiler Version: 11.3.0.0
Object Level : 5
Machine Type : 0
Local Variables : 0
Subroutine args : 0
Unnamed Common : 0
Named Common Seg: 0
Object Size : 162
Source lines : 28
Object Date Time: 27 DEC 2022 10:51:13

00001: CRT "THIS IS LINE 1"
00001 00000 : 046 crtcrlf "THIS IS LINE 1"

00002: CRT "THIS IS LINE 2"
00002 00006 : 046 crtcrlf "THIS IS LINE 2"

00003: CRT "THIS IS LINE 3"
00003 0000C : 046 crtcrlf "THIS IS LINE 3"
.
.
.
.
.
00024: CRT "THIS IS LINE 24"
00024 0008A : 046 crtcrlf "THIS IS LINE 24"

00025: CRT "THIS IS LINE 25"
00025 00090 : 046 crtcrlf "THIS IS LINE 25"

00026: SLEEP 300
00026 00096 : 17E sleep 300

00027: CRT "AFTER SLEEP"
00027 0009A : 046 crtcrlf "AFTER SLEEP"

00028: END
00028 000A0 : 190 stop

Neil

------------------------------
Neil Morris
Universe Advanced Technical Support
Rocket Software
------------------------------
That's some great information!  Thanks!  Now if we could just get the debugger to work correctly! LOL

------------------------------
Harry Hambrick
Manager of UV Development
Rooms To Go Inc
Seffner FL US
------------------------------