Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Dariusz Piatkowski

Pages: 1 ... 3 4 [5] 6 7 ... 89
61
Utilities / Re: touch?
« on: November 27, 2023, 12:27:54 am »
Rick!

...In linux I would just say touch newfile, then I could nano and edit it...touch does exist Ive noticed in Arca but does not act in how I would expect...

Lars' trick is by far the quickest one I think!!! (kudos to you sir 8))

...ok, but having said that, what's the issue you're running into with 'touch'? I just tried it here, no problems...

62
Utilities / Re: touch?
« on: November 26, 2023, 11:35:08 pm »
Hi Rick,

Code: [Select]
[Y:\tmp]copy con: file2
test
^Z
        1 file(s) copied.

...gets you the following:

Quote
[Y:\tmp]dir

The volume label in drive Y is RAMDISK.
The Volume Serial Number is 5777:6CCF.
Directory of Y:\tmp

11-26-23  5:32p             6      0 a---  file2

Is that what you are looking to do?

BTW: I haven't tried any other combos, as in: "copy con: filename" but w/o actual input...

63
Programming / Re: Resources, dialogs, etc - what tools for what jobs?
« on: November 19, 2023, 10:07:22 pm »
Hello Andi!

I always thought URE (or the IBMs version IRE which is included with IBMs compilers) is the only tool which should be used for creating and editing such stuff. At least in the last 2 or 3 decades. Even URE/IRE does sometimes delete necessary properties. But most of the time it preserves all stuff it doesn't know about...

I am extremely glad you floated this. I have used IRE before for a different project, and given that this was a new build it certainly allowed me to start with a clean slate. I did try IRE here for my PUMonitor project but didn't see a way to literally point to a RES file and use that as the starting point.

OK, so back to the "drawing board" I went per your feedback. My IBMCPP environment is v3.65, and while I have the full VACPP 4.0 installed here as well, because it is a wholly encompassing IDE I decided to avoid what seemed like a much bigger undertaking migrating the existing source tree into a new VACPP 4.0 project. Instead I have been using the OS/2 Toolkit & IBMCPP setups and relying on makefile driven builds.

Alright...so the key was: start a NEW IRE project, but once that initial piece is kicked off import in the existing RES file along with various needed Hs. Sure enough, while I haven't gotten it perfect quite yet, it does a pretty nice job of basically decompiling the RES and producing a nice RC script (which is what the other set of manual tools was driving towards that I referenced in my response to Martin's post above).

Therefore, this is absolutely a viable approach and is the one I'm pursuing. My intention is to wrap up the enhanced RAM monitoring and add the disk throughput next, which will require some dynamic check-box placements based on whatever are the existing storage devices that the system reports.

'Thank You' again for this great reminder!

64
Programming / Re: Resources, dialogs, etc - what tools for what jobs?
« on: November 19, 2023, 09:55:48 pm »
Hi Martin,

