Fabian Haupt · May 16, 2017 go to post

Do you have any benchmark data comparing this to the populate utils?

Cheers, Fab

Fabian Haupt · May 12, 2017 go to post

Hi,

it depends a little bit what exactly the bottleneck is. If it's the processing, you could possibly split the reading from the processing by inserting a scheduling mechanism and just have the read process queue up things and several worker threads for the processing.

If the bottleneck is the reading, there is not much you can do. Reading from the same file in multiple locations is going to make it slower overall.

Best, Fab

Fabian Haupt · May 9, 2017 go to post

Hi Murali,

from looking at both of their websites, it seems they are just web scanners? If so, you don't need to do anything different to run it against your InterSytems powered web pages. You can use them the same as with any other webpage you're scanning.

Cheers, Fab

Fabian Haupt · May 8, 2017 go to post

Murali, you should check the URL being created (i.e.

Request.Location_Path

and see if that actually exists and you have access to it.

Also keep in mind this code is fairly old, so you might need to adjust it a bit to run with the current json utilities.

Fabian Haupt · May 4, 2017 go to post

Hi!

A couple of things to note/check on your end:

  • %SYS_Monitor service is enabled (and is not restricting access for your IP)

  • Make sure the iscsnmp.dll is registered. You can run d $ZU(190,5,0) to delete the registry entries and d $ZU(190,5,1) to add them again.

  • Restart SNMP in Cache: zn "%SYS" d stop^SNMP d start^SNMP

  • Make sure there is a SNMP job running in your instance (System -> Processes, filter for SNMP)

  • Make sure the windows firewall allows connections, in doubt you could disable the windows firewall service temporarily

For debugging you can set:

  s  ^SYS("MONITOR","SNMP","DEBUG")=1

Which will create a SNMP.log file in your mgr directory.

As well as in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Intersystems\Cache\SNMP\CurrentVersion

(for 64bit)

"Debug" = "true" (String value)

Which will create a file snmpdbg.log in c:\windows\syswow64\snmpdbg.log

Then you can try and get a value directly like this:

snmpwalk -r:"localhost" -os:.1.3.6.1.4.1.16563.1.1.1.1.3 -op:.1.3.6.1.4.1.16563.1.1.1.1.4

(or you can use a tool like the iReasoning MIBBrowser..., import the MIB from /SNMP)

Hope this helps.

Best, Fabian

Fabian Haupt · May 2, 2017 go to post

I have absolutely seen similar issues with search all over the place. Generally, it is basically impossible to find a post using the search.

Fabian Haupt · Apr 17, 2017 go to post

Hi,

your suggestions #2 and #3 would work against the weak typed character of the language. I.e. a method like this:

ClassMethod test() as %String { q 23}

Will work perfectly fine, no matter if you use the return value a string or integer. You can actually also return values from methods that don't define a return type at all. As you already point out, changing any of this behaviour would likely break quite a lot of existing software, so it's not really feasible.

Fabian Haupt · Apr 12, 2017 go to post

Thanks for the overview! I definitely think TDD (i.e. #9) should be the fist one :) Another good thing to do is rubber-ducking. Not just to find bugs once they come up, but talking your code through is a good way to catch bugs before they get committed to version control.

Cheers!

Fabian Haupt · Apr 4, 2017 go to post

Hi Peter,

a couple of things:

  • You're trying to write out the numbers twice. Everything that is >60 is also >30.
  • The css style for background is background-color. See CSS reference

This works for me:

Method SetAlertColor(pTable As %ZEN.Component.tablePane, pName As %String, pSeed As %String) As %Status
{
	s val=%query(pName),col=""
 	if (val>60)
  	{
	  	s col="#FF0000"
  	} elseif val>30{
  		s col="#FF6600"
  	} else {
  		s col="#AAAAAA"
  	}	
    &html<
#(val)#
> q $$$OK }
Fabian Haupt · Mar 30, 2017 go to post

With your xdata block, this works:

ClassMethod GetFile() as %Status {
	set xdata = ##class(%Dictionary.CompiledXData).%OpenId($ClassName()_"||File7")
	s %response.Status=200
	s %response.ContentType="application/octet-stream"
    write $System.Encryption.Base64Decode(xdata.Data.Read(xdata.Data.Size))
	q $$$OK
}
Fabian Haupt · Mar 30, 2017 go to post

This works for me for a file from the FS:

ClassMethod GetFile() as %Status {
	s file=##class(%Stream.FileBinary).%New()
	s file.Filename="/tmp/Psi-0.15.dmg"
	s %response.Status=200
	s %response.ContentType="application/octet-stream"
	while ('file.AtEnd) {
		w file.Read(10000)
	}
	q $$$OK
}
Fabian Haupt · Mar 28, 2017 go to post

No. We should try and shut down the google groups, or at least make them read-only.

BTW, I don't see this post having carried over.

Fabian Haupt · Mar 28, 2017 go to post

given the low number of 3rd party modules, I don't think this is something that is being thought about as a general problem. That being said, a new namespace seems cleaner, but does have limits due to license limits.

Fabian Haupt · Mar 25, 2017 go to post

But for that he needs to add an extending class to his classes. Using the native functions directly is less overhead.

Fabian Haupt · Mar 25, 2017 go to post

%ToJSON() is only defined on objects extending %DynamicAbstractObject. For example:

SAMPLES>s obj={"test":"42"}
SAMPLES>d obj.%ToJSON()
{"test":"42"}
SAMPLES>

To serialize arbitrary %Persistent/%Registered objects you'll have to use altJSONProvider for example:

SAMPLES>s p=##class(Sample.Person).%OpenId(1)
SAMPLES>d ##class("%ZEN.Auxiliary.altJSONProvider").%WriteJSONFromObject(,.p)
{"_class":"Sample.Person","_id":1,"Name":"Love,Wolfgang A.","SSN":"917-96-1802","DOB":45275,"Home":{"_class":"Sample.Address","Street":"8360 First Street","City":"Zanesville","State":"WV","Zip":25788},"Office":{"_class":"Sample.Address","Street":"1842 Maple Court","City":"Hialeah","State":"NH","Zip":65893},"Spouse":"","FavoriteColors":[],"Age":"52"}
Fabian Haupt · Mar 23, 2017 go to post

wouldn't it be easier to store your data in a more generic form to avoid having to do that?

Fabian Haupt · Mar 22, 2017 go to post

You now have answers to 3 interpretations of your question, please clarify which one you meant ;) Cheers!