not sure about windows...but on our RH linux system (to get
port.status to show all processes, not just yours, except if
your root),
I created the following:
PORT.STATUS
0001: EXECUTE "sh -c 'sudo /usr/mbin/portstatus'"
0002: STOP
0003: END
Then globablly cataloged it as *PORT.STATUS
My script /usr/mbin/portstatus is:
cd /usr/uv ; /usr/uv/bin/uv PORT2
And in UV
PORT2
0001: PA
0002: PORT.STATUS
So PORT.STATUS will show only your processes,
and *PORT.STATUS will show all processes since per the /etc/sudoers
file entry, it will run as root regardless of the login name
/etc/sudoers entries will control who can run the sudo command, you
can set it so certain logins don't need a password, others will require
a password (sudo is nice in this regard).
(usernames have been replaced with x's below)
xxxxxxx ALL=(root) NOPASSWD:/usr/mbin/portstatus
xxxxxx ALL=(root) NOPASSWD:/usr/mbin/portstatus
-----------------------------------------------------------------
part2 - how to tell if a phantom is running!
------------------------------------------------------------------
First I have this script:
[EMAIL PROTECTED] mbin]$ cat show-phantoms
ps -eo command | grep phantom | awk '{print $2,$3,$4,$5,$6,
$7,$8}' | grep -v "phantom" | sort
And the basic program:
0001: EXECUTE 'sh -c "/usr/mbin/show-phantoms"' CAPTURING JUNK
0002: [EMAIL PROTECTED]
0003: IF INDEX(CMDLINE,"-ON",1)#0 THEN DISPON=1 ELSE DISPON=0
0004: IF INDEX(CMDLINE,"-OFF",1)#0 THEN DISPOFF=1 ELSE DISPOFF=0
0005: IF INDEX(CMDLINE,"-STATUS",1)#0 THEN STATUS=1 ELSE STATUS=0
0006: MAX=DCOUNT(JUNK,CHAR(254))
0007: FOR T=MAX TO 1 STEP -1
0008: IF JUNK<T>="" THEN DEL JUNK<T>
0009: NEXT T
0010: PROCESS="phantom name when started" ; GOSUB 1000
0011: PROCESS="another phantom name to check" ; GOSUB 1000
..
..
..
0026: STOP
0027: 1000:
0028: IF INDEX(JUNK,PROCESS,1)#0 AND (DISPON=1 OR STATUS=1) THEN PRINT
PROCE
SS:" ON"
0029: IF INDEX(JUNK,PROCESS,1)=0 AND (DISPOFF=1 OR STATUS=1) THEN PRINT
PROC
ESS:" OFF"
0030: RETURN
0031: END
My programs runs as CHECKPHANTOMS [-ON|-OFF|-STATUS]
-ON will show if it's running and supposed to be running
-OFF will show if it's not running and supposed to be running
-STATUS will show it's status
George
>-----Original Message-----
>From: Dennis Bartlett [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, May 05, 2004 2:25 AM
>To: [EMAIL PROTECTED]
>Subject: RE: [U2] PHANTOM forever
>
>
>Speaking of this, we're currently on W2K, soon to move to
>Linux (was
>going to be RH9, but since that hit end-of-line, we return
>to
>investigation mode).
>
>The question on W2K is "how does one monitor/even see the
>existence of
>phantoms"?
> - A LISTU produces an opening statement 'there are 127
>users, 126
>interactive, 1 phantom' but no detail
> - The &PH& file is great for post mortems
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of
>Chuck Mongiovi
>Sent: 04 May 2004 11:01
>To: [EMAIL PROTECTED]
>Subject: RE: [U2] PHANTOM forever
>
>
>> What is you "babysitter" program?
>-------
>u2-users mailing list
>[EMAIL PROTECTED]
>http://www.u2ug.org/listinfo/u2-users
-------
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users