Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Windows Sysadmin using TWAPI - examples.

55 views
Skip to first unread message

PatrickF

unread,
Jan 24, 2005, 11:49:50 PM1/24/05
to
I have created some examples of Tcl Windows system administration
scripts using the twapi extension. These are located at:

http://aspn.activestate.com/ASPN/Cookbook/Tcl?kwd=Windows

The scripts produce email alerts/reports such as the following
generated off a DB2 database server. In this case physical memory
usage has spiked over 90% because a remote user is browsing a 700MB log
file using notepad.

###################################################################################
# Eros - Check Memory Usage on Eros at = 25-01-2005 09.43.22.
# *****
# Author: Patrick Finnegan
# Report File: D:/reports/notify/checkMem.txt
###################################################################################


Eros - Memory utilization is 92.0%.

Physical memory: Total 2559 MB, Available
193 MB
Commit: Total 10590 MB, Available
7273 MB
Swap files: C:\pagefile.sys,
D:\pagefile.sys
Allocated swap file space: 8031 MB

Available swap file space: 7080 MB


*****************************************
Memory utilization - Top Ten
*****************************************

ProcessName ProcessId WorkingSet
WorkingsetPeak

db2syscs.exe 1752 649 mb 649
mb
notepad.exe 4936 603 mb 783
mb
db2syscs.exe 1672 376 mb 397
mb
asnapply.exe 3864 30 mb 30
mb
asnapply.exe 4872 23 mb 23
mb
RaidServ.exe 2180 18 mb 22
mb
asnapply.exe 3996 17 mb 17
mb
DfrgNTFS.exe 5220 12 mb 36
mb
tclsh.exe 1324 11 mb 11
mb
services.exe 288 9 mb 12
mb

*****************************************
The End
*****************************************

sig...@gmail.com

unread,
Jan 25, 2005, 9:03:26 AM1/25/05
to

PatrickF wrote:
> I have created some examples of Tcl Windows system administration
> scripts using the twapi extension. These are located at:
>
> http://aspn.activestate.com/ASPN/Cookbook/Tcl?kwd=Windows
>
<snip>
I have started to convert all my admin stuff to Tcl. Currently I have
created a utility that runs a program with different paramenters to
update a 3rd party application. When that is done it emails me the log
file for review. The cool thing is I packed it into a Starpack EXE and
just used the system scheduler. It was a neat learning experience for
me.

I have not used (although I have it) TWAPI yet but I like it and I
encourage the author to keep it going! :-)

Robert

Patrick

unread,
Jan 25, 2005, 11:28:35 AM1/25/05
to

<sig...@gmail.com> wrote in message
news:1106661806....@z14g2000cwz.googlegroups.com...

I agree. I find TWAPI essential in a Windows environment if one want's to
avoid learning VBScript or the native Windows Server scripting tool. I see
Linux moving into the Windows server space making VBScript redundant.


Cameron Laird

unread,
Jan 25, 2005, 4:08:03 PM1/25/05
to
In article <VsuJd.211$7X3....@nnrp1.ozemail.com.au>,
Patrick <chppxf1@No_SPAMozemail.com.au> wrote:
.
.
.

>avoid learning VBScript or the native Windows Server scripting tool. I see
>Linux moving into the Windows server space making VBScript redundant.
>
>

Please expand that last sentence.

I'm all for Tcl, Linux, and 'most anything else that helps folks
meet their needs. I just don't resolve the ambiguities in, "I see
Linux moving ..."

Patrick

unread,
Jan 25, 2005, 11:02:16 PM1/25/05
to

"Cameron Laird" <cla...@lairds.us> wrote in message
news:q9mic2-...@lairds.us...

Windows Server 2003 still has issues with;

1. Load.

Applications tend to lock up when servers are run close to max cpu.

2. File System.

Cannot handle large database files say over 100gig. Copies fail. Backups
fail. Data corruption.

3. Application Co Location.

Much more difficult to co-locate several applications on the one server and
then run under load. For example co-locating a Java application server and
Database is not recommended in production environments. This becomes an
issue if IT want to run several applications in an expensive clustered
environment. You need a clustered environment for each application. Most
unix distros can host multiple apps on a single server with no issues.


Cameron Laird

unread,
Jan 26, 2005, 2:08:04 PM1/26/05
to
In article <dDEJd.60$y_4....@nnrp1.ozemail.com.au>,

If I understand you correctly, I believe you're concluding that
Windows will so disappear from server racks that VBScript will
become irrelevant.

You're more optimistic than I, and I generally regard myself as
on the severe side in my judgment of Microsoft's prospects. I
know of projects which are scheduling use of WinXP for at least
the next decade--and in fact I expect Win* servers to continue
to be a (multi-)billion-dollar annual business at least through
2010.

I certainly can agree with the narrower point that Tcl makes a
great language for Win* sysad work, and I applaud your own
demonstration of exactly that reality.

Jamshed

unread,
Jan 28, 2005, 3:34:25 AM1/28/05
to
TWAPI is certainly a very cool lib. Ashok keep up the great work.
I recelty used it to build some windows management soap services.
It rocks!

Cameron Laird

unread,
Jan 28, 2005, 8:08:03 AM1/28/05
to
In article <1106901265....@f14g2000cwb.googlegroups.com>,

Jamshed <jamshed...@umit.com> wrote:
>TWAPI is certainly a very cool lib. Ashok keep up the great work.
>I recelty used it to build some windows management soap services.
>It rocks!
.
.
.
That would make for a nice article.

Jamshed

unread,
Jan 31, 2005, 11:37:10 AM1/31/05
to
nice tip Cameron! I'll try to put together some document.

0 new messages