if u insist, but I'm sure its permissions, u can upgrade a bit y code to
make u under. what is the problem. just suggestion...

-----Original Message-----
From: Manara, Andrea [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 5:00 PM
To: 'Conor Lillis'; Manara, Andrea;
'[EMAIL PROTECTED]'
Subject: RE: Problem with Perflib



I don't think so since I have administrator privileges on this machine...

-----Original Message-----
From: Conor Lillis [mailto:[EMAIL PROTECTED]]
Sent: vendredi, 17. mai 2002 15:54
To: 'Manara, Andrea'; '[EMAIL PROTECTED]'
Subject: RE: Problem with Perflib


Sorry for perhaps stating the obvious, but could it be a permissions issue ?


-----Original Message-----
From: Manara, Andrea [mailto:[EMAIL PROTECTED]]
Sent: 17 May 2002 14:39
To: '[EMAIL PROTECTED]'
Subject: Problem with Perflib



Hello.

I have a PC with Windows2000 and  the Perl installation from
ActivePerl-5.6.1.631-MSWin32-x86 setup.
I have been extensively used this version of Perl without any problem.
Now I have problems with the Win32::PerfLib module.

If I try the example provided with the installation for PerfLib (which I
join at the end of this e-mail) I don't get as output
the performance data for the project object.

If I try process.pl from the Jutta Klebe web page
http://www.bybyte.de/jmk/docs/Perl5/PerfLib/PerfLib_sample.html
I don't get any data about PID Process CPU  CPU-Time  etc. for the running
processes (similar to the Task Manager info),
but I just get the header:

PID Process             CPU             CPU-Time                Memory  PF
etc...
Does anybody have any ideas on what could be going wrong??
Thank you
                        Andrea
****************************************************************************
***************************
  use Win32::PerfLib;
  my $server = "";
  Win32::PerfLib::GetCounterNames($server, \%counter);
  %r_counter = map { $counter{$_} => $_ } keys %counter;
  # retrieve the id for process object
  $process_obj = $r_counter{Process};
  # retrieve the id for the process ID counter
  $process_id = $r_counter{'ID Process'};
  # create connection to $server
  $perflib = new Win32::PerfLib($server);
  $proc_ref = {};
  # get the performance data for the process object
  $perflib->GetObjectList($process_obj, $proc_ref);
  $perflib->Close();
  $instance_ref = $proc_ref->{Objects}->{$process_obj}->{Instances};
  foreach $p (sort keys %{$instance_ref})
  {
      $counter_ref = $instance_ref->{$p}->{Counters};
      foreach $i (keys %{$counter_ref})
      {
          if($counter_ref->{$i}->{CounterNameTitleIndex} == $process_id)
          {
              printf( "% 6d %s\n", $counter_ref->{$i}->{Counter},
                      $instance_ref->{$p}->{Name}
                    );
          }
      }
  }

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised.if you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it is prohibited and may be unlawful. Please note that any
views, opinions or advice contained in this email are those of the sending
individual and not necessarily those of the firm. It is possible for data
transmitted by e-mail to be deliberately or accidentally corrupted or
intercepted. For this reason, where the communication is by e-mail, J&E Davy
does not accept any responsibility for any breach of confidence which may
arise from the use of this medium. If you have received this e-mail in error
please notify us immediately at mailto:[EMAIL PROTECTED] and delete this
e-mail from your system.
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to