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.


Topics - abwillis

Pages: [1]
1
Setup & Installation / IBM System 3650
« on: 2012.05.07, 04:36:18 »
I have been seeing if I could install eCS 2.1 on an IBM System 3650 that I have an opportunity to test.  The drives are SAS (serial attached scsi) that I have not found a driver for.  I tried the ipsraid, ahci, danis506, and various Adaptec scsi drivers (seems to be Adaptec based).  It seems that there are no drivers to handle this but thought I would check to see if anyone knew of something that might work.

2
Hardware / HLT driver
« on: 2011.09.19, 00:42:52 »
I wrote a small driver to call HLT as I have never gotten the 14.104b
patched kernel to work with extrahlt setting on my systems.  It works
similar to the windows System Idle Process in that when anything else
is not using the CPU this is so CPU meters will show pegged.  The 100% CPU is a
result of what I described as the Windows "System Idle Process".   
In Windows if you check the processes there is a "System Idle Process" that runs
at 100% when nothing else is using the CPU.   That is what is happening with idlehlt.exe. 
It runs in a tight loop to call the HLT.  It runs at Idle Priority and 0 delta so
anything else that needs CPU will get it.  In order for the CPU meter
to be meaningful while running idlehlt would require deleting the CPU
usage of idlehlt from the total CPU usage.
Because of the CPU usage the throttling does not work as it sees the CPU always in use. 
It does not keep my system as cool during idle as the throttling does but keeps my
system cooler during usage and does not have the sluggishness I see when first
starting to try to move my mouse when the system is throttled (if using SNAP this is probably not
an issue with mouse hardware acceleration but with Panorama I have the
mouse jumping all over the place for a second or two until the CPUs
jump back out of throttle). 
Anyone that wants to give it a shot, the driver is in netlabs incoming
as hltdriver.zip.
I recommend turning off throttling though it is not strictly necessary
but no sense in having it running.
Add idlehlt.sys as a device driver in config.sys, reboot, and run
idlehlt.exe.
I am not a device driver programmer, I used the helloworld drive as a
template.  It seems to be working well on my system but could easily
blow a system up so fair warning but I am interested in seeing how
well the concept works overall.
Andy

3
Article Discussions / NASM version 2.09.10
« on: 2011.07.20, 03:41:06 »
There is also a nasm  2.10 rc7 available.

4
Article Discussions / WarpNote now Freeware
« on: 2011.06.23, 16:04:15 »
http://www.os2world.com/content/view/20888/2/
Quote
Posted by Martin Iturbide - Sunday, 12 June 2011


Craig Miller. .. .
While it is really good to have a new home for people to find it and download it, in point of fact it has been free for several years:
http://www.os2.cz/en/warpnote-1-93-available-free-0
It is a really nice little program. 
I applaud the effort that Craig has put into reviewing the apps he does.
Andy

5
General Discussion / Interesting background on this phone
« on: 2010.04.23, 17:31:02 »
http://www.engadget.com/2009/12/07/vmware-wants-dual-os-virtualized-smartphones-no-ugly-boot-loade/
I can't find any reference to its actually being loaded on the phone but it looks cool.
Andy

6
Programming / acpi cpu daemon
« on: 2009.01.31, 20:45:46 »
eCS's ACPI does not currently have any way to automatically throttle the CPU when not needed.  If running ACPI you either run at full or you can manually use setgetthrtl.exe but this is mostly for testing as it isn't convenient for actual use as you would then have to set the throttle back up manually as well. Here is some code to watch the cpu usage and change the throttle respectively.  This code is not real dynamic right now but appears to more or less do the job.  I am hoping others will also pick this up and maybe come up with something until a better approach is found.  I am running this program on a hyperthreading SMP system (one CPU but is being seen and used as 2) running eCS 2.0 rc6a.  RC6a puts setgetthrtl.exe into the boot:\ecs\bin  if ACPI was installed from the Betazone on another system then it is in the utils directory and setgetthrtl.exe either has to be in the path or in the same directory as the executable.
The bulk of the code I got from edm2, which in turn came from the SMP addendum.inf from the OS2 toolkit.  I have left in currently the ability to set the time for the checks between 1-9 seconds, I changed from failing if no number is given to defaulting to 5 seconds. 
I am open to better code suggestions :)
I am very interested in opinions on the best timing for how often to do the cpu checks.
I have been thinking it may be a good idea to boost the priority, should it run at normal priority but higher delta? or foreground server? time critical?
I have currently just selected throttle settings to idle settings to what seemed like they would work OK, better ideas for this?
From what I can tell, you cannot set the throttle settings independently on various processors so I only set CPU 0, however, I only have a hyperthreading machine to check on and not a true SMP system... if setgetthrtl.exe is run with no switches then it will show current throttle state (2nd CPU here show throttle disabled). The parameters for setgetthrtl.exe are cpu number (starting at 0) and throttle (mine shows min 13 and max 100).
And now for the code :)
Code: [Select]
#define INCL_BASE

  #include <os2.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>

