Couple GT.M Questions

This is a discussion on Couple GT.M Questions within the mumps forums in Programming Languages category; To you GT.M gurus: 1) Since GT.M V5.1 does not appear to support SSVN's, is there a way of to simply determine the existence of a process on the current machine given the process (job) id? That is, the equivalent to the ^$Job check below. If $Data(^$Job(job))... where job is the process id. 2) Is there a way to access the current machines network node name from GT.M. The equivalent of $ZUTIL(110) in Cache? Any help is appreciated... Terry...

Go Back   Application Development Forum > Programming Languages > mumps

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 11-22-2006, 11:23 AM
Terry L. Wiechmann
Guest
 
Default Couple GT.M Questions

To you GT.M gurus:

1) Since GT.M V5.1 does not appear to support SSVN's, is there a way of
to simply determine the existence of a process on the current machine
given the process (job) id? That is, the equivalent to the ^$Job check
below.

If $Data(^$Job(job))... where job is the process id.

2) Is there a way to access the current machines network node name from
GT.M. The equivalent of $ZUTIL(110) in Cache?

Any help is appreciated...

Terry
Reply With Quote
  #2  
Old 11-27-2006, 10:23 AM
K.S. Bhaskar
Guest
 
Default Re: Couple GT.M Questions

Terry --

The easiest way is to use the ZSYstem command for both, e.g.,

GTM>zsystem "ps -eF | grep mumps | grep -v grep | grep 11876"
kbhaskar 11876 9838 0 894 1368 0 11:07 pts/1 00:00:00 mumps
-dir

You can also put the output into a temporary file, e.g.,

GTM>zsystem "ps -eF | grep mumps | grep -v grep | grep 11876
>/tmp/mumps_"_$J_".tmp"


Then you can read the file and delete it. The UNIX/Linux hostname
command gives the name of the current host.

The pgrep command may be easier to use than "ps -eF | grep mumps | grep
-v grep | grep <pid>", but I am not sure it exists on all UNIXes.

If you are using this in a performance critical inner loop, you should
set up an external call to a system library function, e.g.,
gethostname() using the GT.M external call mechanism.

Regards
-- Bhaskar
ks dot bhaskar at fnf dot com <-- send e-mail here

On Nov 22, 11:23 am, "Terry L. Wiechmann"
<tlwiechm...@esitechnology.com> wrote:
> To you GT.M gurus:
>
> 1) Since GT.M V5.1 does not appear to support SSVN's, is there a way of
> to simply determine the existence of a process on the current machine
> given the process (job) id? That is, the equivalent to the ^$Job check
> below.
>
> If $Data(^$Job(job))... where job is the process id.
>
> 2) Is there a way to access the current machines network node name from
> GT.M. The equivalent of $ZUTIL(110) in Cache?
>
> Any help is appreciated...
>
> Terry


Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 03:32 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.