...I had used very lightly the Prominare URE (Resource Editor). Maybe it can be interesting to take it for a spin and see if it can import .RES files. (Please read the installation instructions, it's kind of tricky)...

I downloaded but stopped the review as Andi's post showed up. More details in my response to his post.

Sir, I appreciate the extra work you did to research and post the link.

For what it's worth (as maybe others might benefit from this), I looked into the whole "perhaps I need to de-compiled my RES file, which comes from that original RC file, into something usable and then figure out a way to visually work with it" effort.

What did come up actually was the reference to the RESMGR utility, which amongst other things does in fact allow you to do such a decompilation. I haven't tried it yet, although I did have it already deployed in my DEV=>Misc Tools folder, just didn't re-discover it in time. Judging by the included DOCs however this seems like a viable route to pursue.

65
Programming / Re: Resources, dialogs, etc - what tools for what jobs?
« on: November 19, 2023, 09:49:24 pm »
Hi Alex,

First of all, 'Thank You' for the great explanation. I understand what you wrote, and in some ways this confirms my suspicions, so perhaps I wasn't that far off after all? :o  (certainly refreshing, and somewhat of a 'confidence builder'...at least until the next "brick wall" encounter...LOL)

...FWIW, the code you quoted is not in a valid RC format that I recognize (which uses BEGIN and END instead of {}), so perhaps it's specific to the Borland toolchain?  Never used Borland so I can't speculate further.

Re: BEGIN/END vs {/}, as it turns out both are supported keywords in RC, at least the version I'm currently using:

Quote
Version 4.00.011 Oct 10 2000
(C) Copyright IBM Corporation 1988-2000
(C) Copyright Microsoft Corp. 1985-2000

This is also documented in the April_2001 'Tools References' INF file, under the 'Resource Compiler => Keywords' section, so at least appears to have an actual confirmation of the intent.

66
Programming / Resources, dialogs, etc - what tools for what jobs?
« on: November 18, 2023, 04:41:34 pm »
PUMonitor enhancement project follow-up...

The original author provided a text RC file that defines all the resources the utility uses. No problem there, the Resource Compiler get that into a RES file, which is then ultimately attached to the EXE itself. My makefile handles that. Keep in mind that he developed this in Borland C++, so I am assuming he used the Borland Resource Workshop.

Alright...so now I need to change the Settings dialogs and as best as I know (which granted is very little on this topic ;)) I was expecting to use the Dialog Editor to actually visually modify/add the right layouts, etc. The Dialog Editor however (which is the Toolkit one) only wants to open a RES file, which while managable (b/c I have that as an output of the Resource Compiler run) will not afterwards reflect the changes in the source RC file. In other words: it looks like I can make changes to the RES itself, but once I do how do I get these into the underlying RC itself?

I understand why the ability to just change the RES is desirable: after all, if I want to adjust just a resource it is awfully nice to do so w/o having to recompile all the sources, etc.

OK, so back to my task, my thinking here is: if my makefile is looking to always compile the RC, clearly when I modify just the RES I will always overwrite those changes with the output of compiled RC, no?

Further on I understand that the Dialog Editor should allow me to create the DLG file, with the option to create the compiled version, that being the RES extension. OK, but trying to do this with my Dialog Editor only allows me to open a RES file, and attempting to save it simply points back to the same RES and optional H files.

Alright...so digging through my OS/2 DEV library I see the mention of Dialog Editor ONLY creating DLG text files when one starts with a NEW dialog...hmm??? So is the expectation really that all further changes are to be done by hand (if I want to reflect the actual changes in the underlying DLG source), or through a direct GUI manipulation of the previously generated RES file (using Dialog Editor)?

That just seems weird...I should be able to visually modify a dialog and upon saving it update the source definition file itself, be it RC or DLG (depending of course on what particular resource I am modifying).

So what am I missing here?

FYI - attempting to open the RC file itself in Borland Resource Workshop produces an error:

"Compiling MENU: ID_MENU"

Code: [Select]
Error
G:\code\source\os2\pumonitor\src\source\pumon2.rc 20:Expecting END

The Help feedback states:

Quote
Resource Workshop encountered an unexpected token when searching for the END keyword. This error is frequently caused by a typo in an identifier name.

Which I think is strange given that this RC file compiles successfully into RES, which itself is attached into the EXE and by all accounts that's working quite fine.

Here is the matching part of the RC itself:

Code: [Select]
...
MENU ID_MENU
{
    MENUITEM "~About"    , ID_MENU_ABOUT, MIS_TEXT
    MENUITEM "~Settings" , ID_MENU_SET  , MIS_TEXT | MIS_SUBMENU
    {
        MENUITEM "~General"       , ID_MENU_SET_0, MIS_TEXT
        MENUITEM "~CPU Meter"     , ID_MENU_SET_1, MIS_TEXT
        MENUITEM "~Memory Meter"  , ID_MENU_SET_2, MIS_TEXT
        MENUITEM "~TCP/IP Traffic", ID_MENU_SET_3, MIS_TEXT
        MENUITEM "M~ail Checker 1", ID_MENU_SET_4, MIS_TEXT
        MENUITEM "M~ail Checker 2", ID_MENU_SET_5, MIS_TEXT
        MENUITEM "M~ail Checker 3", ID_MENU_SET_6, MIS_TEXT
        MENUITEM "M~ail Checker 4", ID_MENU_SET_7, MIS_TEXT
        MENUITEM "M~ail Checker 5", ID_MENU_SET_8, MIS_TEXT
        MENUITEM "C~onnectivity"  , ID_MENU_SET_9, MIS_TEXT
    }
    MENUITEM ""            ,            -1, MIS_SEPARATOR
    MENUITEM "Read ~Mail  ", ID_MENU_MAIL , MIS_TEXT
    MENUITEM ""            ,            -1, MIS_SEPARATOR
    MENUITEM "~Close"      , ID_MENU_CLOSE, MIS_TEXT
}
...

