Dean:
I ran some tests on PAUSE and it never seemed granular enough to
properly work when the time it wakes up important. In other words, I'd
pause for 30 and it would pause for sometimes 26 seconds, sometimes 28
seconds, sometimes 23 seconds, sometimes 25 seconds, but never over 30
seconds. SLEEP, however, always seemed to be on time.
PAUSE was also cool in that I could find out which lines were paused
with the LIST.PAUSE command. I could also WAKE the process from another
line.
Our UD service program wakes up every minute on the minute. I figure
out how many seconds until the next minute then, per Wally's suggestion,
I loop for that many seconds then SLEEP 1. This has been hitting the
wake-up on the minute over quite a few machines for the past week or
two. It appears PAUSE wouldn't come close to waking up at the right time.
Anyway, directing my attention to a previously unused BASIC statement is
always fun. Thanks,
Bill
------------------------------------------------------------------------
[email protected] said the following on 4/7/2010 7:59 AM:
As an alternative to SLEEP, use PAUSE. A process in PAUSE will return
the call stack via PORT.STATUS.
SLEEP, CALLC, PCPERFORM, and waiting on a record lock are some of most
common conditions which will not return a call stack via PORT.STATUS.
Dean Armbruster
System Analyst
757-989-2839
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Wally Terhune
Sent: Friday, April 02, 2010 2:05 PM
To: U2 Users List
Subject: Re: [U2] UD: Phantoms
Not sure.
We do use signaling to 'interrupt' the running process and get it to
tell the PORT.STATUS session what it is up to.
IIRC, we use SIGUSR2, specifically.
So - there could be some system calls that the udt process is in that
cannot be interrupted.
For instance, I tested a phantom that was running 'SLEEP 120' - and
experienced the same result as Bill (no call stack printed).
I changed this to a loop FOR 120 that was printing a line, then SLEEP 1
Here is the result:
:LISTUSER
Licensed(UDT+CP)/Effective Udt Sql iPhtm Pooled Total
( 32 + 32 ) / 64 2 0 0 0 2
UDTNO USRNBR UID USRNAME USRTYPE TTY IP-ADDRESS TIME DATE
1 5372 305730 WTerhune udt pts/1 Console 11:53:11 Apr 02 2010
2 6020 305730 WTerhune phantom pts/2 Console 11:58:05 Apr 02 2010
3 2384 305730 WTerhune udt pts/3 Console 11:55:11 Apr 02 2010
:PORT.STATUS PID 6020 CALL.STACK
Licensed(UDT+CP)/Effective Udt Sql iPhtm Pooled Total
(32 + 32) / 64 2 0 0 0 2
Udtno Pid User UserType Port Last command processed
2 6020 WTerhune phantom 8443624
level line BASIC callstack
1 4 BP\_WWW
Session no command stack.
:
Wally Terhune
U2 Support Architect
Rocket Software
4700 S. Syracuse Street, Suite 400 **Denver, CO 80237 **USA
Tel: +1.720.475.8055
Email: [email protected]
Web: www.rocketsoftware.com/u2
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Bill Haskett
Sent: Friday, April 02, 2010 10:22 AM
To: U2 Users List
Subject: Re: [U2] UD: Phantoms
Wally:
Thanks. Using LISTUSER() I can figure out what processes are phantoms
but not what they're running. Thus, I have no way to figure out of my
BACKGROUND.SERVICE program is running (it sleeps and wakes up every
minute). When I do a PORT.STATUS PID {pid# of phantom} CALL.STACK
nothing is returned (and it takes about 15 seconds on a fast,
development system).
2 Dev (0)-> LU
Licensed(UDT+CP)/Effective Udt Sql iPhtm Pooled Total
( 24 + 1 ) / 25 3 0 0 0 3
UDTNO USRNBR UID USRNAME USRTYPE TTY IP-ADDRESS TIME DATE
1 2192 197614 AsiAdmin phantom pts/1 Console 05:51:51 Apr 02 2010
2 3248 197615 wphaskett udt pts/2 192.168.1.51 05:54:32 Apr 02 2010
2 Dev (0)-> PORT.STATUS PID 2192 CALL.STACK
Licensed(UDT+CP)/Effective Udt Sql iPhtm Pooled Total
(24 + 1) / 25 3 0 0 0 3
Udtno Pid User UserType Port Last command processed
1 2192 AsiAdmin phantom 28101260
2 Dev (0)->
Am I missing something?
Thanks again.
Bill
------------------------------------------------------------------------
Wally Terhune said the following on 4/2/2010 8:40 AM:
Question wasn't clear to me.
If looking at active processes, listuser shows which are phantoms
(USRTYPE column) Also - UniBasic LISTUSER() function returns this as
dynamic array for easy parsing
:listuser
Licensed(UDT+CP)/Effective Udt Sql iPhtm Pooled Total
( 32 + 32 ) / 64 1 0 0 0 1
UDTNO USRNBR UID USRNAME USRTYPE TTY IP-ADDRESS TIME DATE
1 5936 305730 WTerhune udt pts/1 Console 09:34:36 Apr 02 2010
2 4300 305730 WTerhune phantom pts/2 Console 09:34:58 Apr 02 2010
Wally Terhune
U2 Support Architect
Rocket Software
4700 S. Syracuse Street, Suite 400 **Denver, CO 80237 **USA
Tel: +1.720.475.8055
Email: [email protected]
Web: www.rocketsoftware.com/u2
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin
Phillips
Sent: Friday, April 02, 2010 9:35 AM
To: U2 Users List
Subject: Re: [U2] UD: Phantoms
Hi Bill,
"In UniData, does anyone know of a sure way to determine if a BASIC
program is running as a phantom?"
Take a look at the @USER.TYPE variable. This contains 1 for a phantom.
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users