Alexey Maslov · May 8, 2018 go to post

Thank you, Dima.
Could I reproduce, I'd call WRC.

Ther were some errors stipulated by the fact that the class was not compiled. Posting them in another comment.

Alexey Maslov · May 8, 2018 go to post

Thank you for taking part, Robert.

BTW. oops is really new style

Not so new:  I met them ~ 5 years ago during bulk classes recompilation task that was scheduled in our development environment. It was one of many temporary tasks, so I don't remember the details.

Alexey Maslov · May 8, 2018 go to post

Thank you, Pete, 
I will pass your answer to the class developer who hesitated to write here by himself.

Alexey Maslov · May 7, 2018 go to post

Hi Joan,

It seems that the right way to perform this task would be using MemberStatusList query of the class SYS.Mirror. See Documatic for details.

HTH.

Alexey Maslov · Mar 16, 2018 go to post

Kevin,

it seems that the main point here is to stop Studio before deleting the content; not necessary to stop Caché.

BTW, there should be several subfolders inside, one for each server/namespace connection you've ever established.

Alexey Maslov · Mar 13, 2018 go to post

It seems that you are to write a couple of lines anyway, because nobody will do it but yourself. As you certainly know, it's possible to do it using shell scripting without going inside Caché, e.g.: 

#!/bin/sh
csession cacheuc1 << EOF
write ##class(%SYSTEM.Version).GetVersion(),!
halt
EOF
Alexey Maslov · Mar 6, 2018 go to post

Ben,

Thanks for prompt response.

I didn't see any guarantees that a previous non-Ubuntu installs would be upgradable (in fact I would be surprised if they were)

In contrast, I was surprised that one supported platform (2015.1/SUSE on Ubuntu) is not clearly upgradable to another supported one (2017.2/Ubuntu). Direct upgrade from 2015.1 to 2017.2 was promised somewhere in Caché Installation Guide.

I suggest you contact the WRC for final confirmation

Thank you again, while I don't feel that this is a real problem worth disturbing WRC, meanwhile it seems that my solution is feasible.

Moving all the stuff from old 2015.1 to fresh 2017.2 instance was not a problem in my case, but it could cause some caveats, e.g. one should not forget to move all security settings, task manager tasks, etc. Anyway, there is (potentially) much more work to do than to change a couple of lines in parameters.isc file.

Any cons?

Alexey Maslov · Mar 6, 2018 go to post

A bypass that was quickly found:

- Being a root, save a copy of <installation dir>/paramaters.isc file

- Change two lines of the original file from 

platform_selection.platform: lnxsusex64
platform_selection.platform_family: lnxsusex64

to

platform_selection.platform: lnxubuntux64
platform_selection.platform_family: lnxubuntux64

After that the upgrade installation proceeds without any problem, a few system and application functions which I've managed to try are OK as well.

I've published my question here because:

- I was not quite sure if my soultion was right.

- If it was right, could installation script be smart enough to recognize SUSE version installed on Ubuntu?

Alexey Maslov · Feb 28, 2018 go to post

Taking in account that real commercial systems should never delete anything, the lightweight solution can't be recommended for use in such kind of systems. I'm just curious: when it can be helpful?

Alexey Maslov · Feb 28, 2018 go to post

Hi Robert,

But real commercial systems never delete anything. Just set a flag "isDeleted"

Let us discuss a case when an employee has left a company and joined a new one.
Where would you place this flag in The lightweight solution?

Alexey Maslov · Feb 1, 2018 go to post

...Example1 is faster by less line terminations

AFAIK, line terminators are no longer stored in OBJ code since version 2010.1, so splitting a long code line into smaller ones can't affect performance at all.

Alexey Maslov · Dec 29, 2017 go to post

David, thank you for sharing your experience. 

Both tools take significant resources and should rarely be used on a live system

According to my rough estimate, PERFMON provides about of 20% performance penalty when collecting the default metrics. But sometimes we need to evaluate the live system's busiest processes activity in details, e.g. get process stack, process variables, current state, GREF/s, etc.

%SYS.ProcessQuery class methods are evident way to go, while there are some documented notices about possible performance impact.

The question is: which per process metrics can be collected on a live system without significant performance penalty and what is the right way to collect them?

Alexey Maslov · Dec 21, 2017 go to post

I mentioned DAQ just because it was mentioned earlier and it was really buggy till 2017.x. I was apparently wrong as you seem to have all mnemonics embedded.

As to JOBEXAM.INT, isn't it better to ask somebody inside ISC? IMHO, too many "innocent" utilities are shipped w/o sources.

Alexey Maslov · Dec 20, 2017 go to post

Hi, Nikita,
I'm a new WebTerminal user, just installed v.4.7.3.

JOBEXAM has problems with it, and it seems that it's %X364 support again. Here is an excerpt from my session: 

CWTv4.7.3 ...

...

USER > zn "%SYS"

%SYS > d ^JOBEXAM

<NOLINE>^%X364

╠%X364 ; BINDING FOR ANSI X3.64 NAMESPACE, NOV/92 ; LRS952 06/07/05

%SYS > w $zv