#define DEBUG 0

  APIRET APIENTRY DosPerfSysCall(ULONG ulCommand, ULONG ulParm1,
                                 ULONG ulParm2, ULONG ulParm3);

  #define ORD_DOS32PERFSYSCALL       976
  #define CMD_KI_RDCNT            (0x63)

  typedef struct _CPUUTIL {
    ULONG ulTimeLow;     /* Low 32 bits of time stamp      */
    ULONG ulTimeHigh;    /* High 32 bits of time stamp     */
    ULONG ulIdleLow;     /* Low 32 bits of idle time       */
    ULONG ulIdleHigh;    /* High 32 bits of idle time      */
    ULONG ulBusyLow;     /* Low 32 bits of busy time       */
    ULONG ulBusyHigh;    /* High 32 bits of busy time      */
    ULONG ulIntrLow;     /* Low 32 bits of interrupt time  */
    ULONG ulIntrHigh;    /* High 32 bits of interrupt time */
   } CPUUTIL;

  typedef CPUUTIL *PCPUUTIL;

  /* Convert 8-byte (low, high) time value to double */
  #define LL2F(high, low) (4294967296.0*(high)+(low))

  /* This is a 1 processor example */
  int main (int argc, char *argv[])
  {
     APIRET      rc;
     int         i, iter, sleep_sec, cputhrtl50;
     double      ts_val, ts_val_prev;
     double      idle_val, idle_val_prev;
     double      busy_val, busy_val_prev;
     double      intr_val, intr_val_prev;
     CPUUTIL     CPUUtil;

     if ((argc < 2) || (*argv[1] < '1') || (*argv[1] > '9')) {
     sleep_sec = 5;
     } else
     sleep_sec = *argv[1] - '0';


     cputhrtl50 = 100;
     iter = 0;
     do {
         rc = DosPerfSysCall(CMD_KI_RDCNT,(ULONG) &CPUUtil,0,0);
         if (rc) {
             fprintf(stderr, "CMD_KI_RDCNT failed rc = %d\n",rc);
             exit(1);
         }
         ts_val = LL2F(CPUUtil.ulTimeHigh, CPUUtil.ulTimeLow);
         idle_val = LL2F(CPUUtil.ulIdleHigh, CPUUtil.ulIdleLow);
         busy_val = LL2F(CPUUtil.ulBusyHigh, CPUUtil.ulBusyLow);
         intr_val = LL2F(CPUUtil.ulIntrHigh, CPUUtil.ulIntrLow);

         if (iter > 0) {
             double  ts_delta = ts_val - ts_val_prev;
#if DEBUG
             printf("idle: %4.2f%%  busy: %4.2f%%  intr: %4.2f%%\n",
                    (idle_val - idle_val_prev)/ts_delta*100.0,
                    (busy_val - busy_val_prev)/ts_delta*100.0,
                    (intr_val - intr_val_prev)/ts_delta*100.0);
#endif

         if (((idle_val - idle_val_prev)/ts_delta*100.0) > 75){
         if (((idle_val - idle_val_prev)/ts_delta*100.0) > 85){
         if (((idle_val - idle_val_prev)/ts_delta*100.0) > 90){
             if (cputhrtl50 != 15){
             system( "setgetthrtl 0 15");
             cputhrtl50 = 15;}} else
             if (cputhrtl50 != 25){
             system( "setgetthrtl 0 25");
             cputhrtl50 = 25;}} else
             if (cputhrtl50 != 50){
             system( "setgetthrtl 0 50");
             cputhrtl50 = 50;}}


         if (((idle_val - idle_val_prev)/ts_delta*100.0) < 35){
         if (((idle_val - idle_val_prev)/ts_delta*100.0) < 25){
         if (((idle_val - idle_val_prev)/ts_delta*100.0) < 10){
             if (cputhrtl50 != 100){
             system( "setgetthrtl 0 100");
             cputhrtl50 = 100;}} else
             if (cputhrtl50 != 75){
             system( "setgetthrtl 0 75");
             cputhrtl50 = 75;}} else
             if (cputhrtl50 != 50){
             system( "setgetthrtl 0 50");
             cputhrtl50 = 50;}}

         }

         ts_val_prev = ts_val;
         idle_val_prev = idle_val;
         busy_val_prev = busy_val;
         intr_val_prev = intr_val;

         iter++;
         DosSleep(1000*sleep_sec);

     } while (1);
  }

7
Rexx / unzip to temp dir
« on: 2008.08.05, 05:54:04 »
Here is some code I have just updated, for years it was much simpler but had some limitations I decided to overcome.  There are some alternate code paths I had toyed with that are still in the code but commented out. 
Code: [Select]
/* Open directory in wps */

call RxFuncAdd 'Sysopenobject', 'RexxUtil', 'Sysopenobject'

/* say arg(1) */
MyArg = Arg(1)

If Left( MyArg,1 ) = '"' then
Parse var MyArg '"' MyArg
If right( MyArg,1 ) = '"' then
Parse var MyArg MyArg '"'

env = 'OS2ENVIRONMENT'
temploc = value('temp',,env)'\unzip'
/* say 'temploc' temploc */

curdir = directory(.)
/* say curdir */

