Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XP Virtual memory...eesh

Status
Not open for further replies.

DantanaSwat

IS-IT--Management
Dec 3, 2003
29
US
So I got the Dave Roth book on Win32 Scripting for System admins (Im very new to perland scripting in general) and the script Ive written down suddenly take up all of the VM. Im using PerlIDE and I believe it happens when it makes the Apilink('kernal.32.dll'
Code:
if(Apilink('kernal32.dll', 'DWORD GetTimeZoneInformation(PVOID pTZInfo)'))
{
  my $pTZInfo = NewString(200);
  my $Result = GetTimeZoneInformation($pTZInfo);
  if(0 == $result || 2 == $Result)
  {
  $TZOffset = unpack('1', $pTZInfo) / 60;
  }
}
seems to be filling up right there.

Version
This is perl, v5.8.3 built for MSWin32-x86-multi-thread
(with 8 registered patches, see perl -V for more detail)

Copyright 1987-2003, Larry Wall

Binary build 809 provided by ActiveState Corp. ActiveState is a division of Sophos.
Built Feb 3 2004 00:28:51

Repositories
[1] ActiveState PPM2 Repository
[2] ActiveState Package Repository
[3] Roth_Consulting

and the program has
use Win32;
use GetOpt::Long;
use Win32::NetAdmin;
use Win32::AdminMisc;
use Win32::API::prototype;to start off with

installed packages are
1. ActivePerl-DocTools [0.04] Perl extension for Documentation TOC Generation
2. ActiveState-RelocateTree [0.03] Relocate a Perl installation
3. ActiveState-Rx [0.60] Regular Expression Debugger
4. Archive-Tar [1.07] Manipulates TAR archives
5. Compress-Zlib [1.22] Interface to zlib compression library
6. Data-Dump [1.01] Pretty printing of data structures
7. Digest-HMAC [1.01] Keyed-Hashing for Message Authentication
8. Digest-MD2 [2.03] Perl interface to the MD2 Algorithm
9. Digest-MD4 [1.1] Perl interface to the MD4 Algorithm
10. Digest-SHA1 [2.06] Perl interface to the SHA-1 Algorithm
11. File-CounterFile [1.01] Persistent counter class
12. Font-AFM [1.18] Interface to Adobe Font Metrics files
13. HTML-Parser [3.34] HTML parser class
14. HTML-Tagset [3.03] Data tables useful in parsing HTML
15. HTML-Tree [3.18] build and scan parse-trees of HTML
16. IO-Zlib [1.01] IO:: style interface to Compress::Zlib
17. libwin32 [0.21] A collection of extensions that aims to provide comprehensive access
to the Windows API.
18. lib [5.75] Library for in Perl
19. MD5 [2.02] Perl interface to the MD5 Algorithm (obsolete)
20. Net-Ping-External [0.11] Cross-platform interface to ICMP "ping" utilities
21. PPM3 [3.1] Perl Package Manager: locate, install, upgrade software packages.
22. SOAP-Lite [0.55] Library for Simple Object Access Protocol (SOAP) clients and servers in Perl
23. Tk [800.024] A Graphical User Interface Toolkit
24. URI [1.27] Uniform Resource Identifiers (absolute and relative)
25. Win32-AdminMisc [0.2003.07.14] The Win32::AdminMisc extension for Win32 X86
26. Win32-API [0.41] Perl Win32 API Import Facility
27. Win32-API-Prototype [0.2002.12.17]
The Win32::API::prototype module.
Simplifies using Win32::API by accepting a C function prot~
28. Win32-AuthenticateUser [0.02] Win32 User authentication for domains
29. Win32-Daemon [0.2003.06.17] The Win32::Daemon extension for Win32 X86. Allows Perl to be a Win32 service.
30. Win32-Lanman [1.0.10] Contains the most important calls from the MS-Lanmanager API.
31. Win32-OLE [0.1403] OLE Automation extensions
32. XML-Parser [2.34] A Perl module for parsing XML documents
33. XML-Simple [2.09] Easy API to read/write XML (esp config files)

any ideas where I may start?
 
hmmmmmmmmmmmmmmmmmmmmmmm
Running it from PerlIDE caused the memory hogging...when I ran it from command prompt I got an 'Access is denied' error even though Im a domain admin. I looked in the system32 directory and its kernel32.dll. Now to figure out where Im getting that error froim
 
dang...i ran it like
perl userview.pl
and it got by the access denied and hogged the memory again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top