• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

Using REXX to monitor TCP/IP and other statistics?

Started by RobertM, 2012.04.08, 04:23:57

Previous topic - Next topic

RobertM

Hi, does anyone know how I can use REXX to get the following information? Inotherwords, a particular DLL Library I need? Something in the poorly documented RxSocks?

- TCP/IP traffic stats (similar to what the widget in xCenter/eCenter reports: current upload/download speeds and amounts)
- Active network/socket connections (ie: 47 connections to port 80)
- A tool that returns *VALID* data for the amount of available, free and used memory in the system (I'm getting all sorts of interesting results with the ones I am trying).

Best,
Rob


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


herwigb

Take a look at this http://www.os2usr.org/xcenter/hbtcpipgraphmon202.zip - this could be a starting point for what you want to do.
Kind regards,
HerwigB.

RobertM

Quote from: herwigb on 2012.04.08, 14:41:35
Take a look at this http://www.os2usr.org/xcenter/hbtcpipgraphmon202.zip - this could be a starting point for what you want to do.

Hi Herwig,

With a little work, I can probably use that. The only problem I am running into is that there seems to be an integer overflow in the memory calculations. The system has 4GB of physical RAM in it. Here are the results:


Mem1 - Total number of bytes of physical memory:                                      -,671,776,768
Mem2 - Total number of bytes of system-resident memory:                                 109,056,000
Mem3 - Maximum number of bytes available for all processes in the system RIGHT NOW:  -1,236,000,768
Mem4 - Maximum number of bytes available for this process RIGHT NOW:                    386,269,184
Mem5 - Maximum number of shareable bytes available RIGHT NOW:                           332,267,520



Here's what pyRxUtil reports - some of which seems correct:

(QSV_TOTPHYSMEM)  Avail.phys.mem  - 3,623,190,528 Bytes
(QSV_TOTRESMEM)   Avail.resid.mem -   109,084,672 Bytes
(QSV_TOTAVAILMEM) Total.avail.mem - 2,993,901,568 Bytes


Now, note this math:

4,294,967,296 (4GB installed RAM)
-671,776,768
--------------
3,623,190,528 On the button, exactly the same answer as pyRxUtil


After taking into account resources for device mappings, that seems about right.

The value I have labeled as "Mem3" I think requires the same thing for negative numbers. The differences between it and pyRx are 60 something MB, which could be accounted for because the data was copied at slightly different times on an active web server.

So, I think it should be suitably usable for me.




But, now I have a question - what do the values of these really correspond to?
- Value 18 (QSV_TOTRESMEM   ) - #2 above
- Value 20 (QSV_MAXPRMEM) - #4 above
- Value 21 (QSV_MAXSHMEM) - #5 above


I know 20 is supposed to be the private arena and 21 is supposed to be the shared arena (or at least, I'm pretty sure), but the numbers of all three (or at least 18 and 20) don't make much sense when taken together with everything else.

The machine has a VIRTUALADDRESSLIMIT value set at 1800. From system start, with nothing but the OS and its services running, those numbers are pretty much what you see above (a few dozen megabyte difference).

I'd have thought, even with fragmentation and such, that the resources would add up better - and that one of the arenas would have a lot more (private).

Any thoughts from anyone would be greatly appreciated.

Best,
Rob


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


RobertM

So... here's a particular question that's baffling. What does this value correspond to, and why is it so low?

(QSV_TOTRESMEM)   Avail.resid.mem -   109,084,672 Bytes

Resident in what fashion? It's obviously not "how much physical memory exists" nor "how much memory does OS/2 see" - and it doesn't seem to be shared memory available either (that's supposedly #5 on my earlier post (QSV_MAXSHMEM)).

Sorry gang, I know these seem like newbie questions... I mean I know about the various memory arenas in OS/2 - but the way DosQuerySysInfo has them named or reports them isn't helping me make a connection to what they actually pertain to - which is making it difficult for me to use them to watch what resources the server is running low on.

Here's some information on what memory I do know is being used, as per the values I have assigned:
- JFS:                                32,768 bytes for cache
- HPFS386:                             8,192 bytes for cache
- VirtualAddressLimit:                 1,800 MB



And here are some values I have set for other OS parameters that affect the amount of memory available:
-Threads:                              1,000
-ShellHandlesInc:                      1,024
-Buffers:                                 10  
-Files:                                   40  
-DiskCache:                         64,LW,16  
-Swap File Size:                      65,535
(side note, I've had interesting results with swap files of near any size on systems with 4GB) ???

-Processes:                        REM'D OUT


Any thoughts would be greatly appreciated.

Best,
Rob


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


RobertM

I guess the more important question is "which are the most important values for AMP?" ;)

So... if anyone knows the best way I should configure such things, I'd greatly appreciate it.

Best,
Rob


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|