67
Setup & Installation / Re: ArcaOS Sluggishness
« on: November 11, 2023, 10:21:24 pm »
Pete,

...SATA is set as AHCI in the BIOS.
Windows 11 boots in under 20 secs from this SSD so I guess GPT.FLT does not like something about the SSD.

I only had the SATA disk visible to ArcaOS while fannying around getting rEFInd working and it is now "ignored" on the config.sys line
     BASEDEV=OS2AHCI.ADD /A:0 /P:0 /I...

This may not be the situation in your case, however on my machine which also supports AHCI, anytime I try to actually enable it I do end up seeing consistent HALTs to the machine. What I mean by that is that the whole OS/2 box simply freezes, this last typically around 10 secs., following which it comes back ALIVE and all is well, until it re-occurs again.

I did a whole whack of testing to try to figure this out, nothing surfaced and since I honestly didn't see any visible performance difference with AHCI being turned ON (all the drives that are actually being accessed and used are SSD units), I simply left it OFF.

Therefore, I'm curious what happens in your system if you turn AHCI OFF and boot w/o having the IGNORE option set to ON?

68
Programming / Re: shared memory value - Odin win32k or DosQuerySysInfo???
« on: November 08, 2023, 03:43:03 am »
Tom, everyone...

...while I can find some on-line references to Dos16MemAvail, I cannot for the life of me find actual documentation for this. Is that some kind of a macro maybe?

Some background at https://svn.netlabs.org/repos/xworkplace/branches/branch-1-0/001/xwphelp2/xcenter/xc_mem.html , which says:

"Internally, this widget uses the Dos16MemAvail API, an old 16-bit API that is no longer documented by IBM.

The documentation for OS/2 1.3 says that this reports "the size of the largest block of free memory". This is obviously not true any more, since all 32-bit OS/2 versions (since 2.0) no longer allocate memory in blocks, but with 4 KB page granularity instead.

From my experience, this API now does indeed show the amount of free physical memory in the system, that is, the amount of RAM that is currently not used by OS/2, either because it has never been used or swapped out or released again by a process. (From my testing, this API returns the same values as Theseus does for the free physical RAM.) This free RAM can be used by applications immediately without &os2; having to make room by swapping out other memory pages."...

Alright...so I've got the makefile fully rebuilt now to use NMAKE32 (just b/c that's what I wanted to use, and I needed a good lesson in makefile functionality), and so off to the "races" I went modifying the code to show the available shared memory.

However...while that seems to work just fine using DosQuerySysInfo and QSV_MAXSHMEM (the results between PUMon and other utils all match), I cannot for the life of me get a matching result when it comes to what Dos16MemAvail API produces.

Here is an example:

Dos16MemAvail shows me 544.8M

...and in the meantime the Theseus snapshot gives:

Quote
17. QSV_TOTPHYSMEM           = -940527616 (3275820K -> 3199.043M).
18. QSV_TOTRESMEM            = 1241985024 (1212876K -> 1184.449M).
19. QSV_TOTAVAILMEM          = 634712064 (619836K -> 605.309M).
20. QSV_MAXPRMEM             = 142082048 (138752K -> 135.500M).
21. QSV_MAXSHMEM             = 74907648 (73152K -> 71.438M).
27. QSV_MAXHPRMEM            = 1409286144 (1376256K -> 1344.000M).
28. QSV_MAXHSHMEM            = 429481984 (419416K -> 409.586M).

