Robert Cemper · Mar 4, 2024 go to post

My Review - before being approved by OEX admins

  • This is a really excellent example on
  • How to publish in OEX
    • a clear to understand description of the target
    • a clean-to-install IPM package
    • a Docker setup easy to follow without any dirty tricks undercover
    • a fast and effective build and install that was tested in practice
    • so you can keep your working environment free of polluting code fragments
    • and a detailed understandable description of how to handle it
  • Big THANKS to @Kurro Lopez 
Robert Cemper · Mar 1, 2024 go to post
  • Namespace %SYS
  • class SYS.Process is your friend
  • SELECT * FROM SYS.PROCESS
  • in your case :  
    select CurrentDevice from SYS.Process group by CurrentDevice
    CurrentDevice
     
    //./NUL
    |TCP|1972
    |TCP|1972|7868
    |TCP|1972|7104
    |TCP|1972|19332
    |TCP|1972|9316
    |TCP|1972|12932
    |TCP|1972|17224
    |TCP|1972|8096

    10 row(s) affected

  • .
  • for more details
    select Pid,CurrentDevice,ClientNodeName,ClientIPAddress  from SYS.Process 

     

USER>w $ZV
Cache for Windows (x86-64) 2018.1.7

Robert Cemper · Feb 27, 2024 go to post

Once upon a time ...

  • there was an operating system named VMS
  • running on computers named VAX and ALPHA
  • The syntax to access a file was  drive:[directory] 
  • it's the same structure used by RSX-11/M, RSX-11/D, RSX-11/S on PDP-11 processors

So on drive DUA1  you refer to director TEST3 

Robert Cemper · Feb 22, 2024 go to post

Therefore it's good practice to start with

Kill ^SPOOL($J) Open 2:$J Use 2 .....
as we did in 1978

Robert Cemper · Feb 15, 2024 go to post

