I wrote this Windows script (batch file) to grab a single line of output from a command
set /a max=1
typeperf "\memory\Pages/sec" -f csv -sc 1 -o c:\temp\1.tmp -y
for /f "usebackq skip=1 tokens=1*" %%a in ("c:\temp\1.tmp") do (
call :onlyone %%a%%b)
set /a counter = NaV + 1
if /i NaV gtr NaV goto :EOF
echo %* >>c:\temp\2.tmp
The for command reads the file line by lines and calls only one with parameters.
:onlyone does something (in this case echo), then increments a counter to keep track of how many it has done then returns
Next time onlyone is called the counter = max, so it returns without doing anything
Note: tried to execute typeperf from within the for command but the command must write directly to the screen on a non-line oriented mode. For could not capture the output correctly
Running gnome on Linux2 and the time was off. I tried to use gnome to set the time but it said no program was configured to change time. I don't get it.
Needed to use hwclock. Here are the commands
set date hh:mm:ss (to set the time)
hwclock --localtime (tells linux the rtc is set to local time)
hwclock --hctosys (to set system time from hwclock)
in my last post I spent a lot of time discussing how to install SASL and configure Sendmail to do SMTP AUTH.
I was confusing smartthost authentication with user authentication. I found an article on comp.mail.sendmail
that hinted to the problem and directed me to the sendmail README in /usr/share/sendmail/cf/
All I needed to do was
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
makemap hash access <access
Note: The other entries in access.db are the hosts to accept as relay hosts
We need to start forwarding mail through verizon because sites like AOL are not accepting mail from mail servers on
soft-links(based on IP range). I started researching this and found that first I need:
So I downloaded SASL and followed the instructions to build it, but received and error during 'make':
"kerberos4.c:49:17: krb.h: No such file or directory "
This was resolved by modifying the ./configure step. I used this command-line based on a a link to
with-saslauthd=/usr/lib/sasl2 enable-cram \
enable-digest enable-plain disable-anon disable-gssapi \
disable-krb4 disable-otp --with-openssl
Next I had to compile Sendmail. Based on the sendmail book I ran
./Build -c -n (create clean build, no make)
Then I restarted sendmail and all was well
(Actually, I received an error:
"libsasl.so.7: cannot open shared object file: No such file or directory"
At this point I remembered that my SASL build had an error which I resolved and documented above).
Never stop in the middle of something!
Still not getting AUTH from EHLO command
We had a need recently to print the contents of an Exchange 5.5 distribution list. We've looked in thre past for a tool to do this and never had any luck.
I found a python script that did this and since I don't know python(yet), I converted it to vbscript. Run the script (cscript getmembers.vbs) to see the Usage.
You'll need ADO & ADSI installed locally. E-mail with questions/bugs. Let me know if it works for Exch2k
I hope you'll find this of value. (save as getmembers.vbs)
'getmembers.vbs - Greg Martin - CSC May 2003
'If you use this regularly, you can define sUser & sPwd with a user from your local site
'Run with cscript to prevent a gazillion pop up windows
dim oIADs dim MyContainer dim objRecipients dim item CRLF = Chr(13) & Chr(10) sUsage = "Getmembers.vbs - Greg Martin, CSC 2003" & CRLF & CRLF sUsage = sUsage & "Returns the entries of an Exchange distribution list and nested lists" & CRLF sUsage = sUsage & "Usage: cscript getmembers.vbs " & CRLF & CRLF sUsage = sUsage & "Where:" & CRLF sUsage = sUsage & "Servername is the name of an exchange server" & CRLF & CRLF sUsage = sUsage & "Listname is the alias of the list to be enumerated" & CRLF & CRLF sUsage = sUsage & "UserDN is the DN of an exchange user(used to login via LDAP)" & CRLF sUsage = sUsage & "Note: User DN typically looks like 'cn=alias, ou=site, o=org'" & CRLF sUsage = sUsage & " Specifying the recipients container is not necessary and does not work" & CRLF &CRLF sUsage = sUsage & "Password is the password for user" & CRLF & CRLF sUsage = sUsage & "1 Recurses list members. 0 does not recurse (optional - must be supplied if CN|UID id specified) " & CRLF & CRLF sUsage = sUsage & "CN prints Exch CN of list member; UID prints Exch alias (optional)" & CRLF & CRLF sUsage = sUsage & "Example: cscript getmembers.vbs Rosnt47 " & chr(34) & "cn=tcs_users,cn=Distribution_ Lists,ou=ets,o=ets" & chr(34) & " " & chr(34) & "cn=juser, ou=ETS, o=ETS" & chr(34) & " p@ssw0rd 1 CN" & CRLF & CRLF 'Todo Set oArgs = WScript.Arguments
Hey, we upgraded the site to TikiWiki 1.6 back two weeks ago. A couple things to note. Pages (actualy templates) are compiled on first use. This speeds up access. However, it broke the Admin page. Had to grant php rights to use 32MB and 120 secs of run time. The Admin page is by far the most complex. After that compile, all was well and we're back to 24MB & 30 seconds
Had a problem posting to mailing lists. It would return an error saying the script ran as the wrong user.
The answer was adding 'mail' as the default user in sendmail.cf
I loaded phpMyAdmin to manage MySql. Very slick
Directory is locked down using .htaccess
SNMP trap daemon:
./snmptrapd -P -F "%02.2h:%02.2j TRAPNo value assignedq from %A: %v \n" /var/log/snmp.log &