zipfile = FILESPEC("name",MyArg)
/* say zipfile */

curdrive = FILESPEC("drive",curdir)
/* say curdrive */

zipdrive = FILESPEC("drive",MyArg)
/* say zipdrive */

If zipdrive = "" Then do
zipdrive = curdrive /* '\' */
/* say zipdrive */
zippath4 = FILESPEC("path",MyArg)
/* say 'zippath4' zippath4 */
zippath4 = zippath4' '
parse var zippath4 zippath1 '\ '
/* say 'zippath1' zippath4 */
zippath3 = directory(zippath1)
/* say 'zippath3' zippath3 */
zippath2 = directory(.)
/* say 'zippath2' zippath2 */
zippath = FILESPEC("path",zippath2'\dummy.zip')
/* say 'zippath' zippath */
/* if zippath = '\' then zippath = '' */
/* say zippath */
end
Else
zippath = FILESPEC("path",MyArg)
/* say 'zippath' zippath */


if zippath = "\\" then zippath = '\'
else nop /* do
zippath = ' 'zippath' '
parse var zippath ' \' zippath '\ '
zippath = '\\"'zippath'"\'
say zippath
end
*/

fullpath = zipdrive||zippath||zipfile
fullpath = '"'||fullpath||'"'
/* say 'fullpath' fullpath */

zipdir = SysTempFileName(zipfile'.???')
/* say 'zipdir' zipdir */

error = SysMkDir(temploc)
/* say 'error' error */

unzipdir = temploc||'\'||zipdir
/* say 'unzipdir' unzipdir */

error=SysMkDir(unzipdir)
/* say error */

/*
rc=sysopenobject(unzipdir,icon,details)
rc=sysopenobject(unzipdir,icon,details)
*/

rc = SysSetObjectData(unzipdir, "OPEN="||details)
/* say 'rc' rc */
fileit = directory(unzipdir)
/* say 'fileit' fileit */
unzip fullpath
curdir = directory(curdir)
/* pause */
exit

8
Multimedia / Flash7b (Innowin version)
« on: 2008.06.20, 23:55:15 »
I am looking for a copy of the Innowin flash 7 that uses the Innowin library instead of the flashwin.  I used to have a copy but lost it somehow and am wanting to do some testing.  Most people didn't have much luck with that version so I am have not been able to find a copy of it.
Andy

abwillis1 at (gmail) dot com

9
Article Discussions / JRE 1.5.0_07 under eComStation
« on: 2008.03.21, 03:24:15 »
http://www.os2world.com/content/view/17208/2/
Quote
Posted by Martin Iturbide - Tuesday, 26 February 2008


[a name. .. .
I finally got around to trying this.  The ar5os2 usage was a bit of a pain so what I did was rename the java142 directory and replace it with the files in jre 1.5.07.  I then copied java.exe, javaw.exe, and j2win.dll from java142 and have been successful running java the same as I did with 1.4.2.
e:\programs[0]java -version
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode)

Andy

10
http://www.os2world.com/content/view/15355/2/
Quote
Posted by Martin Iturbide - Thursday, 01 November 2007


Hi All. .. .
If anyone is having problems with sound:
try SET SDL_USE_TIMECRITICAL_AUDIO=1

11
Internet / OS2World IRC
« on: 2007.06.12, 21:47:52 »
I saw a link on the OS2World homepage for chat which tries to open in Chatzilla when I click on it. 
I have Chatzilla already open with 5 server with 11 channels open so I know it is working but I get:
[13:43]   ===   *** Banned AUTO-USER (2007/2/9 10.03)
[13:43]   [ERROR]   Closing Link: 127.0.0.1 (*** Banned )
[13:43]   [ERROR]   Connection to irc://efnet/ (irc://irc.prison.net/) closed. Reconnecting in 15 seconds.
when I try the chat link. 

12
http://www.os2world.com/content/view/307/2/
Quote
Posted by Kim Haverblad - Thursday, 26 April 2007



An Ano. .. .
While the comment about IBM not being interested in future profits (only the here and now) I would characterize as correct, much of the rest of his story just doesn't wash timeline-wise.  IBM initially switched to Win95 in about 1999.  I worked the internal helpdesk at that time and our call volume rose dramatically.  Previous to that, I can't really say I supported OS/2 as we really never had OS/2 calls (other than new machines needing an image). We had application calls prior to that, our increased call volume was related to windows issues.  One thing I do have to say about the win95, win98 was out but IBM (showing an amazing amount of foresight) went with win95 instead.  While win95 would break down more often than win98 did, we could pretty much always fix it whereas those few that called in with win98 with the same problem that was easily corrected in win95 in maybe 5 minutes would be worked on for hours on win98 without resolution (everything but reinstalling the OS as they generally didn't have their disks).
The next step was win2000 and XP has only been moved to in earnest in the last 2-3 years so his whole XP/Office (which I can say from having supported both Office and Smartsuite, Office is lowest common denominator software).  If he thinks Office is better than Smartsuite then I'd have to say he just isn't a very computer savy individual.
Andy

Pages: [1]