same using USE 0:(:"/ECHO=0"")   and  USE 0:(:"/ECHO=1"") 
or
Use 0:(":"S") and Use 0:(:"N")   for "silent" and "normal"
more docs

Robert Cemper · Feb 12, 2024 go to post

my private hack for this situation:

ClassMethod MyMethodPost() As %Status
{
    $$$LOGINFO("JobId: "_$JOB)
    kill ^%kurro
    set ^%kurro(0)=$JOB
    for  {hang 20 break    quit:$get(^%kurro) }
#; just hang around until ^%kurro =1
    ..... 
    Quit $$$OK
}
Robert Cemper · Feb 9, 2024 go to post

underscore is not allowed in names and variables
underscore is the string concatenation operator

Robert Cemper · Feb 7, 2024 go to post

for easy reading, not a oneliner yet.
 

new $namespace,host,ipaddr,p
znspace "%SYS"
set host=$system.INetInfo.LocalHostName()
set ipaddr=$system.INetInfo.HostNameToAddr(host)
do ##class(Config.Startup).Get(.p)
set url="http://"_ipaddr_":"_p("WebServerPort")_"/csp/sys/UtilHome.csp"
kill p,host,ipaddr 
quit
zw url
Robert Cemper · Feb 5, 2024 go to post

You can map PACKAGE [aka. SQL Schema] to another Namespasce (not a single table)
e.g. Bna.Utils to namespace %ALL or just to a specific namespace
so you have Table and Class  (= the code) available.

If you want to share also DATA  you need to map also  the related Global 

Robert Cemper · Feb 3, 2024 go to post

I met some issues in the past, where I miss any idea of how to check

  • verification of %variables or variables in global scope
  • variables set as 3rd parameter in $QUERY() or $ORDER() -  should be easier to detect.
  • not sure if variables passed ByRef or Output are fixed meanwhile  
Robert Cemper · Feb 3, 2024 go to post

In Windows it's netstat running from CMD as Admin
My preferred option:  netstat -anop TCP  (shortened)

C:\WINDOWS\system32>netstat -anop TCP 
  Aktive Connection
  Proto  Lokal Address          Remote Address         Status         PID
  TCP    0.0.0.0:21             0.0.0.0:0              LISTEN         4924
  TCP    0.0.0.0:80             0.0.0.0:0              LISTEN         4
  TCP    0.0.0.0:135            0.0.0.0:0              LISTEN         1384
  TCP    0.0.0.0:445            0.0.0.0:0              LISTEN         4
  TCP    0.0.0.0:623            0.0.0.0:0              LISTEN         10684
  TCP    0.0.0.0:1972           0.0.0.0:0              LISTEN         8004
  TCP    0.0.0.0:2179           0.0.0.0:0              LISTEN         2348
  TCP    0.0.0.0:16992          0.0.0.0:0              LISTEN         10684
  TCP    0.0.0.0:41773          0.0.0.0:0              LISTEN         11408
  TCP    0.0.0.0:42773          0.0.0.0:0              LISTEN         11408
  TCP    0.0.0.0:49664          0.0.0.0:0              LISTEN         848
  TCP    0.0.0.0:49665          0.0.0.0:0              LISTEN         652
  TCP    0.0.0.0:52493          0.0.0.0:0              LISTEN         11408
  TCP    0.0.0.0:52773          0.0.0.0:0              LISTEN         9476
  TCP    0.0.0.0:58091          0.0.0.0:0              LISTEN         5156
  TCP    0.0.0.0:58816          0.0.0.0:0              LISTEN         964
  TCP    127.0.0.1:2375         0.0.0.0:0              LISTEN         11408
  TCP    127.0.0.1:5354         0.0.0.0:0              LISTEN         4852
  TCP    127.0.0.1:5905         127.0.0.1:58786        ESTABLISHED    5156
  TCP    127.0.0.1:5905         127.0.0.1:58787        ESTABLISHED    5156
  TCP    127.0.0.1:5905         127.0.0.1:58788        ESTABLISHED    5156

In Ubuntu (container) I tried  netstat -at4p for a similar result while connected to SMP 

:~/dev$ netstat -at4p
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.11:37033        0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:52773           0.0.0.0:*               LISTEN      476/httpd
tcp        0      0 0.0.0.0:1972            0.0.0.0:*               LISTEN      453/irisdb
tcp        0      0 localhost:1972          localhost:44998         ESTABLISHED 1745/irisdb
tcp        0      0 localhost:44998         localhost:1972          ESTABLISHED 479/httpd
tcp        0      0 localhost:1972          localhost:45014         ESTABLISHED 1746/irisdb
tcp        0      0 localhost:1972          localhost:44992         ESTABLISHED 1744/irisdb
tcp        0      0 localhost:44984         localhost:1972          ESTABLISHED 479/httpd
tcp        0      0 localhost:1972          localhost:44954         ESTABLISHED 1741/irisdb
tcp        0      0 localhost:44992         localhost:1972          ESTABLISHED 479/httpd
tcp        0      0 localhost:44968         localhost:1972          ESTABLISHED 479/httpd
tcp        0      0 localhost:45014         localhost:1972          ESTABLISHED 479/httpd
tcp        0      0 localhost:44954         localhost:1972          ESTABLISHED 479/httpd
tcp        0      0 localhost:1972          localhost:44984         ESTABLISHED 1743/irisdb
tcp        0      0 localhost:1972          localhost:44968         ESTABLISHED 1742/irisdb
:~/dev$

might look similar in other *UX

Robert Cemper · Jan 24, 2024 go to post

$storage refers to the partition which holds only pointers into global buffers.
while the content of the global goes only to global buffers and
consumes no permanent space in your partition. 

Robert Cemper · Jan 23, 2024 go to post
  1. find the expected format in test
  2. where do get the date from ?
    if it's from IRIS functions $ZDATE() or $ZDATEH() convert it in the required format
Robert Cemper · Jan 23, 2024 go to post

"TO_DATE('12/15/2023','MM/DD/YYYY')"  is an SQL function call not a value
could you try straight ODBC format "2023-12-15"  ?

Converting and using $H date format might be a different option

Robert Cemper · Jan 23, 2024 go to post

eventually terminal in *UX may end just with $c(10)
could you try to append some blank + semicolon ?

:alias enablebi do EnableDeepSee^%SYS.cspServer("/csp/"_$zcvt($namespace,"L")) ;

You seem to lose the last character

Robert Cemper · Jan 23, 2024 go to post

I agree with @Brett Saviano:
$$$  ...refers to some #define ...  and is a compiler directive

I tried:

USER>:alias wi write "/csp/"_$zcvt($namespace,"L")
 
USER>:wi
write "/csp/"_$zcvt($namespace,"L")
/csp/user
USER>:alias wi1 write "/csp/"_$$$LOWER($namespace)
 
USER>:wi1
write "/csp/"_$$$LOWER($namespace)
 
WRITE "/csp/"_$$$LOWER($namespace)
^
<SYNTAX>
USER>
Robert Cemper · Jan 22, 2024 go to post
  • my personal preference goes to %GSIZE.
    The best match between CONSUMED and ALLOCATED size is found
    if your Global is "filled" total sequentially by a $Q() loop.
    And even then with a big string, you may force unexpected block splits.
    The situation changes if you fill your globals by subscript levels.
    This may cause a cascade of block splits and result  in rater unattractive packing percentages
     
  • ALLOCATED Size by Subscript might be of interest for an individual Subscript.
    Though adding them up doesn't reflect the total size
    It's like cutting a cake to 12 people and then counting the heads that had some cake.
     
  • to reduce the space consumption of your globals I rather suggest to  use
    ##Class(%GlobalEdit).GloabelCompact()  to eliminate the effects of random inserts
    and growth inside a global tree.