...none of which match the 544.8M that Dos16MemAvail shows.

Now you might say "..oh c'mon man, that's an obsolete API, we have better stuff, like DosQuerySysInfo...", sure, yet strangely enough 'Theseus=>Ram Usage by Process' still returns the correct 544.8M result that the old Dos16MemAvail API does.

What da???!!!

It's bad enough just trying to keep up with the logic flow of PUMon (although it does some nice & sophisticated work with the display cell definition logic), but I need some help in deciphering the above difference.

For what it's worth: I do NOT mind tossing in the gloves and settling in on using one of the most appropriate QSV values, but which one???

1) QSV_TOTAVAILMEM - seems like the best overall fit since it accounts for the virtual memory pool room that can be used to serve ALL processes

2) QSV_MAXPRMEM - seems like more appropriate fit since that really defines the most room a single process actually has left in the low private arena

In other words, while #1 is an overall SYSTEM-WIDE picture, it is really #2 that will dictate whether any particular process you wish to run can successfully allocate all the memory it needs (I believe this is ultimately due to memory segmentation that eventually happens).

Heck...I need to make the matching RC changes anyways (so these are all user selectable), so maybe that's a moot point...???

Thanks for all the feedback!

69
Applications / Re: VLC 3.0.19 don't install !
« on: November 07, 2023, 04:40:39 am »
Guys!

...Martin has probably done the same as me - unzipped to his choice of location keeping the vlc/2 directory tree. In which case the libpath entry is needed for vlc2\usr\local\bin\vlc.exe to find it's support libs....

Same here, and for that very reason I have a vlc.cmd that actually kicks things off for me, the contents of which are:

Code: [Select]
SET KVA_AUTOMODE=SNAP
SET BEGINLIBPATH=G:\apps\multimedia\vlc2\usr\local\lib;
G:\apps\multimedia\vlc2\usr\local\bin\vlc.exe %1 %2 %3

To do an update I simply wipe everything but the CMD and unzip to target directory.

70
Applications / Re: NewView - control over NEW window placement?
« on: October 22, 2023, 04:05:27 pm »
OK, thank you guys.

I'm going to float this request to Alex on the AOS Testers' List...if he agrees/is willing to pursue it I'll log an official request.

Again, appreciate the feedback!

71
Applications / Re: NewView - control over NEW window placement?
« on: October 21, 2023, 05:21:34 pm »
Umm...so am I the ONLY one that's seeing this behaviour, or is this generally known as the "intended" behaviour of the app?

72
Programming / Re: shared memory value - Odin win32k or DosQuerySysInfo???
« on: October 18, 2023, 03:16:29 pm »
Gents!

Wouldn't using win2k.h introduce a dependency in win2k.sys, which is now depreciated IIRC.

Somehow this must not be the case: I've had PUMonitor running on my machine for quite a few years now. [...] and I do NOT run the win32k.sys driver on my machine.

XCenter's "Sentinel Memory Watcher" also attempts to use win32k. If it fails to open the driver, then it falls back to conventional means to generate it numbers. This 'PUMonitor' (which I'd never heard of before) almost certainly does the same. Without a device driver (or access to a backdoor into the kernel), the kernel data the util wants to use is simply not accessible to a Ring-3 app.

Rich is spot on here, as was Dave initially as well.

I went back to the code and sure enough, what I missed was a call to check the availability of the win32k stuff (libWin32kInstalled) and when not present the usage of Dos16MemAvail API instead.

Now, having said that, while I can find some on-line references to Dos16MemAvail, I cannot for the life of me find actual documentation for this. Is that some kind of a macro maybe?

Instead I find a lot of references to DosQuerySysInfo, where I could use:
QSV_TOTAVAILMEM - max num of bytes that can be allocated by a process in the system
QSV_MAXPRMEM - max num of bytes that can be allocated by a process in the PRIVATE arena
QSV_MAXSHMEM - max num of bytes that can be allocated by a process in the SHARED arena

So it would seem that perhaps I need to replace that single Dos16MemAvail call with a DosQuerySysInfo call using the three params listed above to get all the info I need?

Rich,
Any chance that's what you're using in your memry util?