Cache for Windows (x86-64) 2017.2 (Build 744U) Fri Sep 29 2017 10:58:27 EDT

I've checked %X364 source, it has got correct DAQ() code with this Caché version.

Waiting for your help and advice.

Alexey Maslov · Dec 7, 2017 go to post

This option: 

$ZD($h,12,,,,,,,,localeopt)

seems to be more safe as switching the default representation for $ZD($h,12) may ruin already existing functionality that is expecting English days' names.

To be honest, I'd prefer application level localization, just because not all possible languages are supported by Caché.

Alexey Maslov · Dec 6, 2017 go to post

Just 2c to add. If a "national" locale is effective, e.g.

%SYS>zw ^%SYS("LOCALE","CURRENT")
^%SYS("LOCALE","CURRENT")="yruw"

and the setting was done before Caché restart:

%SYS>set ^SYS("NLS","Config","LocaleFormat")=1

you will get your national day name if don't forget to set localeopt=0, e.g.

USER>f localeopt=0,1 w localeopt," ",$ZD($h,12,,,,,,,,localeopt),!
0 Среда
1 Wednesday

It's also possible to achieve the same overriding format defaults for the current process (see $ZDATE description for details). I emphasized the need in Caché restart just because didn't find it in docs.

Alexey Maslov · Nov 30, 2017 go to post

Yes, I did.
It did not seem working, STOP / START of the System Monitor didn't help.
I lost my interest to Callback functionality because of its absence in newer Caché version, so I would not investigate it anymore.

Alexey Maslov · Nov 30, 2017 go to post

My first guess was that it concerned Application Monitor alerts only, while I was mostly interested in Health monitor sensors reading.

Alexey Maslov · Nov 29, 2017 go to post

Thank you, Eduard.

Is it possible to do something with an "old" Cache 2015.1?

I have no objection to upgrade, but according to our previous experience the movement of customers' sites will not be quick. So I'd like to find a solution which will be useable from 2015.1 to 2018.2.

Alexey Maslov · Nov 24, 2017 go to post

Hi John and Roman,

Although the answer is accepted, it seems that JOBEXAM can only help recognize that DBREST is still running, so the initial question about the completion time expectations would hardly be answered this way.

Roman, only your previous experience can help answering your question. BTW, "weakness" of your host as you described it can't be a reason of slow DB restoration as DBREST is single-threaded utility and mostly i/o bound one. The reasons for slowing DBREST down are usually: slow disk subsystem and/or slow LAN connection to network resource where .cbk files are stored.

Entry level SAS RAID and 1000BaseT LAN usually provide 40-50MB/s speed on DB restoration.

Alexey Maslov · Nov 23, 2017 go to post

The result set of Config.MapGlobals:List query can be restricted to the global of interest (pGlb) records if change the Names search criteria in Execute call to:

    set sc = rset.Execute(pNsp,pGlb_","_pGlb_"(*")

Snippet's code was amended.

Alexey Maslov · Nov 13, 2017 go to post

...and spread over documentation

...Or undocumented, as it is in cases #3 and #4. 

It seems that it's possible to form a simple rule whether you can use a private variable: if you can consider its name to be evaluated at compile time, you can, otherwise - no:

1) Indirection: variable names (or expression that contains them) are evaluated at runtime.

2) Xecute: similar to #1. In contrast, $xecute() arguments names can be evaluated at compile time.

3) Child process's symbol table filled with switch#2=1: runtime.  In contrast, job's entry arguments names can be evaluated at compile time.

4) %SYS.ProcessQuery is dynamically querying other process's symbol table, so, run time only.

Alexey Maslov · Nov 13, 2017 go to post

Hi Robert,

There are at least two additional exceptions:

3. JOB command with passing the symbol table to the spawned job

See http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…

When switch#2=1, only public variables of parent process are passed to its child.

4.  Class %SYS.ProcessQuery, query VariableByPid() (or $zutil(88,2,Pid,Variable) for old schoolers)

Only public variables of another process can be queried.

Alexey Maslov · Nov 7, 2017 go to post
$ ccontrol qlist

CACHE1^/opt/cache1^2015.1.4.803.0.16768^running, since Fri Sep 15 18:44:33 2017^cache.cpf^1972^57772^62972^ok^
CACHE2^/opt/cache2^2015.1.4.803.0.16768^running, since Mon Jul 24 08:43:47 2017^cache.cpf^56773^57773^62973^ok^
CACHE3^/opt/cache3^2015.1.4.803.0.16768^down, last used Thu Jul 27 18:02:03 2017^cache.cpf^56774^57774^62974^^

Windows analogue exists as well.

Alexey Maslov · Nov 7, 2017 go to post

It depends.

If you don't care about uniqueness of this hash, you can use any algorithm (the quicker the better, MD5Hash or even CRC32) and store your index like normal non-unique one. On calculated hash match to already stored (indexed) hash value you just compare the correspondent strings to separate real matches from the collisions. Maybe it's worth to use whole string as an index for reasonably short strings.

Alexey Maslov · Nov 6, 2017 go to post

You can calculate a hash for each string and index this hash value. If use pure COS for index building, you can find duplicates earlier, just during index building, without quiering the index afterwards.