RU/2: Форум. Общение пользователей и разработчиков OS/2 (eCS). : Ответить на сообщение
Имя:
e-mail:
FIDO:
Home page:
сохранить данные о вас
Тема:
> > Всем привет. 2 вопроса по поводу сабжа: > > 1. Где взять perfutil.h, который просят примеры из тулкита IBM VAC 4? > > 2. Как узнать загрузку CPU конкретным процессом на старых ядрах (Merlin + fp5) без использования Theseus API. > > > > Заранее спасибо. > > По пункту 1: > Это из примечаний к функции DosPerfSysCall: > > DosPerfSysCall is a general purpose performance function. This function accepts four > parameters. The first parameter is the command requested. The other three parameters are > command specific. DosPerfSysCall is intended to be extended by IBM in the future for other > performance related functions. > > Some functions of DosPerfSysCall may have a dependency on Intel Pentium or Pentium-Pro > support. If a function cannot be provided because OS/2 is not running on an processor with > the required features, a return code will indicate an attempt to use an unsupported function. > > The perfutil.h file referenced in the example code may or may not be shipped as part of the > Toolkit. In the event that it is not, its contents are: > > #ifdef __cplusplus > extern "C" { > #endif > > #ifndef PERFCALL_INCLUDED > #define PERFCALL_INCLUDED > > /* > DosPerfSysCall Function Prototype > */ > > /* The ordinal for DosPerfSysCall (in BSEORD.H) */ > /* is defined as ORD_DOS32PERFSYSCALL */ > > APIRET APIENTRY DosPerfSysCall(ULONG ulCommand, ULONG ulParm1, ULONG ulParm2, ULONG ulParm3); > > /*** > * > * CPU Utilization > * --------------- > * > **/ > > #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; > > #ifdef __cplusplus > } > #endif > > It may also be necessary to define the ordinal for this function: > > #define ORD_DOS32PERFSYSCALL 976 > > > По пункту 2: > Не знаю, думаю можно воспользоваться тем же DosPerfSysCall. > >
__, _,_ _, __, ___,
|_) | | | |_ ` /
| \ | | | , | /
~ ~ `~' ~~~ ~~~ ~~~
Programmed by
Dmitri Maximovich
,
Dmitry I. Platonoff
,
Eugen Kuleshov
.
25.09.99 (c) 1999,
RU/2
. All rights reserved.
Rewritten by
Dmitry Ban
. All rights ignored.