73
Programming / Re: shared memory value - Odin win32k or DosQuerySysInfo???
« on: October 18, 2023, 03:07:57 pm »
Hey Rich!

Attached is an update to 'memry' that now displays both high and low memory usage. Start it before opening your browser, then watch its numbers change when you open it. Here's my before and after with Dooble.

This is pretty neat stuff. I have been dreaming of building a GUI "browser" that basically visually maps the current memory utilization, goal being: make it human digestable!!!

So while tools like Theseus for example will expose a whole bunch of stuff, I often times wish that I could just see a quick snapshot that "lays it out" on the screen. Now, not knowing enough about this subject that may very well be a naive way of looking at it, but worth a try.

Do you mind sharing your source? I am very interested in the APIs you are using there, especially in light of the addition I'm trying to make to PUMonitor (to show the SHARED memory use).

In fact, running your monitor and comparing it's output to the likes of 'Free Shared Mem' util, or Alex's 'mem', I am not quite seeing the same numbers.

For example:

1) mem output
Quote
Total physical memory:      8,191 MB
Accessible to system:         3,199 MB
Additional (PAE) memory:  4,992 MB

Resident memory:            1,184 MB
Available virtual memory:    567 MB

Available process memory:
  Private low memory:         192 MB
  Private high memory:     1,344 MB
  Shared low memory:          84 MB
  Shared high memory:       564 MB

2) Free Shared Mem
88,408,064 bytes

3) Rich's memry
Quote
[Lo Priv | Unused | Shared  Used Free]  [Hi Priv | Unused | Shared  Used Free]
     109 |       84  |      318   291   27       1338 |     565  |   145      145   0

So focusing on SHARED memory:

mem shows: 84 MB
memry shows: Lo Priv Unused as 84

Are these two talking about the same memory area?...because your util Rich is certainly showing different numbers under the "Shared" label and neighter the Lo nor Hi match.

74
Programming / Re: makefile interpretation - help needed
« on: October 18, 2023, 02:53:49 pm »
Last update (I think ? ;)) on this topic: I went back to declaring TCPV40HDRS so that I wouldn't have to fight - what seems like a bigger battle - migrating to the full 32-bit stack.

Found my ENV issue that was preventing me from successfully building, that was the wrong order of directories in my INCLUDE statement, having fixed that I now have all the source compiling.

I do have some new questions re: memory stats/usage APIs, but I'll toss that into a separate thread.

Thanks everyone for the feedback and suggestions!

75
Programming / Re: makefile interpretation - help needed
« on: October 17, 2023, 04:00:15 am »
Dave,

Hi Dariusz, simply changing the SET TKMAIN=g:\code\tools\toolkit to SET TKMAIN=%UNIXROOT%\usr\include\os2tk45 should be all that is required to use your script with os2tk45.

Perhaps the time has finally come for me to abandon the original Toolkit install (along with all the upgrades) and deploy the os2tk45 RPM package as you suggest!

As it stands right now:

1) I was able to fix the 16-bit TCP/IP stack issue by cleaning up the ordering of my INCLUDE statement setup, apparently having the 16-bit H stuff ahead of the 32-bit caused me a problem...seems silly given that every single H file I looked at did check for TCPV40HDRS having been defined first...but...

2) The problem I now run into is that the code is written to use the 16-bit stuff, so something like soclose() belongs in unistd.h on the 32-bit stack and well the stars aren't quite aligned for me (LOL, OK I knew it wouldn't be THIS easy, but I took a stab at it anyways) and just adding unistd.h isn't enough
- there were several other structures that changed names between the two stacks as well, but at least those were easy to spot, track and change

Sooo....the last time I was able to compile this was in 2021, and that was to increase the number of CPUs being recognized. While I used the Borland MAKE for that, I did successfully use the as-is VACPP & Toolkit install I have here, and yet today the outcome is different, which means that my Toolkit environment changed in some way.

Yeah, needless to say the os2tk45 may be just about the only viable option to get to a working environment...!!!

As always, thanks for all the help!

Pages: 1 ... 3 4 [5] 6 7 ... 89